Skip to content
Advertisement

Create subset using select in R

I am new to R scripting, I need to create subset of dataset using select function with some condition, I need just two columns not all columns.

This is my code

Advertisement

Answer

In SQL, select * gives you all columns (that’s what the * stands for). If you just want some of them, then enumerate them in the select clause, like:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement