Re: [R] set digits in xtable by row

2011-02-02 Thread Christian Raschke
Nevermind, I just read in the documentation that 'digits' can be a matrix. No idea how I could have overlooked this the first few times of reading it. I'm sorry for the noise. CR On Wed, 2011-02-02 at 16:40 -0600, Christian Raschke wrote: > Hello R-listers, > > I a

[R] set digits in xtable by row

2011-02-02 Thread Christian Raschke
umns. Am I missing another obvious option to do the same thing for rows? A quick RSiteSearch didn't turn up anything. I can't just flip the table sideways, but it looks goofy when I report sample sizes etc as 123.0000. Thanks! -- Christian Raschke Department of Economics and ISDS Research

Re: [R] Extracting index in character array.

2010-10-13 Thread Christian Raschke
> which(list=="C") [1] 3 See ?which On 10/13/2010 11:56 AM, lord12 wrote: If I have a character array: list = c("A", "B", "C") how do I access the third element without doing list[3]. Can't I find the index of "C" using a part

Re: [R] Number of occurences of a character in a string

2010-10-10 Thread Christian Raschke
lman/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. -- Christian Raschke Department of Economics and ISDS Research Lab (HSRG) Louisiana State University

Re: [R] what is the "NOT IN" operator

2010-10-06 Thread Christian Raschke
Put the "!" in front of the whole expression, not just the %in% function. I.e. sub <- mydata[!(mydata$group %in% c("A", "B", "E", "G")),] Christian On Thu, 2010-10-07 at 09:17 +1000, Emily Deomano wrote: > Good day, > I need to subset a data by removing several rows. I know the %in% operator,

Re: [R] Multiple CPU HowTo in Linux?

2010-09-14 Thread Christian Raschke
ide.html and provide commented, minimal, self-contained, reproducible code. -- Christian Raschke Department of Economics and ISDS Research Lab (HSRG) Louisiana State University Patrick Taylor Hall, Rm 2128 Baton Rouge, LA 70803 cras...@lsu.edu _

Re: [R] [semi-OT] Using fortune() in an email signature

2010-09-01 Thread Christian Raschke
= EXIT_SUCCESS) { fprintf(stderr, "Program %s doesn't seem to exist \n", producer); exit(EXIT_FAILURE); } Unfortunately, I don't understand this at all. Can anyone give me a clue as to w

Re: [R] Indexing by logical vectors

2010-07-19 Thread Christian Raschke
appens, no questions asled. (I can see a generic function > emerging here, perhaps...) > > W. > > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Christian Raschke > Sent: Tuesday, 20 July 2010 9:

Re: [R] Indexing by logical vectors

2010-07-19 Thread Christian Raschke
On Mon, 2010-07-19 at 19:46 -0400, David Winsemius wrote: > On Jul 19, 2010, at 7:16 PM, Christian Raschke wrote: > > > Dear R-Listers, > > > > My question concerns indexing vectors by logical vectors that are > > based on the original vector. Consider the fol

[R] Indexing by logical vectors

2010-07-19 Thread Christian Raschke
ELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base -- Christian Raschke Department of Economics and ISDS Research Lab (HSRG) Louisiana State University cras...@lsu.edu _

Re: [R] Lattice and Beamer

2010-06-28 Thread Christian Raschke
Harold, I usually just specify a width=x instead of a scale. The height is then automatically scaled to maintain the aspect ratio and you get the right size for the presentation regardless of the size of the original. Christian Raschke m.CR Am Jun 28, 2010 um

Re: [R] apropos and find

2010-04-20 Thread Christian Raschke
?apropos says that it expects a character string. Therefore use quotes: > apropos("edit") > [1] "edit" "file.edit" "xedit" Christian On Tue, 2010-04-20 at 10:24 +0200, Karsten Rincke wrote: > Hello, > I'm starting working myself in the use of R, reading M. J. Crawley, The > R Book. The

Re: [R] VERY SIMPLE QUESTION

2010-04-16 Thread Christian Raschke
-- > > In fact, #column of `a` is so big.. > > Is there a more efficient way to compute this instead of using "apply" or > something? or "apply" is only way..? > > Any suggestion will be greatly apprecia

Re: [R] Replace / with - in date

2010-04-15 Thread Christian Raschke
posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.

Re: [R] can't find "daphnia.txt" and others while working through Crawley's R-Book

2010-04-15 Thread Christian Raschke
[[alternative HTML version deleted]] __ R-help@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

[R] "Types" of missingness

2010-02-27 Thread Christian Raschke
ly in this easy example, but as data frames get larger and cases more complex the workarounds seem more and more klutzy to me. So, if there is an easy way to do this that I have overlooked, I would be grateful for any advice or references. Best, Christian -- Christian Raschke Department of

Re: [R] gsub patterns from vector elements w/out loop?

2010-02-22 Thread Christian Raschke
hing else blah" I can do this using a loop: for ( i in 1:length(x) ) { y<- gsub(x[i],"something else",y) } Surely, there must be a less kludgy way? I tried looking at the different apply()s but am not getting anywhere, partly because I lack the mental flexibility to combine