Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package 'data.table' is not available (for R version 3.1.1) #5171

Closed
yinianwuyu opened this issue Sep 22, 2021 · 12 comments
Closed

Package 'data.table' is not available (for R version 3.1.1) #5171

yinianwuyu opened this issue Sep 22, 2021 · 12 comments
Labels

Comments

@yinianwuyu
Copy link

Package 'data.table' is not available (for R version 3.1.1)
when i tried to install 'data.table' in R (version 3.1.1) .

But from the manual, it said 'Depends >= 3.1.0',
can someone give some advice to install 'data.table' in R version 3.1.1?
Appreciation to your help!

@MichaelChirico
Copy link
Member

this might be #5122 ... @mattdowle did we get archived from cran? 😬

@mattdowle
Copy link
Member

We haven't been archived.
@yinianwuyu does any other package work? I tried briefly in R 3.1.0 and no package works. Do you also see a 'unable to access index for repository' warning? What OS are you? You were asked to provide sessionInfo() when filing the issue. The OS makes a big difference as to binary vs source.

@mattdowle
Copy link
Member

Removing the s from the https in the repo makes it work for me in R 3.1

options(repos="http://cloud.r-project.org")
install.packages("data.table")

If that works for you, please follow up with CRAN maintainers as it doesn't seem related to data.table.

R's message "Package 'data.table' is not available (for R version 3.1.1)" is often misleading in my experience in that it's rarely due to the version of R. Just ignore the parenthetic and think 'something is wrong'.

@jangorecki
Copy link
Member

It is important to know if you are installing from binaries or sources. Anyway older R version were not well handling https, so as Matt suggested, just use http instead. If you want to use https then you should be able by installing curl in your OS (not R package) and use download.method option in R.

@mattdowle
Copy link
Member

Please reopen if you still have problems and think it's specific to data.table.
R 3.1.1 is 7 years old now and as Jan said, R's package installation code has improved in that time.

@yinianwuyu
Copy link
Author

Hi Matt,
the sessionInfor as the following:

sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 LC_MONETARY=English_Australia.1252 LC_NUMERIC=C LC_TIME=English_Australia.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tools_3.1.1

when i used

options(repos="http://cloud.r-project.org")
install.packages("data.table")
it gave me the error message:
Warning: unable to access index for repository http://cloud.r-project.org/bin/windows/contrib/3.1

package ‘data.table’ is available as a source package but not as a binary

Warning message:
package ‘data.table’ is not available (for R version 3.1.1)

Thank you very much for your answers!

@jangorecki
Copy link
Member

jangorecki commented Sep 24, 2021

@yinianwuyu did you try installing from sources? only if that fails then it may be something for our team to fix. Binaries is provided (or not) by CRAN, we just distribute sources. It is not surprising that binaries for very old versions of R are no longer being online. Try installing from package sources. You need Rtools installed, you can find it here: https://cran.r-project.org/bin/windows/Rtools/history.html
So basically in your install.packages use type="source".

@mattdowle
Copy link
Member

mattdowle commented Sep 24, 2021

@yinianwuyu I did ask you "does any other package work? I tried briefly in R 3.1.0 and no package works." but you didn't answer that part.
Thanks for your output confirming that you also do see Warning: unable to access index for repository http://cloud.r-project.org/bin/windows/contrib/3.1 which indicates not even being able to access the repository at all.
So I pasted http://cloud.r-project.org/bin/windows/contrib/3.1 into my browser and it is "not found".
So then I removed the 3.1 at the end and found that http://cloud.r-project.org/bin/windows/contrib/ is found and displays :
image
You can see that the entire 3.1 directory is not there, but 3.2 is.
However, that is not enough to think that 3.2 would be fine. Since you are using 7 year old R, you have to keep digging and exploring. For example, there's a Readme there. Always click the readme just in case. On this occasion it happens to be revealing :
image

So I went to the archive mentioned there, clicked the 3.1 directory there, did Ctrl-F typed "data.table" to search for the file and found that the file "data.table_1.9.6.zip" is there because I know the version number is in the file name. That file would install for you but realize it is a very old version of data.table. To find out how old you would click the archive link displayed by CRAN for data.table here, then click last-modified column heading to sort that table by date, and it shows that 1.9.6 was released 2015-09-19. Or you could search NEWS for the release dates. However, 1.9.6 is so old that it was archived into the NEWS.0.md file which is linked at the very bottom of NEWS.md.

So you would have this problem with any package. You're just going to continue having problems with such an old version of R where you'll end up re-compiling all packages, or other problems if use very old versions of binary packages from the archive. Or other packages flat out don't support R 3.1 by depending on later release.

Compiling packages from source in 7 year old R on Windows : using latest tools or the tools as of then? I'm reasonably experienced and even I wouldn't attempt it on Windows. You're just going to have problems compiling. If you do manage to compile it, be sure to run test.data.table() to ensure it is working.

To be clear: you should upgrade R. 7 year old R on Windows is no longer supported by CRAN. We don't know what version of Windows you have. The output says 32bit so perhaps it is a very old Windows machine too, and if so, upgrading Windows (or to Linux/Mac) may be advisable too.

@MichaelChirico
Copy link
Member

IMO this is a pretty good mark in favor of us bumping to a 3.2.0 dependency

@jangorecki
Copy link
Member

jangorecki commented Sep 26, 2021

OK but if there are no other good reasons for that, then it doesn't make sense. Every power user will manage to compile package on old R, old Rtools are easily available. So bumping version without good reason will only cause power users to have to edit DESCRIPTION file to change "3.2" to "3.1" so they can keep latest DT on their old production system upgraded. I repeat what I said already multiple times. I had job interview in UK in biggest cloud provider in the world, at the time of DT 1.9.8. They gave me problem to solve and machine with so old R that latest DT I was able to install was 1.8.8 (no rbindlist even). And this was the top company. From other non R software environment, I know that upgrading production environment is so risky subject that many times it is not made at all, as long as the system is working, no matter how many years ago support for a version has finished. I seen easily 10+ years systems after support.

@MichaelChirico
Copy link
Member

Point well taken, however, such systems will also likely be using an old version of data.table. At some point, it's only reasonable to expect users updating to latest data.table to also update R...

@jangorecki
Copy link
Member

jangorecki commented Oct 4, 2021

Main difference of those upgrades (usually) is that for updating data.table you don't need sudo but to update R you need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants