[R] Problem with latex when checking a package

2015-01-15 Thread Leandro Roser
Hello everyone. I'm checking a package in Windows 8.1, and when the program starts to create the PDF manual, exits with status 1, printing the following message: # End(Not run) Sorry, but I'm not programmed to handle this case; I'll just pretend that you didn't ask for it. ! You can't use `macro

Re: [R] Problem with latex when checking a package

2015-01-15 Thread Leandro Roser
t; abc <- 123 > ghi <- 789 > } > \dontrun{ > def <- 456 > } > > Rich > > On Thu, Jan 15, 2015 at 10:31 PM, Leandro Roser wrote: >> Hello everyone. I'm checking a package in Windows 8.1, and when the >> program starts to create the PDF manual, exits

Re: [R] How to subset data, by sorting names alphabetically.

2015-02-12 Thread Leandro Roser
Hi, a solution could be: # example matrix a: a <- matrix(1:100, 10, 10) a[, 1] <- (sample(c("aa","bb" , "ab"), 10, rep=TRUE)) a <- a[order(a[, 1]), ] # order the matrix by row = 1 #subsetting a: lev <- levels(as.factor(a[, 1])) subs <- list() for(i in 1:length(lev)) { subs[[i]] <- a[a[, 1] %