library(rnaturalearth)
world <- ne_countries(returnclass = "sf")
reg_names <- c("Brazil","Argentina","Uruguay","Paraguay")
reg_native <- c("Brazil","Paraguay")
reg_alien <- c("Argentina")
regs <- world[which(world$name_sort %in% reg_names),]
regs_native <- world[which(world$name_sort %in% reg_native),]
regs_alien <- world[which(world$name_sort %in% reg_alien),]
regs_list <- giveRegions(regs,regs_native,regs_alien)
Run the code above in your browser using DataLab