question

Upvotes
Accepted

Package DatastreamDSWS2R installation error

I am trying to work with DatastreamDSWS2R to import data directly from Datastream to R.

Unfortunately, I have problems with the installation: here is my code:

install.packages("devtools")
require(devtools)
install_github("CharlesCara/DatastreamDSWS2R")

When install_github is running I get the following error:

Installing package into ‘F:/Maximilian/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
* installing *source* package 'DatastreamDSWS2R' ...
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called 'dplyr'
ERROR: lazy loading failed for package 'DatastreamDSWS2R'
* removing 'F:/Maximilian/Documents/R/win-library/3.4/DatastreamDSWS2R'
Error: Failed to install 'DatastreamDSWS2R' from GitHub:
  (converted from warning) running command '"D:/R/R-3.4.2/bin/x64/R" CMD INSTALL -l "F:\Maximilian\Documents\R\win-library\3.4" "C:/Users/MAXIMI~1/AppData/Local/Temp/RtmpIXHIwB/file38b477f52ad7/DatastreamDSWS2R_1.5.12.tar.gz"' had status 1

Does anyone have suggestions on solving this problem? Thanks in advance!

datastream-apidsws-apisetup
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
39.2k 75 11 27

The clue is the line saying "there is no package called 'dplyr'". DatastreamDSWS2R package has dependency on dplyr package, which you don't appear to have installed.
Install dplyr package from CRAN and then try installing DatastreamDSWS2R again.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes

Hello @Alex Putkov

Thank you! Installation seems to work now, but there is still a problem: I still cannot use basic formulas presented in the Getting started with R documentation, for example:

mydsws <-dsws$new()

I get the message:

Error: object 'dsws' not found

After install_github I get this output:

> install_github("CharlesCara/DatastreamDSWS2R", force = TRUE)
Downloading GitHub repo CharlesCara/DatastreamDSWS2R@master
These packages have more recent versions available.
Which would you like to update?

1: All                            
2: CRAN packages only             
3: None                           
4: zoo     (1.8-5 -> 1.8-6) [CRAN]
5: curl    (3.3   -> 4.0  ) [CRAN]
6: mime    (0.6   -> 0.7  ) [CRAN]
7: openssl (1.3   -> 1.4.1) [CRAN]
8: sys     (3.2   -> 3.3  ) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
3
√  checking for file 'C:\Users\Maximilian\AppData\Local\Temp\Rtmp2z1Bho\remotes20f030ee247\CharlesCara-DatastreamDSWS2R-43480a9/DESCRIPTION'
-  preparing 'DatastreamDSWS2R':
√  checking DESCRIPTION meta-information ... 
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  looking to see if a 'data/datalist' file should be added
-  building 'DatastreamDSWS2R_1.5.12.tar.gz'
   
Installing package into ‘F:/Maximilian/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
* installing *source* package 'DatastreamDSWS2R' ...
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (DatastreamDSWS2R)
> 
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
39.2k 75 11 27

You need to load the package before you can call its members.

library(DatastreamDSWS2R)
It appears you've never used R before. You may want to do some reading on the basics of R. Here's one resource you could use to help you get going.
https://www.computerworld.com/article/2497143/business-intelligence-beginner-s-guide-to-r-introduction.html
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea