[R] 3 questions: debug R script, multi-level sorts, and multi-gsub

Gabor Grothendieck ggrothendieck at gmail.com
Sat Apr 26 06:04:56 CEST 2008


When it stops with the error you can issue a

traceback()

command or run the script with echo=TRUE:

source("test.R", echo = TRUE, max = 1000)


On Fri, Apr 25, 2008 at 11:28 PM, Ng Stanley <stanleyngkl at gmail.com> wrote:
> Hi,
>
> 1) I ran a script say test.R. It ran and terminated with an error. However,
> I am not sure where the error occur.
>
> > source("test.R")
> Loading required package: tools
>
> Welcome to Bioconductor
>
>  Vignettes contain introductory material. To view, type
>  'openVignette()'. To cite Bioconductor, see
>  'citation("Biobase")' and for packages 'citation(pkgname)'.
> Error: subscript out of bounds
> 2) I have looked deeply into R, but can't fine multi-level sorts.
>
> 3) I have a vector of words, several of which need to be replaced by
> different unique words. I am using multi-lines of gsub, is there any elegant
> alternative ?
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list