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

rename() Changes Variable Type #168

Open
billdenney opened this issue Oct 14, 2019 · 0 comments
Open

rename() Changes Variable Type #168

billdenney opened this issue Oct 14, 2019 · 0 comments

Comments

@billdenney
Copy link
Contributor

When I rename a variable, its type changes from whatever it was before to na:

library(xpose)
#> Loading required package: ggplot2
#> 
#> Attaching package: 'xpose'
#> The following object is masked from 'package:stats':
#> 
#>     filter
list_vars(xpdb_ex_pk)
#> 
#> List of available variables for problem no. 1 
#>  - Subject identifier (id)               : ID
#>  - Dependent variable (dv)               : DV
#>  - Independent variable (idv)            : TIME
#>  - Dose amount (amt)                     : AMT
#>  - Event identifier (evid)               : EVID
#>  - Model typical predictions (pred)      : PRED
#>  - Model individual predictions (ipred)  : IPRED
#>  - Model parameter (param)               : KA, CL, V, ALAG1
#>  - Eta (eta)                             : ETA1, ETA2, ETA3
#>  - Residuals (res)                       : CWRES, IWRES, RES, WRES
#>  - Categorical covariates (catcov)       : SEX, MED1, MED2
#>  - Continuous covariates (contcov)       : CLCR, AGE, WT
#>  - Compartment amounts (a)               : A1, A2
#>  - Not attributed (na)                   : DOSE, SS, II, TAD, CPRED
#> 
#> List of available variables for problem no. 2 
#>  - Subject identifier (id)               : ID
#>  - Dependent variable (dv)               : DV
#>  - Independent variable (idv)            : TIME
#>  - Dose amount (amt)                     : AMT
#>  - Event identifier (evid)               : EVID
#>  - Model individual predictions (ipred)  : IPRED
#>  - Not attributed (na)                   : DOSE, TAD, SEX, CLCR, AGE, WT
xpdb_new <- rename(xpdb_ex_pk, AMT2=AMT)
list_vars(xpdb_new)
#> 
#> List of available variables for problem no. 1 
#>  - Subject identifier (id)               : ID
#>  - Dependent variable (dv)               : DV
#>  - Independent variable (idv)            : TIME
#>  - Event identifier (evid)               : EVID
#>  - Model typical predictions (pred)      : PRED
#>  - Model individual predictions (ipred)  : IPRED
#>  - Model parameter (param)               : KA, CL, V, ALAG1
#>  - Eta (eta)                             : ETA1, ETA2, ETA3
#>  - Residuals (res)                       : CWRES, IWRES, RES, WRES
#>  - Categorical covariates (catcov)       : SEX, MED1, MED2
#>  - Continuous covariates (contcov)       : CLCR, AGE, WT
#>  - Compartment amounts (a)               : A1, A2
#>  - Not attributed (na)                   : DOSE, SS, II, TAD, CPRED, AMT2
#> 
#> List of available variables for problem no. 2 
#>  - Subject identifier (id)               : ID
#>  - Dependent variable (dv)               : DV
#>  - Independent variable (idv)            : TIME
#>  - Event identifier (evid)               : EVID
#>  - Model individual predictions (ipred)  : IPRED
#>  - Not attributed (na)                   : DOSE, TAD, SEX, CLCR, AGE, WT, AMT2

Created on 2019-10-14 by the reprex package (v0.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants