Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to split a string column into multiple columns in R?
This can be done with the help of tidyr package.
Example
> library(tidyr)
> data = data.frame(attr = c(1,5,12,17), type=c('class_and_memory','class_and_memory_2'))
> data %>%
+ separate(type, c("class", "memory"), "_and_")
attr class memory
1 1 class memory
2 5 class memory_2
3 12 class memory
4 17 class memory_2Advertisements