Re: How to format output table as purely comma-separated file

From: Devin Pastoor Date: March 20, 2019 technical Source: mail-archive.com
data.table::fread should automatically detect the character separators and parse it (lightning fast and parallelized i might add), so if using R, that is a great swiss army knife that can read multihundred megabyte files virtually instantly. If that isn't working there is PKPDmisc::read_nonmem - I wrote that to automatically detect the separator characters, trim spaces, convert to csv, in cpp so quickly, then pass to read_csv under the hood. It also automatically parses NSUB/table statements out for simulation replicate files and works pretty well. It could be optimized more as I wrote it a couple years ago but it is stable and on CRAN. Devin
Quoted reply history
On Mon, Mar 18, 2019 at 10:45 PM Mark Tepeck <[email protected]> wrote: > I vote for *FORMAT=CSV*, which reads super intuitive and handy. I would > even expect it to be the default although this change sounds crazy for the > time being. > > Mark > > On Mon, Mar 18, 2019 at 8:50 PM Nick Holford <[email protected]> > wrote: > >> Hi Bob, >> >> I agree with Sebastien. This would be a useful option and even better if >> it was user friendly option like FORMAT=CSV which also converted from >> scientific format to general format (Excel format names). >> >> Best wishes, >> >> Nick >> >> >> >> *From:* [email protected] <[email protected]> *On >> Behalf Of *Sebastien Bihorel >> *Sent:* Tuesday, 19 March 2019 1:23 PM >> *To:* Robert Bauer <[email protected]> >> *Cc:* [email protected] >> *Subject:* Re: [NMusers] How to format output table as purely >> comma-separated file >> >> >> >> Hi, >> >> >> >> I think it would be a very useful option! >> >> >> >> Thanks >> >> >> ------------------------------ >> >> *From: *"Robert Bauer" <[email protected]> >> *To: *[email protected] >> *Sent: *Monday, March 18, 2019 2:20:15 PM >> *Subject: *RE: [NMusers] How to format output table as purely >> comma-separated file >> >> >> >> Well, this is not a strange behavior, this is a standard FORTRAN >> formatting process. >> >> Nonetheless, I can add a delimiter option that specifically removes >> spaces for future releases of NONMEM. >> >> >> >> >> >> Robert J. Bauer, Ph.D. >> >> Senior Director >> >> Pharmacometrics R&D >> >> ICON Early Phase >> >> 820 W. Diamond Avenue >> >> Suite 100 >> >> Gaithersburg, MD 20878 >> >> Office: (215) 616-6428 >> >> Mobile: (925) 286-0769 >> >> [email protected] >> >> www.iconplc.com >> >> >> >> *From:* [email protected] [mailto:[email protected] >> <[email protected]>] *On Behalf Of *Mark Tepeck >> *Sent:* Saturday, March 16, 2019 10:33 AM >> *To:* [email protected] >> *Cc:* Sebastien Bihorel; Emmanuel Chigutsa; Paul Hutson >> *Subject:* Re: [NMusers] How to format output table as purely >> comma-separated file >> >> >> >> Hi, >> >> >> >> I am also wondering why NONMEM has this strange behavior. Is there any >> possibility for the developer to fix that? at least to provide an option >> to exclude the space. >> >> >> >> Mark >> >> >> >> On Thu, Mar 14, 2019 at 6:31 PM Paul Hutson <[email protected]> wrote: >> >> Spaces as well, yes, but a simple click on the file opens nicely into >> EXCEL without Data/Text Import. Thank you. >> >> >> >> Paul Hutson, PharmD, BCOP >> >> Professor >> >> UWisc School of Pharmacy >> >> T: 608.263.2496 >> >> F: 608.265.5421 >> >> >> >> *From:* [email protected] <[email protected]> *On >> Behalf Of *Sebastien Bihorel >> *Sent:* Thursday, March 14, 2019 4:23 PM >> *To:* Emmanuel Chigutsa <[email protected]> >> *Cc:* [email protected] >> *Subject:* Re: [NMusers] How to format output table as purely >> comma-separated file >> >> >> >> Thanks for the input but I already tried that (or things along the line >> of FORMAT=,1PE11.4). Commas are indeed in the table file... but so are >> spaces. >> >> >> ------------------------------ >> >> *From: *"Emmanuel Chigutsa" <[email protected]> >> *To: *[email protected], "Sebastien Bihorel" < >> [email protected]> >> *Sent: *Thursday, March 14, 2019 3:47:15 PM >> *Subject: *Re: [NMusers] How to format output table as purely >> comma-separated file >> >> >> >> Hi Sebastien, >> >> >> >> Try the following example code, with the relevant pieces in red: >> >> >> >> $TABLE ID TIME CMT IPRED FORMAT=, FILE=mytab1.csv NOPRINT ONEHEADER >> >> >> >> Mannie >> >> >> >> On Wednesday, March 13, 2019, 9:14:21 AM EDT, Sebastien Bihorel < >> [email protected]> wrote: >> >> >> >> >> >> Hi, >> >> >> >> I was wondering if there is a way to create "pure" csv file with $TABLE. >> I have tried various things with the FORMAT option but always ended up with >> spaces in between entries (in addition to the comma delimiters). >> >> >> >> Is there a proper fortran format one can use in $TABLE to make this >> happen? >> >> >> >> Thanks in advance >> >> >> >> Sebastien >> >> >> >> >> >> >> >>