添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more

I receive this message when I try to install "XLConnect" in R. I am trying to use some data from excel, and I don't know how else to load it into the program.

I'm completely new to R and programming, so any help is greatly appreciated!

OT, but XLConnect requires Java, which on macOS in particular will cause significant grief. openxlsx is a nice C++ based alternative, or readxl if you only need to import. rio is an interesting alternative that wraps both plus a lot of other useful I/O packages in a consistent interface. alistaire Apr 13 '17 at 21:49

This usually happens when there is a typo in the package name. The code below should work. My guess is that the capitalization might have been off when you tried it?

install.packages("XLConnect")

I'm reasonably sure that you had spaces on either side of term "XLConnect". At least that is what your error message is telling us. If trying what Mallick suggested does not succeed, then [edit] to include exact copies of any error message in the body of the question.

Other ways to transfer data from Excel to R include copying to the Clipboard or exporting as a '.csv' file. There must be hundreds of questions and answers about the Excel - to - R Highway Eternal Resurfacing Project. One more recent addition is the readxl package (function is read_excel) and that choice doesn't have the Java version dependencies that cause trouble for some XLConnect useRs.

I agree. The readxl package is probably the best way to go for importing Excel data into R. – Mallick Hossain Apr 14 '17 at 13:20

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.