R studio trying to start plm

rstudio
#1

I am trying to start plm but it wont complete it

install.packages("plm")
Installing package into ‘C:/Users/Bryce Lupo/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/plm_1.7-0.zip'
Content type 'application/zip' length 2234239 bytes (2.1 MB)
downloaded 2.1 MB

package ‘plm’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Bryce Lupo\AppData\Local\Temp\RtmpicBYX8\downloaded_packages

library(plm)
Error: package or namespace load failed for ‘plm’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘miscTools’

please help me understand what is incorrect.

0 Likes

#2

You are missing this dependency, try installing it

install.packages("miscTools")
0 Likes

#3

library(plm)
Loading required package: Formula

I believe that means it is installed?

am i correct? I am new to R studio

0 Likes

#4
install.packages("plm")
Installing package into ‘C:/Users/Bryce Lupo/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/plm_1.7-0.zip'
Content type 'application/zip' length 2234239 bytes (2.1 MB)
downloaded 2.1 MB

package ‘plm’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Bryce Lupo\AppData\Local\Temp\RtmpA5unlN\downloaded_packages
library(plm)
Loading required package: Formula

this is the entire code

0 Likes

#5

I don't understand your question, but it seems like you already have correctly installed the plm package.

0 Likes

#6

yeah thank you very much! i have another question.

I am typing exactly like the assignment is telling me to. The data i am using has a variable named Country. I am confused why it would say that it does not exist?

attach(HaircutNEW1)
data <- pdata.frame(HaircutNEW1,index = "country",drop.index =FALSE, row.names=FALSE )
Error in pdata.frame(HaircutNEW1, index = "country", drop.index = FALSE, :
variable country does not exist (individual index)

0 Likes

#7

It's hard to know since I don't have access to "HaircutNEW" dataset, could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

Also, if you have a question about your homework, we encourage you to first contact your course instructor or teaching assistants directly. Firstly, that is what they are there for. Also, your questions serve as good feedback to help them improve how they teach the course.

1 Like

closed #8

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes