Title: R package ( qdapTools) version not getting detected correctly in Azure ML
Tags: r;azure-machine-learning-studio;qdap
Question: I'm trying to install qdap package in Azure ML. Rest of the dependent packages get installed without any issues. When it comes to qdapTools, I get this error , though the version that I try to install is 1.3.1 ( Verified this from the Decription file that comes with the R package)
package 'qdapTools' 1.1.0 was found, but &gt;= 1.3.1 is required by 'qdap
The code in "Execute R Script" :
install.packages("src/qdapTools.zip", repos = NULL, verbose = TRUE)
install.packages("src/magrittr.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/stringi.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/stringr.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/qdapDictionaries.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/qdapRegex.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/RColorBrewer.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/qdap.zip", lib = ".", repos = NULL, verbose = TRUE)
library(stringr, lib.loc=".", verbose=TRUE)
library(qdap, lib.loc=".", verbose=TRUE)
And the log :
[ModuleOutput] End R Execution: 9/22/2016 6:44:44 AM
[Stop]     DllModuleMetho75b5:f2c1:f5d7:b954:8dc3:cee9:baf:a8c0Execute. Duration = 00:00:16.7828106
[Critical]     Error: Error 0063: The following error occurred during evaluation of R script:
---------- Start of error message from R ----------
package 'qdapTools' 1.1.0 was found, but &gt;= 1.3.1 is required by 'qdap'
package 'qdapTools' 1.1.0 was found, but &gt;= 1.3.1 is required by 'qdap'
----------- End of error message from R -----------
[Critical]     {"InputParameters":{"DataTable":[{"Rows":2,"Columns":1,"estimatedSize":11767808,"ColumnTypes":{"System.String":1},"IsComplete":true,"Statistics":{"0":[2,0]}}],"Generic":{"bundlePath":"..\\..\\Script Bundle\\Script Bundle.zip","rLibVersion":"R310"},"Unknown":["Key: rStreamReader, ValueType : System.IO.StreamReader"]},"OutputParameters":[],"ModuleType":"LanguageWorker","ModuleVersion":" Version=151.154.11.224","AdditionalModuleInfo":"LanguageWorker, Version=151.154.11.224, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.MetaAnalytics.LanguageWorker.LanguageWorkerClientRS;RunRSNR","Errors":"Microsoft.Analytics.Exceptions.ErrorMapping+ModuleException: Error 0063: The following error occurred during evaluation of R script:\r\n---------- Start of error message from R ----------\r\npackage 'qdapTools' 1.1.0 was found, but &gt;= 1.3.1 is required by 'qdap'\r\n\r\n\r\npackage 'qdapTools' 1.1.0 was found, but &gt;= 1.3.1 is required by 'qdap'\r\n----------- End of error message from R -----------\r\n   at Microsoft.MetaAnalytics.LanguageWorker.LanguageWorkerClientRS.ExecuteR(NewRWorker worker, DataTable dataset1, DataTable dataset2, IEnumerable`1 bundlePath, StreamReader rStreamReader, Nullable`1 seed) in d:\\_Bld\\8831\\7669\\Sources\\Product\\Source\\Modules\\LanguageWorker\\LanguageWorker.Dll\\EntryPoints\\RModule.cs:line 287\r\n   at Microsoft.MetaAnalytics.LanguageWorker.LanguageWorkerClientRS._RunImpl(NewRWorker worker, DataTable dataset1, DataTable dataset2, String bundlePath, StreamReader rStreamReader, Nullable`1 seed, ExecuteRScriptExternalResource source, String url, ExecuteRScriptGitHubRepositoryType githubRepoType, SecureString accountToken) in d:\\_Bld\\8831\\7669\\Sources\\Product\\Source\\Modules\\LanguageWorker\\LanguageWorker.Dll\\EntryPoints\\RModule.cs:line 207\r\n   at Microsoft.MetaAnalytics.LanguageWorker.LanguageWorkerClientRS.RunRSNR(DataTable dataset1, DataTable dataset2, String bundlePath, StreamReader rStreamReader, Nullable`1 seed, ExecuteRScriptRVersion rLibVersion) in d:\\_Bld\\8831\\7669\\Sources\\Product\\Source\\Modules\\LanguageWorker\\LanguageWorker.Dll\\EntryPoints\\REntryPoint.cs:line 105","Warnings":[],"Duration":"00:00:16.7752607"}
Module finished after a runtime of 00:00:17.1411124 with exit code -2
Module failed due to negative exit code of -2
Record Ends at UTC 09/22/2016 06:44:44.
Editing the code to :
install.packages("src/qdapTools.zip",lib="." , repos = NULL, verbose = TRUE)
install.packages("src/qdapDictionaries.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/qdapRegex.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/RColorBrewer.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/qdap.zip", lib = ".", repos = NULL, verbose = TRUE)
library(qdapTools, lib.loc=".", verbose=TRUE)
library(qdap, lib.loc=".", verbose=TRUE)
throws the following error :-
[ModuleOutput] 4: package 'qdapTools' was built under R version 3.3.1
[ModuleOutput]
[ModuleOutput] End R Execution: 9/22/2016 7:11:05 AM
[Stop]     DllModuleMetho75b5:f2c1:f5d7:b954:8dc3:cee9:baf:a8c0Execute. Duration = 00:00:17.0656414
[Critical]     Error: Error 0063: The following error occurred during evaluation of R script:
---------- Start of error message from R ----------
package or namespace load failed for 'qdapTools'
package or namespace load failed for 'qdapTools'
----------- End of error message from R -----------
Not sure how to proceed, can someone help please.
Thanks!
Comment: What code are you using in your Execute R Script to install the package?  If you just do library(qdapTools) it will try to access its local installation (which may be out of date).  If you want to install from your zipfile, you need to wrap the CRAN zip file in another zip file, hook it up to your module and then install it using `install.packages("src/qdapTools.zip", lib = ".", repos = NULL, verbose = TRUE)` before calling `library(baselineforecast, lib.loc=".")` to load the library.

