Subset
Title
Question
Can create a two subset at one syntax ? will it disturb all contents of captaincy data frames?
Suppose i created as
>SubData<-subset(captaincy,played>25,matches<40,select("names","played","lost"))
ctrl+s
print(SubData)
ctrl+s
ctrel+enter
i have did but unexpected error.
R Indexing-and-Slicing-Data-Frames 10-11 min 20-30 sec
Answers:
Please note that you need to use an & symbol to combine multiple conditions, as shown below:
-----------------------------------------------------------------------------------------------------------------------
subData <- subset(captaincy, played>20 & lost<14, select = c("names","played","lost"))
-----------------------------------------------------------------------------------------------------------------------
Login to add comment