bigdata-doc | 大数据学习笔记,学习路线,技术案例整理。
kandi X-RAY | bigdata-doc Summary
kandi X-RAY | bigdata-doc Summary
bigdata-doc
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bigdata-doc
bigdata-doc Key Features
bigdata-doc Examples and Code Snippets
Community Discussions
Trending Discussions on bigdata-doc
QUESTION
I understand that "Error: $ operator is invalid for atomic vectors" is caused by passing $ to the wrong kind of object: an atomic one instead of a recursive one.
However, I get it when I run a code chunk that works for other people. I'm trying to find what I'm doing wrong or an alternative solution.
I have two data frames:
...ANSWER
Answered 2017-Nov-28 at 18:32You are running into issues because DF1
and DF2
are both single column data.frame
s. When you subset a single column data.frame
it drops the data.frame
class and returns a vector. Thus using $
won't work. To get around this you can do either:
- Select the specific column you want in the subsetting. For your code for
DF2
this would beDF2[c2.1, "coolThings"]
.
or
- Use
drop = FALSE
to make sure your subsetting doesn't return a vector. ForDF2
this would look likeDF2[c2.1, , drop = FALSE]$coolThings
.
I personally prefer method 1, but both should work.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bigdata-doc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page