楼主: pipi1993
5412 3

[问答] 【小白求问】程辑包无法载入问题 [推广有奖]

  • 0关注
  • 0粉丝

初中生

66%

还不是VIP/贵宾

-

威望
0
论坛币
3 个
通用积分
1.0000
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
353 点
帖子
7
精华
0
在线时间
13 小时
注册时间
2018-6-17
最后登录
2019-3-28

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
第一次用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
---------------------------------------------------------------------
已经纠结好多天了,一直没有找到解决办法,求大神指点一下,拜托~


二维码

扫码加我 拉你入群

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

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


沙发
hifinecon 发表于 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!

使用道具

藤椅
hifinecon 发表于 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.

使用道具

板凳
pipi1993 发表于 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~

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-21 19:59