I have a data frame in R called pros.dat, which has 97 obs of 9 variables. I am trying to use lapply() to plot 8 of those variables against one in particular, SVI. This is the code I am using:
plots = lapply(pros.dat[,-5], FUN = plot, x = pros.dat$svi)
When I run the code, the x-axis correctly plots SVI, but the y-axis plots x[[i]] (see image). Does anyone know how I can fix the code to get each variable (excluding SVI) on the y-axis? Thanks.