powered by
Reverse the order of the first and last names of every element of a vector.
preName(X)
Another vector with its elements changed.
A vector of names with format "name, prename".
Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/
This function reverses the order of the first and last names of the items: i.e., "Weber, Max" turns into "Max Weber".
## To reconvert a single name: preName("Weber, Max") ## It is possible to work with several items, as in here: A <- c("Weber, Max", "Descartes, Rene", "Locke, John") preName(A)
Run the code above in your browser using DataLab