Comment: Could you please copy and paste the actual code you are using to install the the package in your "Execute R Script" so I can tell if there is a problem there?  Could you also copy and pasts your error log and output log?  A snapshot of your experiment to be sure it is set up right wouldn't hurt either.  Also, AML has the "livechat" service to support these kinds of errors which may be more helpful for you.

Comment: Newer versions of packages are not always backward compatible with older versions of R.  You may need to go into the archives and find an older version of `qdapTools`.

Comment: Have you tried to install it from CRAN or from .zip file? Perhaps the second approach will help you. Download the zip-file from https://cran.r-project.org/bin/windows/contrib/3.4/qdapTools_1.3.1.zip and then install it again. This is just a pure guess ...

Comment: @J_F - I did just that , downloaded the file from CRAN , added it to my zip and tried to install it. It didn't work.

Comment: @Barker - pretty much what I AM doing right now, doesnt help.

Comment: @user5249203 - I'm aware of the way to upload a new package to an Azure ML experiment. The issue here is specific to qdapTools on which qdap has a dependency. Details are in the question posted.

Comment: https://blogs.msdn.microsoft.com/benjguin/2014/09/24/how-to-upload-an-r-package-to-azure-machine-learning/


Here is another answer: This is kind of a shot in the dark, since I don't know the specifics of your system, but it could be that qdapTools 1.3.1 does not get installed to the location of the other packages, since the location specification also is missing from the first line of "Execute R Script" part where qdapTools gets installed:
lib="."
Which could result in R loading an older version of qdapTools (did you have an older version installed before?) that lies somewhere else.
Comment for this answer: This might be only a workaround, but what happens if you execute
`library(qdapTools, lib.loc=".", verbose=TRUE)`
before
`library(stringr, lib.loc=".", verbose=TRUE)
library(qdap, lib.loc=".", verbose=TRUE)`
Comment for this answer: hm, what R version do you run? This should work if you install a new R version >= 3.3.1.
I don't know how exactly you'd do that with Azure ML, but if you leave the script the way it is and install a new R this should hopefully work.
Comment for this answer: Updated it to                                             install.packages("src/qdapTools.zip",lib="." , repos = NULL, verbose = TRUE)                                                                                                                Still the same error. Created a new experiment , installed the newer version only, still doesnt work
Comment for this answer: Ok , I tried that too . I get the error                                       [ModuleOutput] 4: package 'qdapTools' was built under R version 3.3.1
[ModuleOutput]
[ModuleOutput] End R Execution: 9/22/2016 7:11:05 AM
[Stop]     DllModuleMetho75b5:f2c1:f5d7:b954:8dc3:cee9:baf:a8c0Execute. Duration = 00:00:17.0656414
[Critical]     Error: Error 0063: The following error occurred during evaluation of R script:
---------- Start of error message from R ----------
package or namespace load failed for 'qdapTools'
package or namespace load failed for 'qdapTools'
----------- End of error message from R -----------
Comment for this answer: Azure ML currently provides - CRAN R 3.1.0 and Microsoft R Open 3.2.2 . If what you say is true ,then I can't use qdap for now.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 8, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:09/14/16', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<r><azure-machine-learning-studio><qdap>', 'Title': 'R package ( qdapTools) version not getting detected correctly in Azure ML', 'ViewCount': 443, 'id': 39483984, 'user_AboutMe': "<p>Passionate about data and the 'magic' that can be witnessed by deciphering them - keen about researching and discovering about what and how things can be unlocked in the world of data science!\nThough I started as a web developer, now I am in love with data science :)</p>\n", 'user_AccountId': 2852327.0, 'user_DisplayName': 'Indi', 'user_Reputation': 1353.0, 'user_Views': 524.0, 'user_id': 2449260.0}}