All, I currently have a dataset with a variety of different columns, let's say, A,B,C, and D. I'd like to run an R script that graphs only certain rows of the dataset based on what's in column A. In awk, it'd be something like:
awk ' { if(A==5 && B ==6) print $0 } ' datafile | command or file Since I have just begun using R, I am unsure if awk is compatible in R or how I would use an "if' statement as suggested above. I'd like to read in a table of data, but while plotting, only plot a certain row based on certain conditions (i.e. column A==6 and etc). I would appreciate any input. And yes, I did a search of the forums, but was still confused as the implementation. Thanks in advance. Julian -- View this message in context: http://r.789695.n4.nabble.com/data-extraction-in-R-tp4323803p4323803.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.