[Rd] citation() chops "Roeland " (PR#7797)

jari.oksanen at oulu.fi jari.oksanen at oulu.fi
Mon Apr 18 10:35:10 CEST 2005


Full_Name: Jari Oksanen
Version: 2.0.1, 2.1.0 beta (2005-04-17)
OS: Linux
Submission from: (NULL) (130.231.102.145)


If name ends with "and", such as "Roeland Lastname", citation() will chop "and"
as a separate word giving "Roel and Lastname". This is the case in the upcoming
release of vegan (1.6-8) just submitted to CRAN. Basically, this seems to happen
in utils:::as.personList.default

> unlist(as.personList("Roeland Lastname"))
 name.first name.middle   name.last  name.first name.middle   name.last
         ""          ""      "Roel"          ""          ""  "Lastname"

and the culprit line seems to be:

x <- unlist(strsplit(x, "[[:space:]]?(,|and)[[:space:]]+"))

Fortunately, persons like Anders Andtfolk and Mandalay Grandjean are not
chopped, because they don't have space after "and".



More information about the R-devel mailing list