[英]Command describe unrecognized even if the package psych is loaded
I'm using Rstudio 2022.22.1 on MacOS Monterey 12.3.1.我在 MacOS Monterey 12.3.1 上使用 Rstudio 2022.22.1。
I load libraries at the begininning by doing:我通过以下方式在开始时加载库:
knitr::opts_chunk$set(echo = TRUE)
library("tidyverse", "here", "magrittr")
library("pastecs", "psych")
## dlf<-read.delim("data/DownloadFestival(No Outlier).dat", header=TRUE)
dlf<-here::here("data/DownloadFestival(No Outlier).dat") %>% readr::read_delim(col_names = TRUE)
I also check the thick for the library "psych" in the Packages section of RStudio.我还在 RStudio 的包部分检查了库“psych”的详细信息。
The issue is that, from a certain point (after Knitting) I wasn't unable to use the command describe
, this is the error:问题是,从某一点(在编织之后)我不是无法使用命令
describe
,这是错误:
could not find function "describe"
找不到 function“描述”
I could bypass this, by typing each time I use the function:我可以通过每次使用 function 时键入来绕过它:
psych::describe
instead of describe
alone而不是单独
describe
How can I use describe
without specifying the psych::
prefix each time?我如何在每次不指定
psych::
前缀的情况下使用describe
?
Your problem is that library("pastecs", "psych")
isn't doing what you think.你的问题是
library("pastecs", "psych")
没有按照你的想法去做。 Weirdly enough, there isn't an obvious idiom for "load a bunch of packages at once": I wish there were an easier way to do this, but try奇怪的是,“一次加载一堆包”并没有明显的成语:我希望有更简单的方法来做到这一点,但请尝试
invisible(lapply(c("psych", "pastecs"), library, character.only = TRUE))
The answers to this question provide a bunch of different ways to load many packages at once (the accepted answer is the same as the one given here). 这个问题的答案提供了一堆不同的方法来一次加载多个包(接受的答案与此处给出的答案相同)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.