This is Fortran format that is trying to keep within the alloted spaced
for the number while expressing values less than 1e-100.  Users may
select the following format to express the exponent over 3 digits
instead of the usual 2:
 
FORMAT=s,1PE16.8E3
 
the FORMAT option may be used on $EST or $TABLE statements (these act
only on FILE outputted tables).
 
 

Robert J. Bauer, Ph.D.
Vice President, Pharmacometrics
ICON Development Solutions 

Tel: (215) 616-6428
Mob: (925) 286-0769
Email: [email protected]
Web: www.icondevsolutions.com 

 

 

 

________________________________

From: [email protected] [mailto:[email protected]]
On Behalf Of Fidler,Matt,FORT WORTH,R&D
Sent: Tuesday, September 14, 2010 9:33 AM
To: Justin Wilkins; Chandramouli Radhakrishnan
Cc: [email protected]
Subject: RE: [NMusers] is there a way to change fit to csv



Chandramouli,

 

Justin's solution is elegant and works on most datasets produced.
However, occasionally NONMEM outputs "numbers" formatted like the
following 1.00-103 which should be 1.00E+103.  I have created a small
function that reads in NONMEM datasets and fixes this problem:

 

 

read.nm<-function(file,na.strings=c("NA","."),...){

nmf<-readLines(file,n=-1)[-1]

nmf<-gsub("+",",",nmf)

nmf<-gsub("^,","",nmf)

nmf<-gsub("([0-9])([-+])([0-9])","\\1E\\2\\3",nmf)

tf<-tempfile()

cat(nmf,file=tf,sep="\n")

d<-read.csv(tf,na.strings=na.strings,...)

unlink(tf)

return(d)

}

 

Once this function is sourced, all you need to do is read NONMEM in
through the new function:

 

d<- read.nm("table.tbl")

 

 

Matt.

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Justin Wilkins
Sent: Tuesday, September 14, 2010 1:24 AM
To: Chandramouli Radhakrishnan
Cc: [email protected]
Subject: Re: [NMusers] is there a way to change fit to csv

 

Dear Chandramouli

Typically something like

> fit <- read.table("run1.fit", head=T, skip=1) 

(where run1.fit is a typical NONMEM table file, with headers) should do
what you need. If not, have a look at the NONMEM table in a text editor
- NONMEM tables are basically space-delimited text files, which R's
read.table function ought to be able to handle easily.

Best
Justin

On 14 September 2010 07:42, Chandramouli Radhakrishnan
<[email protected]> wrote:

Hi 

 

I am trying to use R to produce plots from NONMEM fit file. However, I
could not get R to read the fit file

Can any one help?

 

 

Kind Regards

 

Chandramouli Radhakrishnan

 

 

 

 

 




-- 
Justin Wilkins
-----------------------------
Colmarerstrasse 31
4055 Basel
Switzerland
-----------------------------
Email: [email protected]
Skype: kestrel_za2002
Mobile: +41 76 561 0949


________________________________

This e-mail (including any attachments) is confidential and may be
legally privileged. If you are not an intended recipient or an
authorized representative of an intended recipient, you are prohibited
from using, copying or distributing the information in this e-mail or
its attachments. If you have received this e-mail in error, please
notify the sender immediately by return e-mail and delete all copies of
this message and any attachments.

Thank you.


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

Reply via email to