r - Filtering a data frame by values in a column -


this question has answer here:

i working dataset learnbayes. want see actual data:

install.packages('learnbayes') 

i trying filter out rows based on value in columns. example, if column value "water", want row. if column value "milk", don't want it. ultimately, trying filter out individuals who's drink column "water".

the subset command not necessary. use data frame indexing

studentdata[studentdata$drink == 'water',] 

read warning ?subset

this convenience function intended use interactively. programming better use standard subsetting functions ‘[’, , in particular non-standard evaluation of argument ‘subset’ can have unanticipated consequences.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -