Re: [R] "split" and loop functions

2015-10-02 Thread William Dunlap
You should really be asking Coursera for help with its course. However you can figure this out by breaking down your commands into small steps and seeing what each step gives. This is an advantage of an interactive system like R. E.g., suppose you start with > s1 <- data.frame(state=c("Rhode I

[R] "split" and loop functions

2015-10-02 Thread Greg Damico
Hello, I wonder if you might be able to help me. I'm enrolled in an R programming course through Coursera. I've done well so far--though it's been challenging!--but I'm having trouble understanding exactly how "split" and the loop functions (like "lapply") work. I keep getting an error that say