R studio trying to start plm

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.

You are missing this dependency, try installing it

install.packages("miscTools")

library(plm)
Loading required package: Formula

I believe that means it is installed?

am i correct? I am new to R studio

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

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

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)

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

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.