Hello dears,
Kindly i need your usual support please,
I'm trying to get some summaries from a data-frame using many conditions to calculate count_if,sum_if,mean_if,....
i have read that expss package can do that.But,
i can't install related packages.
the error appears while installing expss ;
install.packages("expss")
Error :
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/hady.shaaban/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘htmlTable’
There is a binary version available but the source version is later:
binary source needs_compilation
htmlTable 1.13.2 1.13.3 FALSE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/expss_0.10.1.zip'
Content type 'application/zip' length 1886664 bytes (1.8 MB)
downloaded 1.8 MB
package ‘expss’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\hady.shaaban\AppData\Local\Temp\Rtmp8i5LFK\downloaded_packages
installing the source package ‘htmlTable’
trying URL 'https://cran.rstudio.com/src/contrib/htmlTable_1.13.3.tar.gz'
Content type 'application/x-gzip' length 173116 bytes (169 KB)
downloaded 169 KB
Warning in install.packages :
installation of package ‘htmlTable’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\hady.shaaban\AppData\Local\Temp\Rtmp8i5LFK\downloaded_packages’
then i tried to install htmlTable package
install.packages("htmlTable")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/hady.shaaban/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
htmlTable 1.13.2 1.13.3 FALSE
installing the source package ‘htmlTable’
trying URL 'https://cran.rstudio.com/src/contrib/htmlTable_1.13.3.tar.gz'
Content type 'application/x-gzip' length 173116 bytes (169 KB)
downloaded 169 KB
Warning in install.packages :
installation of package ‘htmlTable’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\hady.shaaban\AppData\Local\Temp\Rtmp8i5LFK\downloaded_packages’
how can i install these two packages to be able to use functions of expss ??
thanks in advance
Regards
This is telling you that you need to install RTools in order to install these packages. That means that binary versions of the package are not available for the current version so you need to install RTools to build it from source locally. You can install RTools from this link
It is not an R package. It is a windows executable that contains all the necessary tools and compilers to build R packages. You need to download it from the link above and then install it by following the prompts.
downloaded and installed. But now i'm trying to install now :
install.packages("expss","htmlTable",dependencies = TRUE)
library(expss)
library(htmlTable)
also installing the dependency ‘htmlTable’
There is a binary version available but the source version is later:
binary source needs_compilation
htmlTable 1.13.2 1.13.3 FALSE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/expss_0.10.1.zip'
Content type 'application/zip' length 1886664 bytes (1.8 MB)
downloaded 1.8 MB
package ‘expss’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\hady.shaaban\AppData\Local\Temp\Rtmp80ymTb\downloaded_packages
installing the source package ‘htmlTable’
trying URL 'https://cran.rstudio.com/src/contrib/htmlTable_1.13.3.tar.gz'
Content type 'application/x-gzip' length 173116 bytes (169 KB)
downloaded 169 KB
Warning in install.packages :
installation of package ‘htmlTable’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\hady.shaaban\AppData\Local\Temp\Rtmp80ymTb\downloaded_packages’
> library(expss)
Error: package or namespace load failed for ‘expss’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘htmlTable’
Still same error appears ,
Do you know why @tbradley ?
thanks man for your support
There is a binary version available but the source version is later:
binary source needs_compilation
htmlTable 1.13.2 1.13.3 FALSE
Does it work if you install the binary directly rather than compile from source? Usually when I see this it asks if I want to install the binary, or go ahead and compile from source.
PS I see you've tagged this as rstudio. Does it install properly for you from the command line but not in RStudio? If not, you can go ahead and delete the RStudio tag, since it's not a problem with the IDE
Thanks @mara
So i only know one method to install a package using the function of install.packages()
Is there another way to install packages ?? i tried to search but couldn't find the solution.
i choosed yes , then the below error appeared for me
> install.packages('htmlTable_1.13.2.zip', lib='C:/Program Files/R/R-3.6.1/library',repos = NULL)
Warning in install.packages :
'lib = "C:/Program Files/R/R-3.6.1/library"' is not writable
Error in install.packages : zip file ‘htmlTable_1.13.2.zip’ not found
i tried again , and at this time i choosed No,
This message appeared
> install.packages('htmlTable_1.13.2.zip', lib='C:/Program Files/R/R-3.6.1/library',repos = NULL)
Warning in install.packages :
'lib = "C:/Program Files/R/R-3.6.1/library"' is not writable
Error in install.packages : unable to install packages
Should i do another different solution ?
Much appreciated
install.packages('htmlTable_1.13.2', lib='C:/Program Files/R/R-3.6.1/library',repos = NULL)
Error in install.packages : type == "both" cannot be used with 'repos = NULL'
where 'htmlTable_1.13.2' is same name of the downloaded zipped file
and when i wrote its name as 'htmlTable_1.13.2.zip'
this error occured Error in install.packages : zip file ‘htmlTable_1.13.2.zip’ not found
Assuming the downloaded file (i.e. htmlTable_1.13.2.zip) is located at your current working directory, this command should work on RStudio running as administrator