Error in install.packages : type == "both" cannot be used with 'repos = NULL'

Yes this question, but NOTHING is fixing it. I've searched to the end of Google.

Here are instructions form instructor:

Download this RData file to your working directory. Then load the data into R with the following command:

load("skew.RData")

That triggers the error in title

The first fix to pop up: I add the simple type="binary" but that doesn't work. Instead I get a new error:

Error in install.packages : file ‘~/Downloads/skew.RData’ is not a macOS binary package

A few more answers said binary="TRUE"

That doesn't work.

I try some of the other fixes online here and nothing is working.

Yes devtools is installed but it seems that half of the 'answers' say you don't need it.

Hi, and welcome!

If skew.RData is in the current working directory,

load("skew.RData") 

loads an object, dat, with the following result

> dat
                [,1]         [,2]          [,3]        [,4]
   [1,] -0.626453811  1.134965089 -0.8861495854  0.75936749
   [2,]  0.183643324  1.111931845 -1.9222548963  5.95966477
   [3,] -0.835628612 -0.870777634  1.6197007441  3.06785268

many more rows omitted. I'd use a reprex, but it doesn't play well with this situation.

Using `install.packages("skew.Rdata") will never work, for the simple reason that it isn't a package.

okay, then the instructions he posted we not correct. When I download to my computer and then load directly from R:

load("~/Downloads/skew.RData")
dat

I get the same info you did. He insisted on then running 'load(skew.Rdata) but that's not correct. It's already loaded.

Thank you for clarification on that. Seems to work good now. Frustrating that he added something that would trigger an error.

1 Like

He should have made clear that for load() to work that the skew.RData file has either 1) be in the current working directory or 2) be given the full pathname, as you showed.

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

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