Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulated data file comma separated does not permit comma separated headers #3

Open
CSJCampbell opened this issue Nov 13, 2017 · 0 comments

Comments

@CSJCampbell
Copy link

CSJCampbell commented Nov 13, 2017

In read_nm_table/read_nm_tab_readr_1 ~line 11 strsplit does not replace ",". This means space separated header row is needed for comma separated file. It would be nice if table titles could be removed only if present.

library(ncappc)
# fake data
colnames(Theoph) <- c("ID", "WT", "DOSE", "TIME", "DV")
TheophSim <- rbind(
  cbind(Theoph, NSUB = 1), 
  cbind(Theoph, NSUB = 2))
TheophSim$DV <- TheophSim$DV + rnorm(n = nrow(TheophSim))
# fake sim file comma separated
cat("Table 1\n", file = "theo_sim.tab")
suppressWarnings(write.table(TheophSim, file = "theo_sim.tab", 
  append = TRUE, sep = ",",
  row.names = FALSE, quote = FALSE))
# in read_nm_table/read_nm_tab_readr_1 ~line 11 
# strsplit does not replace ","
ncappc(
  obsFile = Theoph, 
  simFile = "theo_sim.tab",
  noPlot = TRUE, 
  printOut = FALSE, 
  psnOut = FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant