Hi thereI've got two datasets of the following form (just an example, the real dataset got a lot more columns)dataset1V1 V2 V32 6 84 3 41 9 8and dataset 2V1 V2 V36 8 42 0 78 1 3First, I'd like to calculate the following:V1 from dataset1 minus V1 from dataset2,thanV2 from dataset1 minus V2 from dataset2...and so on (always Vn-Vn, where n=1,2,....n) and safe the solution-vectors in a new matrix.Second I'd like to run other functions over the two matching columns (for example: V1 from dataset1 minus mean(V1) from dataset2, V2 from dataset1 minus mean(V2) from dataset2,...).So I'm looking for a simple solution that always takes the matching columns from the different datasets and than I can just change the function for the two.Thank you for your help!Kind regards
-- View this message in context: http://r.789695.n4.nabble.com/calculate-with-different-columns-from-different-datasets-tp4674918.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] ______________________________________________ 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.