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

Crash of xpose.data when TIME column missing #11

Open
rikardn opened this issue Apr 9, 2019 · 3 comments
Open

Crash of xpose.data when TIME column missing #11

rikardn opened this issue Apr 9, 2019 · 3 comments
Assignees

Comments

@rikardn
Copy link
Member

rikardn commented Apr 9, 2019

I run a simple model (pheno) with the following (admittedly minimal) table:

$TABLE ID NOAPPEND NOPRINT ONEHEADER FILE=sdtab1

When trying to read the results into an xpdb with xpose.data it crashes with the following trace:

Error in (function (cl, name, valueClass) : assignment of an object of class “numeric” is not valid for @‘Data’ in an object of class “xpose.data”; is(value, "data.frame_or_NULL") is not TRUE
4.stop(gettextf("assignment of an object of class %s is not valid for @%s in an object of class %s; is(value, \"%s\") is not TRUE", dQuote(valueClass), sQuote(name), dQuote(cl), slotClass), domain = NA)
3.(function (cl, name, valueClass) { ClassDef <- getClass(cl) slotClass <- ClassDef@slots[[name]] ...
2.`Data<-`(`*tmp*`, value = tmp)
1.xpose4::xpose.data(xpose.runno, directory = results.directory, tab.suffix = tab.suffix, mod.prefix = mod.prefix, mod.suffix = mod.suffix)

Adding the column TIME to the sdtab1 stops xpose from crashing.

@andrewhooker
Copy link
Collaborator

By default xpose4 expects the 'standard' parameters to be found in NONMEM table output. This includes IWRE, IPRE, TIME, and the NONMEM default items (DV, PRED, RES and WRES) that are added when NOAPPEND is not present in the $TABLE record. If you remove NOAPPEND then your example should work.

@rikardn
Copy link
Member Author

rikardn commented Apr 9, 2019

Ok, but in other cases xpose give helpful error messages to what is missing. For example when trying to create a basic gof plot I get:

 -----------Variable(s) not defined!-------------
 iwres is/are not defined in the current database
 and must be defined for this command to work!
 ------------------------------------------------

It would be helpful if xpose could do the same here.

@andrewhooker
Copy link
Collaborator

Yes ... true ... will add a better error message ... thanks

@andrewhooker andrewhooker reopened this Apr 9, 2019
@andrewhooker andrewhooker self-assigned this Apr 9, 2019
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

2 participants