split_human_name | R Documentation |
Rules:
split_human_name(data, col = "name")
data |
dataframe containing a column with a human name |
col |
string; name of the column containing the name, defaults to |
lastname = last word
givenname = first word
middlename = everything not first word or last word
initial = first character
Beware that there will be a warning argument is not an atomic vector; coercing
It works nonetheless.
In general it might not be a good idea to try to split a human name, because it's nearly impossible to do that correctly. Mainly works only for Kartoffel names.
dataframe with 4 new colums: lastname, givenname, middlename, initial
https://shinesolutions.com/2018/01/08/falsehoods-programmers-believe-about-names-with-examples/
df <- data.frame(name = c("Rita Mae Brown", "vorname df dsafasf", "sdf asdfd")) split_human_name(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.