I've imported my CSV file into R as a data frame and I have assigned my column of interest (AtollInservice$Antenna) as a factor.
The original CSV file has the following format in my column of interest:
COM_CVV65BSX-M\COM_CVV65BSX-M_2100_T02
As you'll notice there's a single "\" in my original file yet upon importing read.csv and using the head() function R seems to have duplicated the backslash such as below:
> head(AtollInService$ANTENNA)
[1] COM_CVV65BSX-M\\COM_CVV65BSX-M_2100_T02
COM_CVV65BSX-M\\COM_CVV65BSX-M_2100_T02
COM_CVV65BSX-M\\COM_CVV65BSX-M_2100_T02
[4] COM_CVV65BSX-M\\COM_CVV65BSX-M_2100_T02
COM_CVV65BSX-M\\COM_CVV65BSX-M_2100_T02
COM_CVV65BSX-M\\COM_CVV65BSX-M_2100_T02
There's duplication at the beginning of the string in the file and I wish to retain everything beyond the \ or \ such that COM is the manufacturer, CVV65BSX-M is model, 2100 is the band and T02 is the tilt.
I tried incorporating Hadley Wickham's colsplit function within a transform function but I kept being prompted for additional information which I couldn't crack.
If anyone has a suggestion as to how I can split this particular column in my original data frame I would be delighted to hear from you. Attached is a link to a sample of the data that I am using and wish to split, in particular column "P" is of interest.
This is the data frame I am working with right now:
AtollInService <- with(Atoll, Atoll[!grepl("[_()]", NOMINAL_ID) & grepl("InService", MILESTONE) & grepl("^[A-Z][A-Z][0-9]{4}$", NOMINAL_ID) & !grepl("[L18]+[L08]", THREE_G_CELL_ID), ])
Could I incorporate a string split function just after the end square bracket and the end closed bracket?
\nor a tab\t