-
Notifications
You must be signed in to change notification settings - Fork 0
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
Permissions for writemrgsolve #37
Comments
Hi Ali, Are you getting any warning or error messages? Can you try writing a test file using the below code and let me know whether that works? ` tmp_pth <- paste0(tmp_dir,"Test.R") |
SepassionAcademy post (in discussions, copied here to issues): Hi Andy I did try to use the code but it does not work, I have a modified version that works fine for me. I made some local modifications to the writemrgsolve function, which works fine now. However I am not able to incorporate this in to the main nonmemtomrgsolve function FUNCTION WRITE MRGSOLVE#' Write the mrgsolve code to an R file writemrgsolve <- function(mrg_code = NULL, filename = "mrgsolve_code0", dir = NULL){ tdir <- ifelse(is.na(dir) | is.null(dir), "", paste0(dir,"/")) Prepare the content to be written to the filefile_content <- c("code <- '", mrg_code$V1, "'") Write the contents to the filewriteLines(file_content, nme_pth) print("Mrgsolve Code was Saved to an R File") |
SepassionAcademy post (in discussions, copied here to issues): These are the errors that I get currently: I have checked the permission to creating files in my cloud and there are no issues there. |
@SepassionAcademy Sorry for the delay getting back to you, I was traveling for ACoP. It does look like there is a read/write permission issue based on those error messages. For your workaround, did the R file that writeLines() wrote to already exist? Or was it created by your modified writemrgsolve function? From the above code you sent, it looked like the R file already existed...? Which makes me suspect that you have access to create/edit files, but that when you are running R it is not being ran as administrator which then creates the "Permission denied" when trying to create the R file to write the output to. If it's possible, could you delete any files that nonmem2mrgsolve would write to (or change the output file name), then try to run R as administrator (if possible), and then re-test the default/original nonmem2mrgsolve? In the meantime, I'll think about what else we could do to get this working for you. Thanks, |
Hi again, thank you for your response. I have managed to fix the previously mentioned issues and I can run the examples that you have provided correctly. It seems to me that the translation is fine for 1 and 2 compartment models. The accuracy is not super high as you also have mentioned in the code. Moreover, the differential equations must be written explicitly. As you know many NONMEM users use functions such as ADVAN1 etc instead of writing the equations explicitly. Is it possible to take this in to account in translation without writing the equations explicitly. Maybe we could meet on google meets to talk about improvements. I am tasked in Novo Nordisk to implement this package in our day to day work and we are really interested. Thank you in advance |
Another issue is that some of the comments in the code get deleted, when model translation is happening. I think from a practical and pedagogical point of view it would be nice to have the comments in the translated code. |
Glad to hear the permission issue was resolved. I do have an enhancement issue open for building in the other advans (issue #28) and hope to get to that. I will open a new issue regarding your suggestion about retaining comments and will then close this one. I would be happy to discuss over a google meet. Please reach out over email ([email protected]) and we can set up a time. Thanks, Andy |
Dear Andy, I have started exploring nonmemtomrgsolve. I get the correct output in the console, but for some reason I do not get the R file. I only get an empty R file. I have so far tried the 1 compartment model from the example that you have provided. What can I do in this regard? thanks in advance Ali
Originally posted by @SepassianAcademy in #33 (comment)
The text was updated successfully, but these errors were encountered: