I have a data frame like this:
x
TicketID Application Impacted_Systems
1 Web Online; PeopleSoft, Financials
etc
what I like to do is create another data.frame based on x$Impacted_Systems put each items separated by “;” to its own colum, then compine it with data frame x to graph it.
I have this so far:
data.frame(do.call('rbind', strsplit(as.character(x$Impacted_Systems),';')))
this creates the columns for each string separated by “;” twice:
X1 X2 X3 X4 X5 X6 X7
1 Online PeopleSoft Financials Online PeopleSoft Financials Online
any ideas what I am doing wrong? In this particular case there should be only 3 columns, not 7.
I tried this
p<-colsplit(x$Impacted_Systems, ";")
this is expecting names option. The problem is number of impacted systems will vary, it is not fixed.
1 Answer