Context: I have uploaded the zip file of the proper package version related to the R version inside the src dir of the compute instance. I have the following code:
# R version: 3.5.1
# The script MUST contain a function named azureml_main
# which is the entry point for this module.
# Please note that functions dependant on X11 library
# such as "View" are not supported because X11 library
# is not pre-installed.
# The entry point function MUST have two input arguments.
# If the input port is not connected, the corresponding
# dataframe argument will be null.
# Param<dataframe1>: a R DataFrame
# Param<dataframe2>: a R DataFrame
azureml_main <- function(dataframe1, dataframe2)
{
print("script run.")
install.packages("src/dynlm.zip", lib = ".", repos = NULL, type = "source", dependencies = TRUE)
print("Install phase passed.")
library(dynlm)
print("library phase passed.")
require(zoo)
require(stats)
# Specify which Packages are required to run script. The dynlm package needs to be zipped up with this script to work in Azure ML.
require(data.table)
return(list(dataset1=dataframe1, dataset2=dataframe2))
}
I tried different solutions but I still get the error there is no package called ‘dynlm’ even though I think I clearly specify the installation. What can I do? Side details: before I did other tries, I did some downgrades
let me know if you need more context. I considered dockerizing the code
workaround:
install.packages("r-cran-dynlm", repos = "https://git.launchpad.net/ubuntu/+source/r-cran-dynlm", dependencies=TRUE)