Re: [R] question

2006-12-22 Thread Mike Prager
You will not learn anything unless you do your own homework. Watanabe Yumiko [EMAIL PROTECTED] wrote: I have a question about R. I would like to simulate a following model. Xt+1=Xt(1+b) b is a random variable. to get 10 plots. I haven't used R program, how can I code

Re: [R] question

2006-12-22 Thread ¨Tariq Khan
Sorry, but might as well not have answered..., no? Yumiko, you didnt say what your distribution assumptions were. take a look at ?runif and ?rnorm and use that to search for help on your specific topic to get you started. -Tariq On 12/22/06, Mike Prager [EMAIL PROTECTED] wrote: You will not

[R] question

2006-12-17 Thread claire pujoll
Dear R users, I'am using marray and Limma packages to analyze genepix output. 1) how can I filter bad spots from my data (data contains 3 types of bad spots). my experiment contains 12 samples and the bad spot are not associated to the same probes 2) how can I remove control probes from my data

[R] question

2006-12-17 Thread claire pujoll
Dear R users, I'am using marray and Limma packages to analyze genepix output. 1) how can I filter bad spots from my data (data contains 3 types of bad spots). my experiment contains 12 samples and the bad spot are not associated to the same probes 2) how can I remove control probes from my data

[R] question about for loop

2006-12-14 Thread Jenny persson
Dear R-experts, I have a dataset of 4 patients and each patient has many records at four different time points. I have done 4 different qqnorm plots on the same graph where each plot represents the records of one patient at each time point. I would like to do the same graph for the

Re: [R] question about for loop

2006-12-14 Thread Petr Pikal
:[R] question about for loop Dear R-experts, I have a dataset of 4 patients and each patient has many records at four different time points. I have done 4 different qqnorm plots on the same graph where each plot represents the records of one patient at each time

[R] question about apply function

2006-12-08 Thread Andris Jankevics
Dear R-Users, For example i have a data matrix with five samples and three variables. DATA - matrix(c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5),nrow=5,ncol=3,byrow=TRUE) colnames (DATA) - c(V1,V2,V3) rownames (DATA) - c(S1,S2,S3,S4,S5) I want to normalize all samples to same sum of variables: NormFun -

Re: [R] question about apply function

