全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
6066 3
2018-06-17
第一次用RStudio,官网下载最新版的安装包,成功安装。下载package安装、载入过程出现一个问题:下载成功,载入怎么都成功不了,显示的内容如下:
---------------------------------------------------------------------
> library(quanteda)
Package version: 1.3.0
Parallel computing: 2 of 40 threads used.
See https://quanteda.io for tutorials and examples.

载入程辑包:‘quanteda’

The following object is masked from ‘package:utils’:

    View
---------------------------------------------------------------------
已经纠结好多天了,一直没有找到解决办法,求大神指点一下,拜托~


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2018-6-17 17:18:38
The message means that both the packages have function with the same name which is View in this case. You can type search() which will give you the following message.

> search()
[1] ".GlobalEnv"        "package:quanteda"  "package:SparseM"  
[4] "tools:rstudio"     "package:stats"     "package:graphics"
[7] "package:grDevices" "package:utils"     "package:datasets"
[10] "package:methods"   "Autoloads"         "package:base"   

Since quanteda was loaded after utils, but it appears earlier in the search path, so the View function in that package quanteda will be used. Therefore, the View function in package utils will be masked. There are two ways to avoid this message.
First one:
library(utils)
library(quanteda, warn.conflicts = FALSE)

second one:
library(utils)
suppressPackageStartupMessages(library(quanteda))

It will work for sure.

Wish you have a nice Dragon Boat Holiday!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-6-17 17:51:14
There is another way to solve your problem, if you really like View function in quanteda package. you could do this:
library(quanteda)
rm(View)
so R will only access the View function from quanteda package.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-6-17 21:02:44
hifinecon 发表于 2018-6-17 17:51
There is another way to solve your problem, if you really like View function in quanteda package. yo ...
多谢!
thank you~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群