0

I'm currently trying to create a data frame that I can write to a CSV, where one columns has several different element types. Here they are listed below:

"dv_select": chr
"remove_penalty": int
"alpha": num
"force_penalty": num
"pmax": int
"remove": list of chrs    
"force": list of chrs

The names on the left represent one column, while the element types are what populate the adjacent column. "remove" and "force" can both range from 0 to a list of hundreds of strings. The data frame is able to successfully be created when remove and force contain either 0 or 1 string. However, either of them contains more than 1 string, I receive the following error:

Warning: Error in data.frame: arguments imply differing number of rows: 7, 2

I need the data in the correct format in order to read it back into my Shiny app, so any help would be greatly appreciated.

Thanks!

camille
  • 16,432
  • 18
  • 38
  • 60
  • Please [see here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on making an R question folks can easily answer. Right now we have no idea what's going on with your data, but you can post a representative sample of it with `dput` – camille Jul 17 '18 at 17:38
  • Can't you save as RDS? (Using `saveRDS`) – moodymudskipper Jul 17 '18 at 17:45

0 Answers0