Re: [R] transpose and split dataframe

2019-04-30 Thread Jim Lemon
Hi Matthew, Is this what you are trying to do? mmdf<-read.table(text="Regulatorhits AT1G69490AT4G31950,AT5G24110,AT1G26380,AT1G05675 AT2G55980AT2G85403,AT4G89223",header=TRUE, stringsAsFactors=FALSE) # split the second column at the commas hitsplit<-strsplit(mmdf$hits,",") # define a f

Re: [R] transpose and split dataframe

2019-04-30 Thread David L Carlson
e Station, TX 77843-4352 -Original Message- From: R-help On Behalf Of Matthew Sent: Tuesday, April 30, 2019 2:25 PM To: r-help (r-help@r-project.org) Subject: [R] transpose and split dataframe I have a data frame that is a lot bigger but for simplicity sake we can say it looks like

[R] transpose and split dataframe

2019-04-30 Thread Matthew
I have a data frame that is a lot bigger but for simplicity sake we can say it looks like this: Regulator    hits AT1G69490    AT4G31950,AT5G24110,AT1G26380,AT1G05675 AT2G55980    AT2G85403,AT4G89223    In other words: data.frame : 2 obs. of 2 variables $Regulator: Factor w/ 2 levels $hits