NONMEM Users Network Archive

Hosted by Cognigen

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

From: Devin Pastoor <devin.pastoor>
Date: Wed, 20 Mar 2019 19:29:50 -0400

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

On Mon, Mar 18, 2019 at 10:45 PM Mark Tepeck <mark.tepeck

> 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 <n.holford
> 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:* owner-nmusers
>> Behalf Of *Sebastien Bihorel
>> *Sent:* Tuesday, 19 March 2019 1:23 PM
>> *To:* Robert Bauer <Robert.Bauer
>> *Cc:* nmusers
>> *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" <Robert.Bauer
>> *To: *nmusers
>> *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
>>
>> Robert.Bauer
>>
>> www.iconplc.com
>>
>>
>>
>> *From:* owner-nmusers
>> <owner-nmusers
>> *Sent:* Saturday, March 16, 2019 10:33 AM
>> *To:* nmusers
>> *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 <paul.hutson
>>
>> 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:* owner-nmusers
>> Behalf Of *Sebastien Bihorel
>> *Sent:* Thursday, March 14, 2019 4:23 PM
>> *To:* Emmanuel Chigutsa <echigutsa
>> *Cc:* nmusers
>> *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" <echigutsa
>> *To: *nmusers
>> sebastien.bihorel
>> *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 <
>> sebastien.bihorel
>>
>>
>>
>>
>>
>> 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
>>
>>
>>
>>
>>
>>
>>
>> ICON plc made the following annotations.
>> ------------------------------------------------------------------------------
>>
>> This e-mail transmission may contain confidential or legally privileged
>> information that is intended only for the individual or entity named in the
>> e-mail address. If you are not the intended recipient, you are hereby
>> notified that any disclosure, copying, distribution, or reliance upon the
>> contents of this e-mail is strictly prohibited. If you have received this
>> e-mail transmission in error, please reply to the sender, so that ICON plc
>> can arrange for proper delivery, and then please delete the message.
>>
>> Thank You,
>>
>> ICON plc
>> South County Business Park
>> Leopardstown
>> Dublin 18
>> Ireland
>> Registered number: 145835
>>
>>

Received on Wed Mar 20 2019 - 19:29:50 EDT

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to: nmusers-request@iconplc.com.

Once subscribed, you may contribute to the discussion by emailing: nmusers@globomaxnm.com.