I may be Doing It Wrong™ but I have a dataframe and for each row in that dataframe I have to do some complicated lookups and append some data to a file.
In my procedural world, I'd do something like:
for (row in dataFrame) {
#look up stuff using data from the row
#write stuff to the file
}
what is the R way to do this?
Update with more information:
the dataFrame contains scientific results for selected wells from 96 well plates used in biological research so I want to do something like:
for (well in dataFrame) {
wellName <- well$name # string like "H1"
plateName <- well$plate # string like "plate67"
wellID <- getWellID(wellName, plateName)
cat(paste(wellID, well$value1, well$value2, sep=","), file=outputFile)
}