Separate Function in R - How to Separate One Column into Two Variables

preview_player
Показать описание
Video showing an essential R function, separate. This function is so good, I literally use it all of the time in my work. This function takes one variable and separates it into 2 or more different variables.

Data -

If you enjoyed this video make sure to leave a like for the YouTube algorithm! Subscribe for more of the best R content on YouTube!
Рекомендации по теме
Комментарии
Автор

I couldn't tell you how much this helped me!! Thank you!

monicanguyen
Автор

At first the View() function wouldn't display the correct output but at 6:56 with ball <- ball %>% finally displayed the correct output

JuanUtari
Автор

@thatRnerd have you tried the drop_na() function?

Try it between lines 10 & 11, type drop_na(last_name_1), that should do it, it'll remove all the NA's before you merge last_name_1 with last_name.

Let me know if it worked.

shaun
Автор

For persons like me who struggled when they copied the data.
Step1: Copy the data
Step2: Place data in notepad
Step3: Save as a csv file.
Step4: Proceed with the video.

Note: If you place the data in an excel file and then save it as a csv, you may get an error. That's what I had done initially.

annabelleellis
Автор

How do you split where no specified delimiter is given in the values of a column?

jamesleleji