Thank Rainer and Jim!!
The end result was:
#Makes a new data set name "MyData_Minus_MW01" that contains all the data
where the Location Column is not equal to MW01 and the comma after that
ensures that all columns are copied into the amended data.frame.
MyData_Minus_MW01 <- MyData[ MyData$Location
Hi David,
You "just" need to learn how to subset your data.frame, see functions
like ?subset and ?"[", as well as a good guide to understand the subtleties!
Some graphic functions also have a built-in argument to subset within
the function (e.g. argument 'subset' in 'plot.formula'), although
Reading in the data from the file
x <- read.csv( "ExampleData.csv", header = TRUE, stringsAsFactors = FALSE )
Subsetting as you want
x <- x[ x$Location != "MW01", ]
This selects all rows where the value in column 'Location' is not equal to
"MW01". The comma after that ensures that all
3 matches
Mail list logo