search for: leeser

Displaying 3 results from an estimated 3 matches for "leeser".

Did you mean: leese
2010 Jul 07
2
Trimming in R
I am looking for a way to trim leading and trailing spaces in a character string in R. For example: "       this is random text        " should become: "this is random text". I have a short function to perform this task as follows: trim <- function(str){        str <- sub("^ +", "", str)        str <- sub(" +$", "", str) }
2010 Jul 12
1
Subsetting Lists
I am looking for a way to create a vector which contains the second element of every vector in the list. However, not every vector has two components, so I need to generate an NA for those missing. For example, I have created the following list: lst <- list(c("a", "b"), c("c"), c("d", "e"), c("f", "g")) > lst [[1]]
2010 Jul 26
1
Loading Rdata files in a Package
I have an .Rdata file saved in my "data" folder in a package I created. However, when I use the data() function it doesn't recognize that there any dataset exists within the package. Is there anything specific I need to do such that the data() function will load my dataset? Thanks in advance, Andrew [[alternative HTML version deleted]]