2006-12-08 Thread Dimitris Rizopoulos
: Andris Jankevics [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Friday, December 08, 2006 9:36 AM Subject: [R] question about apply function Dear R-Users, For example i have a data matrix with five samples and three variables. DATA - matrix(c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5),nrow=5

[R] question for if else

2006-12-08 Thread Aimin Yan
I have a data set like this I want to assign outward to Y if sc 90 and assign inward to Y if sc=90. then cbind(p1982,Y) to get like these p aa as ms cur sc Y 1 154l_aa ARG 152.04 108.83 -0.1020140 92.10410 inward 2 154l_aa THR 15.86 28.32 0.2563560 103.67100inward 3 154l_aa ASP 65.13

Re: [R] question for if else

2006-12-08 Thread jim holtman
If p1982 is a data.frame: p1982$Y - ifelse(p1982$sc90, 'inward', 'outward') If it is a matrix p1982 - cbind(p1982, Y=ifelse(p1982[,'sc']90, 'inward', 'outward')) On 12/8/06, Aimin Yan [EMAIL PROTECTED] wrote: I have a data set like this I want to assign outward to Y if sc 90 and assign

Re: [R] question for if else

2006-12-08 Thread jim holtman
Hopefully it is a dataframe or else you matrix will be converted to character; forgot that when I sent it. On 12/8/06, jim holtman [EMAIL PROTECTED] wrote: If p1982 is a data.frame: p1982$Y - ifelse(p1982$sc90, 'inward', 'outward') If it is a matrix p1982 - cbind(p1982,

[R] Re : stat question - not R question so ignore if not interested

2006-12-06 Thread justin bem
Economiste BP 294 Yaoundé. Tél (00237)9597295. - Message d'origine De : Leeds, Mark (IED) [EMAIL PROTECTED] À : r-help@stat.math.ethz.ch Cc : C. Park [EMAIL PROTECTED] Envoyé le : Mardi, 5 Décembre 2006, 21h42mn 21s Objet : [R] stat question - not R question so ignore if not interested If do

Re: [R] stat question - not R question so ignore if not interested

2006-12-06 Thread David Farrar
. Park; Leeds,Mark (IED) Subject: Re: [R] stat question - not R question so ignore if not interested A classic example used by my colleague Paul Rozin (when he teaches Psych 1) is to compute the correlation between height and number of shoes owned, in the class. Shorter students own more shoes

[R] question about installation of R 2.4

2006-12-05 Thread guanshen
To whom it may be concernedDear all: i am a statistics of Humboldt university in berlin. I need R-2.4 for my data analysis, but unfortunately, it does not work. The installation works smoothly, but when I double click on the shortcut or from the start menu, the error warning jumps out. My

[R] stat question - not R question so ignore if not interested

2006-12-05 Thread Leeds, Mark \(IED\)
If do a scattrplot of data ( x and y ) and there are two clouds of points. One cloud is in the left bottom corner of the plot and the other cloud is in the upper right. If I fit a regression line to this data ( or equivalently , calculate a correlation ), then obviously, it is going to seem like

Re: [R] stat question - not R question so ignore if not interested

2006-12-05 Thread Richard M. Heiberger
The missing piece is why there are two clusters. There is most likely a two-level factor distinguishing the groups that was not included in the model. It might not even have been measured and now you need to find it. Rich __ R-help@stat.math.ethz.ch

Re: [R] stat question - not R question so ignore if not interested

2006-12-05 Thread Jonathan Baron
A classic example used by my colleague Paul Rozin (when he teaches Psych 1) is to compute the correlation between height and number of shoes owned, in the class. Shorter students own more shoes. But ... On 12/05/06 16:34, Richard M. Heiberger wrote: The missing piece is why there are two

Re: [R] stat question - not R question so ignore if not interested

2006-12-05 Thread Michael Kubovy
On Dec 5, 2006, at 3:42 PM, Leeds, Mark ((IED)) wrote: If do a scattrplot of data ( x and y ) and there are two clouds of points. One cloud is in the left bottom corner of the plot and the other cloud is in the upper right. If I fit a regression line to this data ( or equivalently ,

Re: [R] stat question - not R question so ignore if not interested

2006-12-05 Thread Bert Gunter
94404 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Baron Sent: Tuesday, December 05, 2006 1:45 PM To: Richard M. Heiberger Cc: r-help@stat.math.ethz.ch; C. Park; Leeds,Mark (IED) Subject: Re: [R] stat question - not R question so ignore

[R] Question on sub(stitute) X_1 - X\_1

2006-12-01 Thread Christian Hoffmann
Hi, Searching the archives has brought no clue: For a tex chunk in an Sweave text Oracle query results: differences \Sexpr{varname},... I need to change the string varname from X_1 to X\_1, sub(_,??,X_+) - X\_1 so that subsequent Latex will generate X_1 (i.e. show the underscore) instead

Re: [R] Question on sub(stitute) X_1 - X\_1

2006-12-01 Thread Prof Brian Ripley
You are confusing the printed representation with the string (a clue which is all over the archives, and in ?regex). X1 - sub(_,\\_,X_1,fixed=TRUE) print(X1) cat(X1, \n) X2 - sub(_,_,X_1) cat(X1, \n) both do as you ask. On Fri, 1 Dec 2006, Christian Hoffmann wrote: Hi, Searching the

[R] simple R question

2006-11-29 Thread iqbal hussain
Hi, I am new to this, can anyone help. I am working with matrices, with stocknames as colNames and dates as rowNames. The data coontains percentile ranking for the stocks. Date IBM MSFT 20061122 12 4 20061115 12 4 20061108 12 4 20061101 12 4 20061025 12 4

Re: [R] simple R question

2006-11-29 Thread Gabor Grothendieck
Try creating a zoo object from your data frame # data from your post DF - structure(list(Date = as.integer(c(20061122, 20061115, 20061108, 20061101, 20061025, 20061018, 20061011, 20061004, 20060927)), IBM = as.integer(c(12, 12, 12, 12, 12, 12, 11, 12, 10)), MSFT = as.integer(c(4, 4, 4, 4,

Re: [R] question about capscale (vegan)

2006-11-27 Thread Alicia Amadoz
Hi Gavin, I have been analyzing real data (sorry but I am not allowed to post these data here) and what I got was this, mydistmat_f.cap - capscale(distmat_f ~ F + L + F:L, mfactors_frame) Warning messages: 1: some of the first 30 eigenvalues are 0 in: cmdscale(X, k = k, eig = TRUE, add = add)

Re: [R] question about capscale (vegan)

2006-11-27 Thread Gavin Simpson
On Mon, 2006-11-27 at 15:37 +0100, Alicia Amadoz wrote: Hi Gavin, I have been analyzing real data (sorry but I am not allowed to post these data here) and what I got was this, mydistmat_f.cap - capscale(distmat_f ~ F + L + F:L, mfactors_frame) I believe you can write that formula as:

[R] question about the solve function in library Matrix

2006-11-22 Thread yyan liu
Hi: I have some problems when I use the function solve function in a loop. In the following code, I have a diagonal martix ttt whose elements change in every iteration in a loop. I defined a dpoMatrixclass before the loop so I do not need to define this class every time in the loop. The

Re: [R] question about capscale (vegan)

2006-11-17 Thread Alicia Amadoz
Hello, Thank you for your help. I have tried to perform the analysis I wanted with data of example, I mean not real data because I can't provide it here. So, what I have tried is this, matrix [,1] [,2] [,3] [1,] 0.00 0.13 0.59 [2,] 0.13 0.00 0.55 [3,] 0.59 0.55 0.00 dist_mat 12

Re: [R] question about capscale (vegan)

2006-11-17 Thread Gavin Simpson
On Fri, 2006-11-17 at 12:18 +0100, Alicia Amadoz wrote: Hello, Thank you for your help. I have tried to perform the analysis I wanted with data of example, I mean not real data because I can't provide it here. So, what I have tried is this, Hi Alicia, It would have been more helpful if

Re: [R] question about capscale (vegan)

2006-11-17 Thread Alicia Amadoz
Hello Gavin, Thank you very much for your help. I'm sorry I forgot to include all commands that I used but next time I will try to write all of them. I will try with my real data and see how it goes. I think I finally have understood how capscale works with this kind of data. Thank you. Regards,

Re: [R] question about capscale (vegan)

2006-11-17 Thread Jari Oksanen
On Fri, 2006-11-17 at 12:26 +, Gavin Simpson wrote: On Fri, 2006-11-17 at 12:18 +0100, Alicia Amadoz wrote: Hello, Thank you for your help. I have tried to perform the analysis I wanted with data of example, I mean not real data because I can't provide it here. So, what I have

[R] Question regarding integrate function

2006-11-17 Thread Le Wang
Hi there. Thanks for your time in advance. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two estimated marginal densities. My problem: I have the

[R] question about capscale (vegan)

2006-11-16 Thread Alicia Amadoz
Hello, I am interested in using the capscale function of vegan package of R. I already have a dissimilarity matrix and I am intended to use it as 'distance' argument. But then, I don't know what kind of data must be in 'comm' argument. I don't understand what type of data must be referred as

Re: [R] question about capscale (vegan)

2006-11-16 Thread Sarah Goslee
Hi Alicia, On 11/16/06, Alicia Amadoz [EMAIL PROTECTED] wrote: 'comm' argument. I don't understand what type of data must be referred as 'species scores' and 'community data frame' since my data refer to nucleic distances between different sequences. comm would be the original data from

Re: [R] question about capscale (vegan)

2006-11-16 Thread Sarah Goslee
Sorry, one additional note: You don't need to specify comm to use capscale. Ignore what I said about modifying the function. Sarah -- Sarah Goslee http://www.functionaldiversity.org __ R-help@stat.math.ethz.ch mailing list

Re: [R] question about capscale (vegan)

2006-11-16 Thread Gavin Simpson
On Thu, 2006-11-16 at 17:25 +0100, Alicia Amadoz wrote: Hello, I am interested in using the capscale function of vegan package of R. I already have a dissimilarity matrix and I am intended to use it as 'distance' argument. But then, I don't know what kind of data must be in 'comm' argument.

Re: [R] question about capscale (vegan)

2006-11-16 Thread Sarah Goslee
Nice catch, Gavin - I missed that part of the original post. The nucleic distances need to be included as the left-hand-side of the formula, not as the distance argument. comm is still optional, though, but it's not a good idea to omit it if there's any way you can provide the original data. From

[R] question about amova (ade4)

2006-11-14 Thread Alicia Amadoz
Hello, I am interested in using the amova function of ade4 package of R. I would like to know if there is any possibility to perform an amova with a specific anova model, as a factorial anova with some factors nested, or, if this could not be done, how could I perform an anova with my specific

Re: [R] question on MSM warning message

2006-11-13 Thread Im, Kelly
Hello After (simple random cluster) resampling with replacement I ran MSM function and I'm getting the following warning message ,which I'm not sure why. I don't have any absorbing stage set up in my MSM model. I have a 4 stage uni-directional MSM model. The only thing I see might be a problem is

[R] Question on applying vectors to data.frames by row

2006-11-13 Thread RDM
# Newbie alert # I am wanting to multiply the rows in a dataframe by a vector. # However, the default behavior appears to be for the vector to be applied # column wise. For example: vct - 1:4 df - data.frame(c1 = 5:10, c2= 6:11, c3=7:12, c4=8:13) multTheTwo - vct * df multTheTwo # This results

Re: [R] Question on applying vectors to data.frames by row

2006-11-13 Thread Gabor Grothendieck
Here are a couple of possibilities: as.data.frame(t(t(df) * vct)) df * rep(vct, each = nrow(df)) On 11/13/06, RDM [EMAIL PROTECTED] wrote: # Newbie alert # I am wanting to multiply the rows in a dataframe by a vector. # However, the default behavior appears to be for the vector to be

[R] Question about error message - or is it a bug?

2006-11-10 Thread Carmen Meier
Hi to all ... the same code, but another question. I changed only the type='n' to type='l' and debugged the function xy.coords. with type = 'l' : there are the correct values of x and y inside the function xy.coords but the y value is filled with NA seems that the length is matching now because

Re: [R] Question about error message - or is it a bug?

2006-11-10 Thread Sundar Dorai-Raj
Carmen Meier said the following on 11/10/2006 9:46 AM: Hi to all ... the same code, but another question. I changed only the type='n' to type='l' and debugged the function xy.coords. with type = 'l' : there are the correct values of x and y inside the function xy.coords but the y value is

[R] Question about position in row and column

2006-11-09 Thread Jenny persson
Hi R-users, I have 48 blocks like below 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 in each block there are 18 cloumns and 18 rows which give 18*18*48 observations. The

Re: [R] question on multilevel modeling

2006-11-08 Thread David Duffy
Christine A. Calmes [EMAIL PROTECTED] wrote: [...] Basically, I am trying to test a psychological model in which a person's level of passive, negative communication with others in their environment (CORUMTO) on one week predicts their level of depression on the following week (BDIAFTER)

Re: [R] question on multilevel modeling

2006-11-07 Thread Chuck Cleland
Christoph Buser wrote: Dear Christine I think the problem in your second model is that you are including CORUMTO both as a fixed effect and as a random effect. That by itself should not be a problem. Here is an example in which age appears in both the fixed and random part of a model:

Re: [R] question on multilevel modeling

2006-11-07 Thread Christine A. Calmes
University of New York Park Hall 216 Buffalo, NY 14260 [EMAIL PROTECTED] (716) 645-3650 x578 -Original Message- From: Chuck Cleland [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 07, 2006 5:00 AM To: Christoph Buser Cc: Christine A. Calmes; R-help@stat.math.ethz.ch Subject: Re: [R] question

[R] question on multilevel modeling

2006-11-07 Thread Dave Atkins
Christine-- You have two and only two individuals per dyad; when you try to fit random slopes at level-2 (within couples), you are attempting to estimate an intercept, slope, and covariance for each individual. Basically, you don't have enough data to do it. If you restrict yourself to a

Re: [R] question about function gls in library nlme

2006-11-06 Thread Renaud Lancelot
library(nlme) fm1 - gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary, +correlation = corARMA(form = ~ 1 | Mare, p = 2)) summary(fm1) Generalized least squares fit by REML Model: follicles ~ sin(2 * pi * Time) + cos(2 * pi * Time) Data: Ovary AIC BIClogLik

[R] question on multilevel modeling

2006-11-06 Thread Christine A. Calmes
Hi, I am trying to run a multilevel model with time nested in people and people nested in dyads (3 levels of nesting) by initially running a series of models to test whether the slope/intercept should be fixed or random. The problem that I am experiencing appears to arise between the random

[R] question about function gls in library nlme

2006-11-05 Thread yyan liu
Hi: The gls function I used in my code is the following fm-gls(y~x,correlation=corARMA(p=2) ) My question is how to extact the AR(2) parameters from fm. The object fm is the following. How can I extract the correlation parameters Phi1 and Phi2 from fm? These two parametrs is not in

[R] question about your photo

2006-11-04 Thread Manuela
I've accidently found [1]your photo at a flickr and i'm very interested in it. Can you tell me what place i can see in the background of it? --- wbr, Barbara References 1. file://localhost/home/cmf3/tasks/keeper_au_new/0lXwcx/http://www.hunting.pl/flickr.html

[R] question of one matrix column being treated as list rather than vector

2006-11-03 Thread Waverley
Hi, I have one matrix derived from my function. It is as following: Browse[1] each.uaa.data [,1] [,2] [1,] 33 152.3530 [2,] 33 264.7059 [3,] 51 583. [4,] 33 323. [5,] 50 292.549 [6,] 33 300 [7,] 56 104.1176 [8,] 52 246.6667 [9,] 53 242.5490 [10,] 33

Re: [R] question of one matrix column being treated as list rather than vector

2006-11-03 Thread Tamas K Papp
On Fri, Nov 03, 2006 at 02:47:37PM -0800, Waverley wrote: Hi, You probably created that matrix from a list. Eg a - matrix(list(1,2,3,4),2,2) a [,1] [,2] [1,] 13 [2,] 24 a[,2] [[1]] [1] 3 [[2]] [1] 4 b - matrix(1:4,2,2) b[,2] [1] 3 4 Both a and b are matrices, but

[R] Question on cross-validation in rpart

2006-11-02 Thread Brian Sanborn
Hi R folks, I am using R version 2.2.1 for Unix. I am exploring the rpart function, in particular the rpart.control parameter. I have tried using different values for xval (0, 1, 10, 20) leaving other parameters constant but I receive the same tree after each run. Is the10 fold

Re: [R] Question on cross-validation in rpart

2006-11-02 Thread Prof Brian Ripley
On Thu, 2 Nov 2006, Brian Sanborn wrote: Hi R folks, I am using R version 2.2.1 for Unix. I am exploring the rpart function, in particular the rpart.control parameter. I have tried using different values for xval (0, 1, 10, 20) leaving other parameters constant but I receive the same tree

[R] Question: xyplot panel configurations for Trellis package

2006-10-27 Thread Zheleznyak, Anatoley
Hi, I am new to R community and I have a question on panel configurations in the Trellis package. Particularly, I have the following code: require(lattice) plotTable - NULL Date - seq(as.Date(2006-11-01), as.Date(2009-12-01), by = 1) nYear - length(unique(format(Date,%Y))) plotTable$Date -

Re: [R] Question: xyplot panel configurations for Trellis package

2006-10-27 Thread hadley wickham
On 10/27/06, Zheleznyak, Anatoley [EMAIL PROTECTED] wrote: Hi, I am new to R community and I have a question on panel configurations in the Trellis package. Particularly, I have the following code: require(lattice) plotTable - NULL Date - seq(as.Date(2006-11-01), as.Date(2009-12-01), by =

Re: [R] Question: xyplot panel configurations for Trellis package

2006-10-27 Thread Deepayan Sarkar
On 10/27/06, Zheleznyak, Anatoley [EMAIL PROTECTED] wrote: Hi, I am new to R community and I have a question on panel configurations in the Trellis package. Particularly, I have the following code: require(lattice) plotTable - NULL Date - seq(as.Date(2006-11-01), as.Date(2009-12-01), by =

[R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
Hi I am using ggplot under R 2.4 / Linux. When using ggsmooth(method=lm) is there a way to show the results of the separate linear regressions? Thanks Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology and Entomology

Re: [R] Question concerning ggplot

2006-10-24 Thread hadley wickham
When using ggsmooth(method=lm) is there a way to show the results of the separate linear regressions? Do you mean doing a seperate linear regression for each group in your data? If so, have a look at ?gggroup for some examples of exactly that. Hadley

Re: [R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
hadley wickham wrote: When using ggsmooth(method=lm) is there a way to show the results of the separate linear regressions? Do you mean doing a seperate linear regression for each group in your data? If so, have a look at ?gggroup for some examples of exactly that. No. I do the

Re: [R] Question concerning ggplot

2006-10-24 Thread hadley wickham
Do you mean doing a seperate linear regression for each group in your data? If so, have a look at ?gggroup for some examples of exactly that. No. I do the following: p - ggplot(cc, . ~ expert, aesthetic=list(y=x0050, x=generation)) ggjitter(p) ggsmooth(method=lm) And I get

Re: [R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
hadley wickham wrote: Do you mean doing a seperate linear regression for each group in your data? If so, have a look at ?gggroup for some examples of exactly that. No. I do the following: p - ggplot(cc, . ~ expert, aesthetic=list(y=x0050, x=generation)) ggjitter(p)

Re: [R] Question concerning ggplot

2006-10-24 Thread hadley wickham
rsqs - as.data.frame(stamp(mtcars, cyl ~ ., function(df) summary(lm(mpg ~ wt, data=df))$r.squared)) rsqs$wt - 4 rsqs$mpg - 32 ggtext(p, data=rsqs, aes=list(label=value)) But that doesn't work for some reason I don't understand yet (but I'm working on it) Ooops - I just had the

Re: [R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
hadley wickham wrote: rsqs - as.data.frame(stamp(mtcars, cyl ~ ., function(df) summary(lm(mpg ~ wt, data=df))$r.squared)) rsqs$wt - 4 rsqs$mpg - 32 ggtext(p, data=rsqs, aes=list(label=value)) But that doesn't work for some reason I don't understand yet (but I'm working on it)

Re: [R] Question about random sampling in R

2006-10-20 Thread tom soyer
Oh yes, you are right. It seems that the default distribution used for sampling is uniform. And whether the resampling generates a random distribution or not depends on the distribution being sampled. Thanks everyone for your help! I appreciate your support very much. Tom On 10/19/06, Ted

[R] Question about random sampling in R

2006-10-19 Thread tom soyer
Hi, I looked up the help file on sample(), but didn't find the info I was looking for. When sample() is used to resample from a distribution, e.g., bootstrap, how does it do it? Does it use an uniform distribution, e.g., runif(), or something else? And, when the help file says:sample(x)

Re: [R] Question about random sampling in R

2006-10-19 Thread Liaw, Andy
When sampling with replacement (like ordinary bootstrap), each draw is done independently, and in each draw every point has equal probability of being drawn. When sampling without replacement (random permutation), all possible sequences (permutations) have equal probability of occurring. E.g.,

Re: [R] Question about random sampling in R

2006-10-19 Thread Marc Schwartz
On Thu, 2006-10-19 at 12:07 -0500, tom soyer wrote: Hi, I looked up the help file on sample(), but didn't find the info I was looking for. When sample() is used to resample from a distribution, e.g., bootstrap, how does it do it? Does it use an uniform distribution, e.g., runif(), or

Re: [R] Question about random sampling in R

2006-10-19 Thread Ted Harding
On 19-Oct-06 tom soyer wrote: Hi, I looked up the help file on sample(), but didn't find the info I was looking for. When sample() is used to resample from a distribution, e.g., bootstrap, how does it do it? Does it use an uniform distribution, e.g., runif(), or something else? I don't

Re: [R] Question about random sampling in R

2006-10-19 Thread Francisco J. Zagmutt
Medicine and Biomedical Sciences Colorado State University From: Marc Schwartz [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: tom soyer [EMAIL PROTECTED] CC: r-help r-help@stat.math.ethz.ch Subject: Re: [R] Question about random sampling in R Date: Thu, 19 Oct 2006 13:10:20 -0500 On Thu, 2006

Re: [R] Question about random sampling in R

2006-10-19 Thread Alberto Monteiro
Tom Soyer wrote: I looked up the help file on sample(), but didn't find the info I was looking for. When sample() is used to resample from a distribution, e.g., bootstrap, how does it do it? Does it use an uniform distribution, e.g., runif(), or something else? And, when the help file

[R] Question about managing searching path

2006-10-17 Thread Tong Wang
Hi all, I'm having sometrouble with managing the seach path, in a function , I need to attach some data set at the begining and detach them at the end, say, myfunction- function() { attach(mylist); .detach(mylist) } , the problem is, since I am still debugging this

Re: [R] Question about managing searching path

2006-10-17 Thread vito muggeo
Dear Tong I think on.exit() makes the job..Namely: attach(Yourdata) on.exit(detach(YourData)) vito Tong Wang wrote: Hi all, I'm having sometrouble with managing the seach path, in a function , I need to attach some data set at the begining and detach them at the end, say,

Re: [R] Question about managing searching path

2006-10-17 Thread Duncan Murdoch
On 10/17/2006 3:49 AM, Tong Wang wrote: Hi all, I'm having sometrouble with managing the seach path, in a function , I need to attach some data set at the begining and detach them at the end, say, myfunction- function() { attach(mylist); .detach(mylist) } ,

[R] Question regarding analysis of normalised data

2006-10-11 Thread Ulrik Stervbo
Dear all, I want to see if the treatment of an animal with a specific compound has an effect on the expression of certain genes. Though my question is based in biology, it really is all about how to deal with the standard deviation in normalised data. I have three groups of animals; untreated,

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-11 Thread Yulei Gong
Thanks, Marc, I tried it and it didn't really work. x.num-as.numeric(x) is.numeric(x.num) [1] TRUE x.num-readClipboard() is.numeric(x.num) [1] FALSE is.character(x.num) [1] TRUE I use readClipboard to take in data, and it seems after the data is taken in, x.num changed to character. I just

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-11 Thread Marc Schwartz
Yulei, It would appear that the default mechanism for the function (which appears to be Windows specific) is to read in the data from the current system clipboard as a _character vector_. Thus, perhaps something like: x.num - as.numeric(readClipboard()) would be helpful. With respect to

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-11 Thread Yulei Gong
Marc, Thanks! x.num - as.numeric(readClipboard()) works perfect. Meanwhile, I have tried to use odbcConnectExcel from RODBC pack. It seems to work as well. I am able to read in the data, but I need to construct a sql table from the data, and use sqlFetch to retrieve and assign them to

[R] Question about error of non-numeric argument to binary operator

2006-10-10 Thread Yulei Gong
Hi, I have the following data and there is no binary operator contained, however, I still receive the error message when running unitrootTest function, could someone give me a guidance on it?? readClipboard() [1] 245246261.5 275.5 307284.5 289313.5 323.75 334 312.5 325

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-10 Thread Marc Schwartz
On Tue, 2006-10-10 at 22:35 -0400, Yulei Gong wrote: Hi, I have the following data and there is no binary operator contained, however, I still receive the error message when running unitrootTest function, could someone give me a guidance on it?? readClipboard() [1] 245246261.5

[R] winbugs - R question

2006-10-09 Thread allan clark
hi all i would like to use r and winbugs in order to undertake seemingly unrelated regression. i am using the R2WINBUGS library. i just simulated a simple example (sample size is 25) in order to get the correct code. i suspect that the problem is in my definition of the prior. it wants a

Re: [R] winbugs - R question

2006-10-09 Thread Gregor Gorjanc
allan clark allan at stats.uct.ac.za writes: hi all i would like to use r and winbugs in order to undertake seemingly unrelated regression. i am using the R2WINBUGS library. i just simulated a simple example (sample size is 25) in order to get the correct code. i suspect that the

[R] Question about merge()

2006-09-23 Thread Jonathan Greenberg
If I want to do a join based on *two* matching fields in two data frames, can merge() handle this? It appears to only handle a single matching column -- do I need to make a metacolumn or is there some way to do this? E.g.: Dataframe 1 contains columns A,B,C and Dataframe 2 contains A,B,D I

Re: [R] Question about merge()

2006-09-23 Thread X.H Chen
help of you. Xiaohui Chen Dept. of Statistics UBC, Canada From: Jonathan Greenberg [EMAIL PROTECTED] To: R-help r-help@stat.math.ethz.ch Subject: [R] Question about merge() Date: Sat, 23 Sep 2006 15:08:22 -0700 If I want to do a join based on *two* matching fields in two data frames, can

Re: [R] Question about merge()

2006-09-23 Thread Wensui Liu
MERGE DATA FRAMES BY 2 OR MORE VARIABLES ### # MERGE 2 DATA FRAMES BASED ON# # 2 OR MORE VARIABLES # ### data1-data.frame(x.id1 = 1:10, x.id2 = (1:10) * 2, x = rnorm(length(1:10)));

Re: [R] Question on apply() with more information...

2006-09-19 Thread Petr Pikal
to: r-help@stat.math.ethz.ch Subject:Re: [R] Question on apply() with more information... Hi, I tried both ideas, but it isn't that what I'm looking for. I want to avoid for loop, because the matrix is of big size(1200*1200 entries) With a loop I would do

[R] Question on apply()

2006-09-18 Thread Gunther Höning
Dear list, I try to do the following: I have an list of length n, with elements done by smooth.spline (SmoothList). Now I have a matrix with n rows and m columns with x-values(Xarray) Now I want ot predict the y-values. Therefor I want to take the first element of SmoothList and the first row

Re: [R] Question on apply()

2006-09-18 Thread Petr Pikal
at 8:05, Gunther Höning wrote: From: Gunther Höning [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Date sent: Mon, 18 Sep 2006 08:05:28 +0200 Subject:[R] Question on apply() Dear list, I try to do the following: I have

Re: [R] Question on apply() with more information...

2006-09-18 Thread Gunther Höning
:[EMAIL PROTECTED] Gesendet: Montag, 18. September 2006 08:43 An: Gunther Höning; r-help@stat.math.ethz.ch Betreff: Re: [R] Question on apply() Hi not much information about what can be wrong. As nobody knows your Xarray and SmoothList it is hard to guess. You even omitted to show what does not work So

Re: [R] Question on apply() with more information...

2006-09-18 Thread Petr Pikal
Höning [EMAIL PROTECTED] To: 'Petr Pikal' [EMAIL PROTECTED], r-help@stat.math.ethz.ch Subject:AW: [R] Question on apply() with more information... Date sent: Mon, 18 Sep 2006 09:26:01 +0200 Ok. I tried this too, but it still doesn't work. Here

Re: [R] Question on apply() with more information...

2006-09-18 Thread Gunther Höning
than just to predict a value, but it isn't important for the initial question... Gunther -Ursprüngliche Nachricht- Von: Petr Pikal [mailto:[EMAIL PROTECTED] Gesendet: Montag, 18. September 2006 11:44 An: Gunther Höning Cc: r-help@stat.math.ethz.ch Betreff: Re: AW: [R] Question on apply

Re: [R] Question on apply() with more information...

2006-09-18 Thread markleeds
From: =?ISO646-US?Q?Gunther_H=3Fning?= [EMAIL PROTECTED] Date: 2006/09/18 Mon AM 06:26:25 CDT To: 'Petr Pikal' [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Question on apply() with more information... I think you want something like below but it probably needs some fixing up

[R] question about pairs observations

2006-09-15 Thread Bruno Grimaldo Martinho Churatae
Hi, I would like to paired ID_ with Cod for analysis in spdep. Any ideas? head(bai$att.data) ID_ NAME1_ NAME2_ PARTS_ POINTS_ LENGTH_ AREA_ 1 410690205001 410690205001 NA 1 158 5.243338 1.2668820 2 410690205009 410690205009 NA 1 159 6.071286

[R] Question about span in Loess function

2006-09-15 Thread Zhou, Yijie
Hi, I want to do 2-dimentional loess smoothing in gam through the command gam(Y~lo(X1,X2,span=span,degree=1) ) in library gam. The span is the percentage of data points to define the neighborhood and used for the smoothing. Does this command do one 2-dimentional smoothing with

[R] R-question

2006-09-13 Thread Thorsten Muehge
Hello Colleagues, I programmed in SAS for 3 years and would like to switch to a not so costly software product. Hence I started to evaluate R, and my first test look promising. However I have some question: 1. Is it possible to query R files by SQL internally on data frames (not on a

Re: [R] R-question

2006-09-13 Thread Jim Lemon
Thorsten Muehge wrote: Hello Colleagues, I programmed in SAS for 3 years and would like to switch to a not so costly software product. Hence I started to evaluate R, and my first test look promising. However I have some question: 1. Is it possible to query R files by SQL internally

Re: [R] R-question

2006-09-13 Thread Anupam Tyagi
Thorsten Muehge MUEHGE at de.ibm.com writes: 1. Is it possible to query R files by SQL internally on data frames (not on a database) and how is the syntax (I have the RODBC package installed). It is possible to do similar things conceptually in R as in SQL---at least the basic SQL queries (I

Re: [R] R-question

2006-09-13 Thread Wensui Liu
For your 1st question, you can write query against the tables in DB using RODBC. Being a SAS programmer, I have to say that reporting function of R is not as good as that of SAS. On 9/13/06, Thorsten Muehge [EMAIL PROTECTED] wrote: Hello Colleagues, I programmed in SAS for 3 years and

Re: [R] R-question

2006-09-13 Thread Frank E Harrell Jr
Wensui Liu wrote: For your 1st question, you can write query against the tables in DB using RODBC. Being a SAS programmer, I have to say that reporting function of R is not as good as that of SAS. I beg to differ. See for example http://biostat.mc.vanderbilt.edu/StatReport Frank Harrell

<    1   2   3   4   5   6   7   8   9   10   >