[英]importing excel files in r
我正在嘗試在 r 工作室中加載 excel 文件,但每次我運行它
Error in read_excel("R/win-library/3.6/IMDB_data.xlsx", sheet = "IMDB_data",
:
could not find function "read_excel" this is displayed.
i have tried changing directory
saving the data to load, in the same as working directory
none of the articles resolve my issues concerned yet
tried changing directory
saving the file in the same place as my working directory
importing through choose directory
setwd("~/R/win-library/3.6")
library(readxl)
IMDB_data <- read_excel("R/win-library/3.6/IMDB_data.xlsx",
sheet = "IMDB_data", skip = 2)
似乎您的readxl
庫未加載。
運行library(readxl)
時是否出現任何錯誤?
您的工作文件夾無關緊要,您應該避免在 R 的庫中工作。
read_excel
命令應該根據提供的路徑讀取文件,但您的錯誤並不是在抱怨丟失的文件。 它抱怨缺少 function。
最后,如果您將工作目錄設置為~/R/win-library/3.6
,那么運行以下代碼就足夠了(前提是您的readxl
庫已正確加載):
IMDB_data <- read_excel("IMDB_data.xlsx", sheet = "IMDB_data", skip = 2)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.