命名列表中的元素
我是R的新手。我已经看到了一个榜样,并决定自己做。
list('Chicago' = 1, 'New York' = 2, 'Los Angeles' = 3)
$Chicago
每次运行此代码时,我会继续收到错误消息错误:“ $”中的意外'$' 我试图打印出1,数字存储在芝加哥
I am new to R. I just started 2 days ago, I was following along with my instructor on the topic of naming list. I had seen an example done, and decided to do on my own.
list('Chicago' = 1, 'New York' = 2, 'Los Angeles' = 3)
$Chicago
Every time I run this code I keep getting the error message Error: unexpected '$' in "$"
I was trying to print out 1, the numeric stored in Chicago
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该将列表分配给名称以再次访问它。
You should assign your list to a name to access it again.