为什么以句点开头的对象没有出现在rstudio的全局环境窗格中? [英] Why does object beginning with a period not appear in the global environment pane in rstudio?

查看:37
本文介绍了为什么以句点开头的对象没有出现在rstudio的全局环境窗格中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建对象

.object <- 2

确认对象存在于全局命名空间

Confirm object exists in global namespace

.object 
# [1] 2

推荐答案

因为以 . 开头的变量被隐藏

Because variables starting with a . are hidden

如果你执行 ls() 你不会找到那个对象.来自 ?ls

If you do ls() you'll not find that object. From ?ls

所有.names
一个逻辑值.如果为 TRUE,则返回所有对象名称.如果为 FALSE,则名称以 .省略.

all.names
a logical value. If TRUE, all object names are returned. If FALSE, names which begin with a . are omitted.

要在环境中获得该名称,您需要执行

To get that name in the environment you need to do

ls(all.names = TRUE)

由于对象被省略,它没有在工作区中显示吗?

As the object is omitted it is not showing it in the workspace?

这篇关于为什么以句点开头的对象没有出现在rstudio的全局环境窗格中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