Installing Package, downloaded binary packages

I have never used RStudio before, and have zero code knowledge. I am using this for a political research methods class, and am completely lost on a final project. I need to download "poliscidata" and I have, however it keeps saying:

The downloaded binary packages are in
/var/folders/d7/60f0nfg95d5d8rrksgkngjcr0000gn/T//RtmpbrXqZO/downloaded_packages

I have no idea what this means, I have the polscidata in my folders it looks like this.:

I would really appreciate any help, I am so lost, and my professor also does not know what to do!

Thank you soo so much
Isha

You do not need the binaries. Those are for the hard-core addicts.

You should be able to install the package with the command:
install.packages("poliscidata")

To use it, issue the command:

library(poliscidata)

If you are completely new to R a glance at https://www.statmethods.net/r-tutorial/index.html may help and save you a lot of time.

hello!
When I type that and click run it just says:
install.packages("poliscidata")
Installing package into ‘/Users/ishanigam/Library/R/4.0/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/poliscidata_2.3.0.tgz'
Content type 'application/x-gzip' length 3394679 bytes (3.2 MB)

downloaded 3.2 MB

The downloaded binary packages are in
/var/folders/d7/60f0nfg95d5d8rrksgkngjcr0000gn/T//RtmpNmGDqC/downloaded_packages

I feel the need to clarify this statement:

You do not need the binaries. Those are for the hard-core addicts.

This is not really true, in fact the exact opposite is likely more true. The binaries are pre-compiled versions of R packages. These binaries make it much easier to install packages for novice users. Without these, users would have to compile the source code to install/build the packages. If @ishanigam, has limited coding background what I just wrote might seem like non-sense, the bottom line is that the CRAN team has done some extra work behind the scenes to make these packages easier to install, and the binaries are the result of this work.

@ishanigam You have installed the package correctly. The messages you are seeing are a sign that things have gone well. Now that you have installed the package you want, you can load the package in R by running the code: library(poliscidata). If all goes well nothing will happen (sorta strange, right?). But this just means the package is loaded and ready to use.

Lastly, the message below just tells you where R downloaded the package on your computer before installing it. This is a temporary folder that R uses when installing packages. It gets deleted when the R session is closed. Nothing to worry about.

The downloaded binary packages are in
/var/folders/d7/60f0nfg95d5d8rrksgkngjcr0000gn/T//RtmpNmGDqC/downloaded_packages

1 Like

@mattwarkentin hi thank you so much, but when I ran library("poliscidata") it said this:

library(poliscidata)
Error: package or namespace load failed for ‘poliscidata’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/png/libs/png.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/png/libs/png.so, 6): Symbol not found: _inflateValidate
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/png/libs/png.so (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libz.1.dylib
in /Library/Frameworks/R.framework/Versions/4.0/Resources/library/png/libs/png.so

@mattwarkentin even if I type the poliscidata without the quotation marks, it still says the whole error message :frowning:

The poliscidata package has been correctly installed but you have a problem with the png package, can you try reinstalling this package? Do you get any error messages?

install.packages("png")

Also, can you check if you have an updated version of xquartz installed in your system?

@andresrcs I updated the "png" and it says this:

install.packages("png")
Installing package into ‘/Users/ishanigam/Library/R/4.0/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/png_0.1-7.tgz'
Content type 'application/x-gzip' length 369557 bytes (360 KB)

downloaded 360 KB

The downloaded binary packages are in
/var/folders/d7/60f0nfg95d5d8rrksgkngjcr0000gn/T//RtmpoQnIRE/downloaded_packages

I also updated xquartz and restarted my computer before trying the png thing! Please let me know if you need some more information in order to help!

Appreciate it so so much!

@andresrcs the console also says this once i tried that:
Error: package or namespace load failed for ‘png’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/ishanigam/Library/R/4.0/library/png/libs/png.so':
dlopen(/Users/ishanigam/Library/R/4.0/library/png/libs/png.so, 6): Symbol not found: _inflateValidate
Referenced from: /Users/ishanigam/Library/R/4.0/library/png/libs/png.so (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libz.1.dylib
in /Users/ishanigam/Library/R/4.0/library/png/libs/png.so
starting httpd help server ... done
Error: package or namespace load failed for ‘poliscidata’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/ishanigam/Library/R/4.0/library/png/libs/png.so':
dlopen(/Users/ishanigam/Library/R/4.0/library/png/libs/png.so, 6): Symbol not found: _inflateValidate
Referenced from: /Users/ishanigam/Library/R/4.0/library/png/libs/png.so (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libz.1.dylib
in /Users/ishanigam/Library/R/4.0/library/png/libs/png.so

yes i still get the same error message! :frowning:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.