[R] how to automatically select certain columns using for loop in dataframe

2009-04-09 Thread Ferry
guessing that I don't use the correct type on the following statement (within the subset in the loop): !is.na( paste(NAME_, each_name, sep = '') ) But then, I might be completely using a wrong approach. Any idea is definitely appreciated. Thank you, Ferry [[alternative HTML version deleted

[R] Creating date seq in data frame

2009-03-25 Thread Ferry
- 5, xDate + 5, by=day) and the like, but without result. Any idea is appreciated. Thanks much, Ferry [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] how to make aggregation in R ?

2009-03-19 Thread Ferry
which one? Any pointer is really appreciated. Thanks, Ferry [[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

Re: [R] how to make aggregation in R ?

2009-03-19 Thread Ferry
11 31 7 c c2 39 99 8 c c3 15 35 9 d d1 16 36 10 d d2 17 37 11 d d3 18 38 12 d d4 39 79 In any case, did I do something wrong using the aggregate function? Thanks, Ferry On Thu, Mar 19, 2009 at 6:09 PM, Ferry fmi.ml...@gmail.com wrote

[R] converting null to some values

2009-03-17 Thread Ferry
with which() but without success. Any pointer is appreciated. Thank you, Ferry [[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

Re: [R] converting null to some values

2009-03-17 Thread Ferry
Sorry, the data is: temp - data.frame(type1 = c(male, female, male, female, female), type2 = c(low, med, high, low, med), a = c(1,2,4, NA, 3), b = c(5,NA,5,1,2), c = c(0,0,1,1,NA)) On Tue, Mar 17, 2009 at 4:28 PM, Ferry fmi.ml...@gmail.com wrote: Hi, I have newbie question. Suppose I have

[R] Writing xls - multiple sheets

2009-03-12 Thread Ferry
Hi, Is there a package I can use to write to multiple sheets on xls file, other than using the paid version of xlsReadWrite package (xlsReadWritePro)? Thank you, Ferry __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Getting the difference between two data frames

2009-02-19 Thread Ferry
to do so in R. I tried all.equal, diff, and identical, but they don't give me the actual data difference. Thank you beforehand, Ferry __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] Normality Test and T-Test

2009-01-21 Thread Ferry
:, each_pretest$p.value, sep = )) print(paste(each_group, post_test p-value:, each_pretest$p.value, sep = )) } and the same thing with t-test. Any idea is appreciated. Thank you. Ferry __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] aggregate / tranpose data

2008-12-23 Thread Ferry
12345,23456,34567 Jane 13242,22123 Any idea/pointer is appreciated. Thanks a bunch, Ferry [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] adding rows as arithmatic calculation on original rows

2008-12-05 Thread Ferry
6 8 fDouble 13 19.5 28 Any idea is appreciated. Thanks beforehand. Ferry [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] adding rows as arithmatic calculation on original rows

2008-12-05 Thread Ferry
33.0 44.0 Double.4 d Double4.06.08.0 Double.myNum1 Double 13.0 19.5 26.0 Single.1 a Single 10.0 11.0 12.0 Single.2 b Single 15.0 25.0 35.0 Single.myNum1 Single 12.5 18.0 23.5 On Fri, Dec 5, 2008 at 3:21 PM, Ferry

Re: [R] adding rows as arithmatic calculation on original rows

2008-12-05 Thread Ferry
) - Original message - From: Gabor Grothendieck [EMAIL PROTECTED] To: Ferry [EMAIL PROTECTED] Cc: r-help@r-project.org Date: Fri, 5 Dec 2008 17:50:42 -0500 Subject: Re: [R] adding rows as arithmatic calculation on original rows Here is a solution using sqldf library(sqldf

[R] grouped and stacked plot

2008-11-07 Thread Ferry
that I am not accustomed (which is very like, since I am such as newbie with R, much less with R-graphics). Any idea is appreciated, Thanks, Ferry [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] regex question

2008-11-03 Thread Ferry
use, I could only extra the first portion or the last portion of the unwanted characters. how to extract both ends and keep my text this is my text ? I have tried with gsub, as below: patReg - ([ * ]+) gsub(patReg, '', varReg) but it returned thisismytext any idea is appreciated. thanks, ferry

Re: [R] regex question

2008-11-03 Thread Ferry
:]]+) but it doesn't work. or, possibly it just my stupidity ? On Mon, Nov 3, 2008 at 5:59 PM, John Fox [EMAIL PROTECTED] wrote: Dear Ferry, You're almost all the way there. Just apply each substitution in turn: varReg - * * this is my text left - (^[ *]+) right - ([ ]+$) sub(right, , sub

Re: [R] lattice: overlap histogram

2008-10-29 Thread Ferry
Thank you Deepayan. Still on lattice, can the same overlap function be applied to categorical variable plot such as barchart? I mean, can I create an overlap barchart plot? On Tue, Oct 28, 2008 at 5:41 PM, Deepayan Sarkar [EMAIL PROTECTED]wrote: On Tue, Oct 28, 2008 at 4:31 PM, Ferry [EMAIL

[R] lattice: overlap histogram

2008-10-28 Thread Ferry
panel, overlapping the Mode into the same panel. I tried the following: histogram( ~Value | AgeGroup, data = stuff, groups = Mode, auto.key = TRUE) but I think it gave me incorrect result. Any help is appreciated. Thank you, Ferry [[alternative HTML version deleted

Re: [R] lattice panel question

2008-10-17 Thread Ferry
Dear Deepayan, Haris, and Baptiste, Thank you !!! Ferry On Tue, Oct 14, 2008 at 10:06 AM, Deepayan Sarkar [EMAIL PROTECTED] wrote: On 10/13/08, Ferry [EMAIL PROTECTED] wrote: Dear R users, How to change lattice panel label/text from the automatically generated label (based

[R] lattice panel question

2008-10-13 Thread Ferry
Dear R users, How to change lattice panel label/text from the automatically generated label (based on the conditioning) to our own set of label? for example: someStuff - data.frame(area = rep(c(SOUTH, NORTH, EAST, WEST), each = 25), group = rep(c(A,B,C,D), each = 5),

[R] RODBC-sqlSave questions

2008-08-14 Thread Ferry
Hello, I have 4 data frames, say A, B, C, D. Each A, B, C has different columns set, and D has all of what A, B, and C have. So, here is the example: A has c1, c2, and c3 B has c4 and c5 C has c1, c5, and c6 D has c1, c2, c3, c4, c5, and c6. I want to load these data frames into an Oracle SQL

Re: [R] Remove Even Number from A Vector

2008-08-01 Thread Ferry
x[!(x %% 2 == 0)] On Thu, Jul 31, 2008 at 10:01 PM, Gundala Viswanath [EMAIL PROTECTED]wrote: Dear all, How can I remove the even number from the following vector x [1] 4 5 6 8 17 20 21 22 23 25 26 31 35 36 38 40 41 42 43 [20] 44 50 74 75 82 84 89 90 91

[R] dotFirst option

2008-07-30 Thread Ferry
Hi, I want to plot something the R opens. I created .First as follow: .First - function() { plot(rnorm(100)) # do other stuff } But instead, I got error like below: Error in .First() : could not find function plot Any idea? Thanks. [[alternative HTML version deleted]]

[R] R-pmg (poor man gui) question

2008-07-25 Thread Ferry
, then I would like the second gdroplist automatically populated with state that belong in the category of MidWest for further selection. Is this possible with pmg in R? I've tried reading all available manual and examples, but could not find similar case. Thank you, Ferry [[alternative