Re: [R] How to read and write an S4 class

2009-08-12 Thread ml-r-help
see ?dput ?save e.g. setClass(track, representation(x=numeric, y=numeric)) x - new(track, x=1:4, y=5:8) # save as binary fn - tempfile() save(x, ascii=FALSE, file=fn) rm(x) load(fn) x # save as ASCII save(x, ascii=TRUE, file=fn) # ASCII text representation from which to regenerate the data

Re: [R] How to stop function printing unwanted output?

2009-08-06 Thread ml-r-help
?capture.output so with the given example this line should do what you wanted while avoiding the output file dummy - capture.output(comparison - LSD.test(yield,virus,df,MSerror, p.adj=bonferroni, group=FALSE, main=Yield of sweetpotato\ndealt with different virus)) Matthias David Winsemius

Re: [R] Bug in package.skeleton, R 2.9.0?

2009-07-15 Thread ml-r-help
Daniel Klevebring wrote: Bump Anyone? Thanks Daniel On 13 jul 2009, at 10.57, Daniel Klevebring wrote: Dear all, I am using package.skeleton to build a small packages of misc function for personal use. I have recently discovered that the option force=TRUE doesn't seem to do what

Re: [R] if condition doesn't evaluate to True/False

2009-04-29 Thread ml-r-help
see ?is.null e.g. if( is.null(sub_grp_whr_cls_data[sbgrp_no, 1]) ) { your code } Moumita Das wrote: Hi friends, Please help me with this bug. *Bug in my code:* In this variable sub_grp_whr_cls_data[sbgrp_no,1] I store the where clause.every sub group has a where condition linked with

Re: [R] if condition doesn't evaluate to True/False

2009-04-29 Thread ml-r-help
Petr PIKAL wrote: Hi r-help-boun...@r-project.org napsal dne 29.04.2009 17:05:01: see ?is.null e.g. if( is.null(sub_grp_whr_cls_data[sbgrp_no, 1]) ) { your code } It probably will not work as sub_grp_whr_cls_data[sbgrp_no,1]==NULL implicates that there is character value

Re: [R] Error in var(x, na.rm = na.rm) : no complete element pairs

2009-03-05 Thread ml-r-help
Carlos Morales wrote: Hello, I still have the same error which I have written in the Subject field, I leave here the code and I hope you can help me with this: [removed] the lengthy code example does not make it easier to help you, in particular without the data you used. All the

Re: [R] R package tests

2009-01-15 Thread ml-r-help
Hi Nathan, in addition to what others have already mentioned there is some documentation in the Writing R Extensions Manual: - on the supported structure of packages, indicating where test code might be added http://stat.ethz.ch/R-manual/R-patched/doc/manual/R-exts.html#Package-subdirectories