problems when merging two data sets
Hi Sasha, I'll take a wild guess that your column names have periods (.) replacing the spaces in the names you use: species occurrence -> species.occurrence The error message means that R can't find the variable name you have used in the "by" argument. The second wild guess is that your column names for the species names are different and you must use the "by.x" and "by.y" arguments instead of just "by". Jim
On Wed, Feb 6, 2019 at 5:04 AM sasa kosanic <sasa.kosanic at gmail.com> wrote:
Dear All, I would like to merge two data sets however I am doing something wrong... 1 data set contains 2 columns of 'species occurrence'(1 column) in Germany and 'species names' (2 column). and the second one names of 'Red list species'(1 column) and 'species status' (2 column). so I would like to merge Red list species with species names from the first table and to sign the species status I have tried with merge function but got this an error:" 'by' must specify a uniquely valid column" I also tried with the function left_join, however no success. Also columns in two data sets are different in size. 1 table has 7189 rows and 2 table just 426 rows as we do not have much Red list Species. I would appreciate your help. Kind regards, Sasha Dr Sasha Kosanic Ecology Lab (Biology Department) Room M842 University of Konstanz Universit?tsstra?e 10 D-78464 Konstanz Phone: +49 7531 883321 & +49 (0)175 9172503 http://cms.uni-konstanz.de/vkleunen/ https://tinyurl.com/y8u5wyoj https://tinyurl.com/cgec6tu [[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.