[R] Questions concerning HOPACH

2007-07-23 Thread W. Katy
Hi, I have been tried to apply hopach HOPACH in R to cluster some genes. My data is a binary matrix. It works well for the whole set of genes (say, 1000 genes). Then I selected a subset of the genes (say 300 genes). These genes are selected based on the regression analysis results for

[R] Questions regarding R and fitting GARCH models

2007-07-19 Thread Jeroen van der Heide
Dear all, I've recently switched from EViews to R with RMetrics/fSeries (newest version of july 10) for my analysis because of the much bigger flexibility it offers. So far my experiences had been great -prior I had already worked extensively with S-Plus so was already kind of familiar with the

Re: [R] Questions regarding R and fitting GARCH models

2007-07-19 Thread Dale Smith
@stat.math.ethz.ch Subject: [R] Questions regarding R and fitting GARCH models Dear all, I've recently switched from EViews to R with RMetrics/fSeries (newest version of july 10) for my analysis because of the much bigger flexibility it offers. So far my experiences had been great -prior I had already worked

Re: [R] questions on lme function

2007-07-04 Thread Dr Ross Darnell
Ana You are estimating a random coefficient model on 5 individuals (mean and variance). Are you sure this is wise? Ross Darnell - Original Message - From: Ana Conesa [EMAIL PROTECTED] Date: Thursday, July 5, 2007 1:21 am Subject: [R] questions on lme function Dear list, I am

[R] questions for hist()

2007-06-21 Thread Donghui Feng
Dear all, I'm creating a histogram with the function hist(). But right now what I get is column representation (as normal). I'm wondering if I could switch X-axis and Y-axis and get row-representation of frequencies? One more question, can I define the step of each axises for the histogram?

[R] Questions about bwplot

2007-05-21 Thread Klaus Nordhausen
Dear R-experts, I have some questions about boxplots with lattice. My data is similar as in the example below, I have two factors (Goodness of Fit and Algorithms) and data values but in each panels the scales are quite different, therefore the normal boxplots produced by set.seed(1) GOF -

Re: [R] Questions about bwplot

2007-05-21 Thread Richard M. Heiberger
## I simplified this panel function by taking the calculations outside ## the panel function to allow use of the original variable names. my.boxpanel3 - function(x, y, subscripts, ..., medians, best) { cols - grey(1-best[,panel.number()]/3) panel.bwplot(x, y, fill=cols, ...)

Re: [R] Questions about bwplot

2007-05-21 Thread Charilaos Skiadas
On May 21, 2007, at 8:39 AM, Klaus Nordhausen wrote: Dear R-experts, I have some questions about boxplots with lattice. My data is similar as in the example below, I have two factors (Goodness of Fit and Algorithms) and data values but in each panels the scales are quite different,

[R] questions on package of KEGG

2007-05-16 Thread Li, Hua
Dear list members: Once I know a KEGG pathway identifier, how can I check all its direct children identifiers? you know, I could use GOMFCHILDREN or GOCCCHILDREN to check the children terms for a specific GO term, but I don't know how to do it in the same way for KEGG in R? Many Thanks!!

Re: [R] questions on package of KEGG

2007-05-16 Thread Seth Falcon
Li, Hua [EMAIL PROTECTED] writes: Dear list members: Once I know a KEGG pathway identifier, how can I check all its direct children identifiers? you know, I could use GOMFCHILDREN or GOCCCHILDREN to check the children terms for a specific GO term, but I don't know how to do it in the same

[R] Questions about statistics: ARIMA modeling seasonal MA term close to -1

2007-04-11 Thread sj
Hello, I am trying to fit a seasonal ARIMA model. I am using the ARIMA package in R. when I look at the model coefficients I find that that the first order seasonal moving average term is very close to -1(this is after first order seasonal differencing), I have tried to look at the literature on

[R] Questions regarding biplot

2007-03-02 Thread Ravi Varadhan
Hi, I am using biplot (in package stats) to visualize the results of some PCA analyses. When I use scale=0 in the biplot function, it draws X (PC1) and Y (PC2) axes, with the scales multiplied by sqrt(N), where N is the sample size. Is there a way to change these scales so that the actual

Re: [R] Questions about results from PCAproj for robust principal component analysis

2007-02-14 Thread Peter Filzmoser
Hi, PCAproj is mainly designed for robust PCA and not for classical PCA. Therefore, when applying classical estimators to the results of a robust PCA, like the mean to the robust PCA scores, this will usually not give zeros. The robust PCs have been centred robustly, and not classically by the

Re: [R] Questions about results from PCAproj for robust principal component analysis

2007-02-14 Thread Talbot Katz
Professor Filzmoser. Thank you so much for the detailed response. It is very helpful. -- TMK -- 212-460-5430home 917-656-5351cell From: Peter Filzmoser [EMAIL PROTECTED] To: Talbot Katz [EMAIL PROTECTED] CC: r-help@stat.math.ethz.ch Subject: Re: Questions about results from PCAproj

[R] Questions about results from PCAproj for robust principal component analysis

2007-02-13 Thread Talbot Katz
Hi. I have been looking at the PCAproj function in package pcaPP (R 2.4.1) for robust principal components, and I'm trying to interpret the results. I started with a data matrix of dimensions RxC (R is the number of rows / observations, C the number of columns / variables). PCAproj returns a

[R] Questions on counts by case

2007-02-06 Thread Serguei Kaniovski
Hi all, for the data below I would like to 1. generate a dummy variable for each group gr of the same composition by people, then save each portion in a separate file, 2. compute the frequency of 1's in x for each person by group gr. So, mike will have freq=2/3, as he has two 1 and one 0 in

Re: [R] Questions on counts by case

2007-02-06 Thread jim holtman
On 2/6/07, Serguei Kaniovski [EMAIL PROTECTED] wrote: Hi all, for the data below I would like to 1. generate a dummy variable for each group gr of the same composition by people, then save each portion in a separate file, This gives back a list that you can go through and write out each

[R] Questions about xtable and print.xtable

2007-01-22 Thread Charilaos Skiadas
I have been using the wonderful xtable package lately, in combination with Sweave, and I have a couple of general questions along with a more particular one. I'll start with the particular question. I basically have a 1x3 array with column names but no row names. I want to create a latex

[R] Questions about paste and assign

2007-01-13 Thread Tong Wang
Hi, I would like to assign a value to a member b of the list a in position 3, by calling: assign( target, 2.34, 3) My question is what the target should be. I tried target - paste(a, $, b) and something else, but haven't got the right

Re: [R] Questions about paste and assign

2007-01-13 Thread Gabor Grothendieck
Try this: a - list(a = 1, b = 2, c = 3) assign(a, replace(get(a), 3, 2.34)) a $a [1] 1 $b [1] 2 $c [1] 2.34 On 1/13/07, Tong Wang [EMAIL PROTECTED] wrote: Hi, I would like to assign a value to a member b of the list a in position 3, by calling:

[R] Questions about saving output files and popup

2006-12-13 Thread u9470002
Hi all: After calculating in R I want to show the answer and some explanations not graphic plots in another new device and then save it as txt.file. However, I couldn't find any package or command to do it yet. I know some commands about generating graphics on different types of display or

Re: [R] Questions about saving output files and popup

2006-12-13 Thread Chuck Cleland
u9470002 wrote: Hi all: After calculating in R I want to show the answer and some explanations not graphic plots in another new device and then save it as txt.file. However, I couldn't find any package or command to do it yet. I know some commands about generating graphics on different

[R] Questions about regression with time-series

2006-12-06 Thread Lulla OPATOWSKI
Hi, I am using 2 times series and I want to carry out a regression of Seri1 by Serie2 using structured (autocorrelated) errors. (Equivalent to the autoreg function in SAS) I found the function gls (package nlme) and I made: gls_mens-gls(mening_s_des~dataATB, correlation = corAR1()) My problem

Re: [R] Questions about regression with time-series

2006-12-06 Thread Giovanni Petris
I think the function 'arima' can handle this, except for the automatic evaluation of the ARMA orders. Giovanni Date: Wed, 06 Dec 2006 12:06:46 +0100 From: Lulla OPATOWSKI [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Precedence: list --===0156932283== Content-Disposition:

[R] questions

2006-11-28 Thread giuseppe scasserra
hi, my name is giuseppe and i am an engineer, i am using R for regressions analysis using mixed random effects model, funztion nlme. quastions are: 1) when i ask for the summary after a regression using nlme function the program gives me the values of the coefficients and also the standard

Re: [R] questions

2006-11-28 Thread Andrew Robinson
Hi Guiseppe, On Wed, Nov 29, 2006 at 01:26:37AM +, giuseppe scasserra wrote: hi, my name is giuseppe and i am an engineer, i am using R for regressions analysis using mixed random effects model, funztion nlme. quastions are: 1) when i ask for the summary after a regression using nlme

Re: [R] Questions about generating samples in R

2006-11-27 Thread Peter Dalgaard
Christian Schulz [EMAIL PROTECTED] writes: split - sample(2,nrow(dataframe),replace=T,prob=c(0.04,0.96)) dataframe[split==1,] # 200 dataframe[split==2,] # 4800 regards, christian ?sample should tell you what you need to know. It does, but the above is not how. To get exactly 200

Re: [R] Questions about generating samples in R

2006-11-27 Thread Mark Na
Further to Alexander's question ... could anyone provide assistance with random stratified sampling? Let's say we have Alex's dataframe and we want to stratify the random selection by group membership (which is contained in one of the eight columns). We might want to randomly select: 1) a

Re: [R] Questions about generating samples in R

2006-11-27 Thread Charles C. Berry
On Mon, 27 Nov 2006, Mark Na wrote: Further to Alexander's question ... could anyone provide assistance with random stratified sampling? Let's say we have Alex's dataframe and we want to stratify the random selection by group membership (which is contained in one of the eight columns). We

[R] Questions about generating samples in R

2006-11-26 Thread Alexander Geisler
Hello! I have a data set with 8 columns and in about 5000 rows. What I want to do is to generate samples of this data set. Samples of a special size, as example 200. What is the easiest way to do this? No special things are needed, only the random selection of 200 rows of the data set.

Re: [R] Questions about generating samples in R

2006-11-26 Thread David Barron
?sample should tell you what you need to know. On 26/11/06, Alexander Geisler [EMAIL PROTECTED] wrote: Hello! I have a data set with 8 columns and in about 5000 rows. What I want to do is to generate samples of this data set. Samples of a special size, as example 200. What is the easiest

Re: [R] Questions about generating samples in R

2006-11-26 Thread Christian Schulz
split - sample(2,nrow(dataframe),replace=T,prob=c(0.04,0.96)) dataframe[split==1,] # 200 dataframe[split==2,] # 4800 regards, christian ?sample should tell you what you need to know. On 26/11/06, Alexander Geisler [EMAIL PROTECTED] wrote: Hello! I have a data set with 8 columns and

Re: [R] Questions regarding integrate function

2006-11-22 Thread Le Wang
A follow-up. Thanks to Matthias, the codes worked very well. Le On 11/18/06, Matthias Kohl [EMAIL PROTECTED] wrote: Hello, your integrand needs to be a function which accepts a numeric vector as first argument and returns a vector of the same length (see ?integrate). Your function

[R] questions about garchFit

2006-11-21 Thread T Mu
Hi all, I was trying garchFIt() of fSeries to fit volatility of monthly log returns of SP500. I tried residuals of normal, student t, skew normal, skew t. But all innovations except normal got exaxtly same coefficients, even if I changed their parameters of skew and shape. Is this correct for

Re: [R] questions on adding reference line?

2006-11-19 Thread Prof Brian Ripley
Your example is incomplete (what is x?), but axis(1, at=0.5) may be what you are looking for. On Sun, 19 Nov 2006, zhijie zhang wrote: Dear Ruser, I use abline() function to add the reference line successfully, but i can't display the values corresponding to the reference line on the x/y

[R] Questions regarding integrate function

2006-11-18 Thread Le Wang
Hi there. Thanks for your time in advance. I am using R 2.2.0 and OS: Windows XP. 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 marginal densities.

Re: [R] Questions regarding integrate function

2006-11-18 Thread Matthias Kohl
Hello, your integrand needs to be a function which accepts a numeric vector as first argument and returns a vector of the same length (see ?integrate). Your function does not fulfill this requirement. Hence, you have to rewrite your function or use sapply, apply or friends; something like

[R] questions on adding reference line?

2006-11-18 Thread zhijie zhang
Dear Ruser, I use abline() function to add the reference line successfully, but i can't display the values corresponding to the reference line on the x/y axis, anybody knows how to display it? *My simulated programs:* y-rnorm(50) plot(x,y) abline(v=0.5) *#my question is how to display x=0.5

Re: [R] questions on adding reference line?

2006-11-18 Thread Gabor Grothendieck
Try: axis(1, 0.5, tick = TRUE) On 11/18/06, zhijie zhang [EMAIL PROTECTED] wrote: Dear Ruser, I use abline() function to add the reference line successfully, but i can't display the values corresponding to the reference line on the x/y axis, anybody knows how to display it? *My simulated

[R] questions regarding integrate function in R

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 marginal densities. My problem: I have the following R

[R] Questions about date/time and truncating

2006-10-20 Thread Jonathan Greenberg
I'm getting a weird behavior using R 2.5.0 for MacOS X -- I have a csv file with a properly formatted date/time field, e.g. After reading in the csv to hourly_met_data, with a date field hourly_met_data$date - as.POSIXct(hourly_met_data$date) works exactly as it is supposed to (e.g. Min/max of

Re: [R] Questions about date/time and truncating

2006-10-20 Thread Jonathan Greenberg
Thanks! Worked like a charm! hourly_met_data$date - as.POSIXct(trunc(as.POSIXct(hourly_met_data$date),day)) --j On 10/20/06 3:31 PM, jim holtman [EMAIL PROTECTED] wrote: trunc returns a type of POSIXlt. You have to apply 'as.POSIXct' to the result. On 10/20/06, Jonathan Greenberg

Re: [R] R questions

2006-09-19 Thread Petr Pikal
:[R] R questions I have a few questions for R: 1. Other than using a built-in function such as mean(), how do I know if it is installed in my current version of R? see the difference between installed packages (e.g. those you have in your library directory and packages attached by library

Re: [R] R questions

2006-09-19 Thread Uwe Ligges
You might want to read Ligges (2003): R Help Desk: Getting Help - R's Help Facilities and Manuals, R News 3(1), 26--28, http://cran.r-project.org/doc/Rnews/Rnews_2003-1.pdf Uwe Ligges Lynda wrote: I have a few questions for R: 1. Other than using a built-in function such as mean(), how

[R] R questions

2006-09-18 Thread Lynda
I have a few questions for R: 1. Other than using a built-in function such as mean(), how do I know if it is installed in my current version of R? 2. To get help in R, I can use several ways: ?sort help.search(sort) help(sort) apropos(sort) the help menu are there any other ways to get help?

[R] Questions about sort data

2006-09-04 Thread Xiao Zhao
Dear R users, I am doing my project which I want to plot a piecewise function, I knew that I can use the command segments to plot. But the problem is I want to use my real data which needs me to sort of my data by using the 'if else'command, I use it If(t[i]36) lambda-0.5 Else lambda-0.2 The

Re: [R] Questions about sort data

2006-09-04 Thread Gabor Grothendieck
Regarding your other questions On 9/4/06, Xiao Zhao [EMAIL PROTECTED] wrote: Dear R users, I am doing my project which I want to plot a piecewise function, I knew that I can use the command segments to plot. But the problem is I want to use my real data which needs me to sort of my data by

Re: [R] Questions about sweave...

2006-08-04 Thread Dieter Menne
Brian Lunergan ff809 at ncf.ca writes: Evening all: I'm taking a little time to experiment with R, Sweave, and Miktex/LaTex but I've run up against some problems and -well- I hope that there are some on the list who might have some suggestions. This will be kind of wordy as I will

Re: [R] Questions about sweave... question answered and problem solved

2006-08-04 Thread Brian Lunergan
* Dieter Menne wrote, On 2006-08-04 02:57: Brian Lunergan ff809 at ncf.ca writes: Evening all: I'm taking a little time to experiment with R, Sweave, and Miktex/LaTex but I've run up against some problems and -well- I hope that there are some on the list who might have some suggestions.

[R] questions on plotting dedrograms

2006-08-03 Thread scheidler
Hi, i've two questions concerning the plot of a dendrogram. first, i use hclust for clustering and if i plot the dendrogram, then the maximal height is the maximal dissimilarity found in my data. but i want to have a arbitary maximal height. for example if the maximal dissimilarity in my data

[R] questions on plotting dedrograms

2006-08-03 Thread scheidler
Hi, i've two questions concerning the plot of a dendrogram. first, i use hclust for clustering and if i plot the dendrogram, then the maximal height is the maximal dissimilarity found in my data. but i want to have a arbitary maximal height. for example if the maximal dissimilarity in my data

[R] Questions about sweave...

2006-08-03 Thread Brian Lunergan
Evening all: I'm taking a little time to experiment with R, Sweave, and Miktex/LaTex but I've run up against some problems and -well- I hope that there are some on the list who might have some suggestions. This will be kind of wordy as I will include the complete files involved as I'm just not

[R] questions on aggregate data

2006-08-02 Thread zhijie zhang
Dear friends, my question is how to aggregate dataset and the inverse manipulation. e.g.My dataset data structure1: x 1 1 2 3 3 data structure2: x freq 1 2 2 1 3 2 Then how to generate dataset2 from dataset1 and generate dataset1 from dataset2? e.g. dataset2 from dataset1 : x-c(1,1,2,3,3)

Re: [R] questions on aggregate data

2006-08-02 Thread Jacques VESLOT
data.frame(x = with(df1, rep(x, freq))) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue du Professeur Calmette B.P. 245 59019 Lille Cedex Tel : 33 (0)3.20.87.10.44 Fax : 33 (0)3.20.87.10.31 http://www-good.ibl.fr

Re: [R] questions regarding spline functions

2006-08-01 Thread Dylan Beaudette
] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dylan Beaudette Sent: Monday, July 31, 2006 6:43 PM To: RHELP Subject: [R] questions regarding spline functions Greetings, A couple general questions regarding the use of splines to interpolate

[R] questions regarding spline functions

2006-07-31 Thread Dylan Beaudette
Greetings, A couple general questions regarding the use of splines to interpolate depth profile data. Here is an example of a set of depths, with associated attributes for a given soil profile, along with a function for calculating midpoints from a set of soil horizon boundaries: #calculate

Re: [R] Questions concerning function 'svm' in e1071 package (solved)

2006-07-17 Thread Van Kerckhoven, Johan
Greetings everyone, The problem has been solved. A faulty evaluation of the decision Function was the culprit. Signed, Johan Van Kerckhoven Greetings everyone, I have the following problem (illustrating R-code at bottom of mail): Given a training sample with binary outcomes (-1/+1), I

Re: [R] Questions about extract-lme.cov

2006-07-15 Thread Dieter Menne
Li, Hua HUL at stowers-institute.org writes: I am using extract.lme.cov to extract the covariance matrix of lme. But the results are not expected. b - lme(travel~1,Rail,~1|Rail) The default correlation for lme is no correlation within groups. extract.lme.cov(b,Rail) The part of

[R] Questions about extract-lme.cov

2006-07-14 Thread Li, Hua
Hi, all: I am using extract.lme.cov to extract the covariance matrix of lme. But the results are not expected. For example, b - lme(travel~1,Rail,~1|Rail) The default correlation for lme is no correlation within groups. extract.lme.cov(b,Rail) The part of covariance matrix looks like:

Re: [R] questions on data management

2006-07-06 Thread Jacques VESLOT
merge(mn[sample(1:nrow(mn), 3, rep=F),], xy, by.x=c(m,n), by.y=c(x,y)) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue du Professeur Calmette B.P. 245 59019 Lille Cedex Tel : 33 (0)3.20.87.10.44 Fax : 33 (0)3.20.87.10.31

Re: [R] questions on data management

2006-07-06 Thread Jacques VESLOT
mnu - unique(mn[order(mn$m,mn$n),]) mnu$p - table(paste(mn$m, mn$n)) merge(mnu[sample(1:nrow(mnu), size=3, prob=mnu$p, replace=F), c(m,n)], xy, by.x=c(m,n), by.y=c(x,y)) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue

[R] questions on data management

2006-07-05 Thread zhijie zhang
Dear friends, suppose i have two datasets: A and B A: id-1:6 x-c(1,2,3,4,5,6) y-c(2,4,6,8,3,2) xy-data.frame(id,x,y) B m-c(1,1,3,3,5,5) n-c(2,2,6,6,3,3) mn-data.frame(m,n) Now, i want to perfomr two tasks: 1. get a subset of B,no duplicate values,: C: m n 1 2 3 6 5 3 2.Extract the values in A

[R] Questions concerning function 'svm' in e1071 package

2006-07-03 Thread Van Kerckhoven, Johan
Greetings everyone, I have the following problem (illustrating R-code at bottom of mail): Given a training sample with binary outcomes (-1/+1), I train a linear Support Vector Machine to separate them. Afterwards, I compute the weight vector w in the usual way, and obtain the fitted values as w'x

Re: [R] questions on local customized R distribution CD

2006-06-27 Thread Liaw, Andy
From: Duncan Murdoch On 6/26/2006 3:14 PM, Dongseok Choi wrote: Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching program. We hope to use and test R as

Re: [R] questions on local customized R distribution CD

2006-06-27 Thread Prof Brian Ripley
On Tue, 27 Jun 2006, Liaw, Andy wrote: From: Duncan Murdoch On 6/26/2006 3:14 PM, Dongseok Choi wrote: Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching program. We hope

Re: [R] questions on local customized R distribution CD

2006-06-27 Thread Duncan Murdoch
On 6/27/2006 8:05 AM, Liaw, Andy wrote: From: Duncan Murdoch On 6/26/2006 3:14 PM, Dongseok Choi wrote: Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching

[R] questions on local customized R distribution CD

2006-06-26 Thread Dongseok Choi
Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching program. We hope to use and test R as teaching tools. So, we think that a menu system (like R commander) with a few packages

Re: [R] questions on local customized R distribution CD

2006-06-26 Thread Duncan Murdoch
On 6/26/2006 3:14 PM, Dongseok Choi wrote: Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching program. We hope to use and test R as teaching tools. So, we think that a

[R] Questions to RDCOMClient

2006-04-25 Thread Dr. Michael Wolf
Dear list members, I'm using R in connection with the RDCOMClient and Excel. The more I use the package, the more I'm fascinated of it. The possibilities of R can be brought together with the necessities of outputing my socio-economical research results in MS Office! But I have some special

Re: [R] Questions to RDCOMClient

2006-04-25 Thread Gabor Grothendieck
On 4/25/06, Dr. Michael Wolf [EMAIL PROTECTED] wrote: 3. RDCOMCLient and Excel Manual === Do you know a good overview of using Excel VBA code via RDCOMClient (e. g. sh$Select())? Are there people interesting in working out such a paper? I could contribute some

Re: [R] Questions on formula in princomp

2006-04-17 Thread Berton Gunter
-help@stat.math.ethz.ch Subject: Re: [R] Questions on formula in princomp jim holtman [EMAIL PROTECTED] wrote: does this explain it? groups - factor(c(rep(Z,5),rep(X,5),rep(Y,5))) groups [1] Z Z Z Z Z X X X X X Y Y Y Y Y Levels: X Y Z as.integer(groups) [1] 3 3 3 3 3 1 1 1

Re: [R] Questions on formula in princomp

2006-04-14 Thread Sasha Pustota
Gabor Grothendieck [EMAIL PROTECTED] wrote: Sasha Pustota [EMAIL PROTECTED] wrote: ir - rbind(iris3[,,1], iris3[,,2], iris3[,,3]) lir - data.frame(log(ir)) names(lir) - c(a,b,c,d) I'm trying to understand the meaning of expressions like ~ a+b+c+d, used with princomp, e.g. princomp(~

Re: [R] Questions on formula in princomp

2006-04-14 Thread Gabor Grothendieck
Just use model.frame to examine what is passed: ir - rbind(iris3[,,1], iris3[,,2], iris3[,,3]) lir - data.frame(log(ir)) names(lir) - c(a,b,c,d) lir[1,1] - NA mf - model.frame(~., lir,na.action=na.omit) head(mf) ab c d 2 1.589235 1.098612 0.3364722

Re: [R] Questions on formula in princomp

2006-04-14 Thread Sasha Pustota
Ok, that was just my wishful thinking. Is there a way to plot repeated labels that identify groups, e.g. factor(c(rep(s,50),rep(c,50),rep(v,50))) instead of 1--150 row indices, using something like biplot(princomp(lir)) ? Gabor Grothendieck [EMAIL PROTECTED] wrote: Just use model.frame to

Re: [R] Questions on formula in princomp

2006-04-14 Thread Berton Gunter
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sasha Pustota Sent: Friday, April 14, 2006 3:35 PM To: r-help@stat.math.ethz.ch Subject: Re: [R] Questions on formula in princomp Ok, that was just my wishful thinking. Is there a way to plot

Re: [R] Questions on formula in princomp

2006-04-14 Thread Sasha Pustota
Berton Gunter [EMAIL PROTECTED] wrote: plot(myscores[,1:2],pch=c('s','c','v')[groups]) Thanks, this works. How to understand the result of the expression c(1,2,'3)[groups] [1] 3 3 3 3 3 1 1 1 1 1 2 2 2 2 2 where groups - factor(c(rep(X,5), rep(Y,5), rep(Z,5))) ? Sorry if it's

Re: [R] Questions on formula in princomp

2006-04-14 Thread Sasha Pustota
Sasha Pustota [EMAIL PROTECTED] wrote: Berton Gunter [EMAIL PROTECTED] wrote: plot(myscores[,1:2],pch=c('s','c','v')[groups]) Thanks, this works. How to understand the result of the expression c(1,2,'3)[groups] [1] 3 3 3 3 3 1 1 1 1 1 2 2 2 2 2 where groups -

Re: [R] Questions on formula in princomp

2006-04-14 Thread jim holtman
does this explain it? groups - factor(c(rep(Z,5),rep(X,5),rep(Y,5))) groups [1] Z Z Z Z Z X X X X X Y Y Y Y Y Levels: X Y Z as.integer(groups) [1] 3 3 3 3 3 1 1 1 1 1 2 2 2 2 2 c(1,2,3)[groups] [1] 3 3 3 3 3 1 1 1 1 1 2 2 2 2 2 On 4/14/06, Sasha Pustota [EMAIL PROTECTED] wrote: Sasha

Re: [R] Questions on formula in princomp

2006-04-14 Thread Sasha Pustota
jim holtman [EMAIL PROTECTED] wrote: does this explain it? groups - factor(c(rep(Z,5),rep(X,5),rep(Y,5))) groups [1] Z Z Z Z Z X X X X X Y Y Y Y Y Levels: X Y Z as.integer(groups) [1] 3 3 3 3 3 1 1 1 1 1 2 2 2 2 2 c(1,2,3)[groups] [1] 3 3 3 3 3 1 1 1 1 1 2 2 2 2 2 I did

[R] Questions on formula in princomp

2006-04-13 Thread Sasha Pustota
I hope this time I'm using the iris dataset correctly: ir - rbind(iris3[,,1], iris3[,,2], iris3[,,3]) lir - data.frame(log(ir)) names(lir) - c(a,b,c,d) I'm trying to understand the meaning of expressions like ~ a+b+c+d, used with princomp, e.g. princomp(~ a+b+c+d, data=lir, cor=T) By

Re: [R] Questions on formula in princomp

2006-04-13 Thread Gabor Grothendieck
On 4/13/06, Sasha Pustota [EMAIL PROTECTED] wrote: I hope this time I'm using the iris dataset correctly: ir - rbind(iris3[,,1], iris3[,,2], iris3[,,3]) lir - data.frame(log(ir)) names(lir) - c(a,b,c,d) I'm trying to understand the meaning of expressions like ~ a+b+c+d, used with princomp,

[R] Questions for manipulating datasets in R e.g. sorting and matching

2006-02-23 Thread Stefanie von Felten, IPWIfU
Hello everyone, I want to sort a dataset in R, using multiple columns as sorting criteria. I know I can sort a dataset Data with 14 columns using one column (the fifth), by typing: DataSort-Data[order(Data[,5]),1:14] But how can the dataset be sorted by column 5, then by 6, then by 8?

Re: [R] Questions for manipulating datasets in R e.g. sorting andmatching

2006-02-23 Thread Dimitris Rizopoulos
Sent: Thursday, February 23, 2006 10:06 AM Subject: [R] Questions for manipulating datasets in R e.g. sorting andmatching Hello everyone, I want to sort a dataset in R, using multiple columns as sorting criteria. I know I can sort a dataset Data with 14 columns using one column (the fifth

Re: [R] Questions for manipulating datasets in R e.g. sorting and matching

2006-02-23 Thread Christian Montel
hi steffi, try DataSort-Data[order(Data[,5],Data[,6],Data[,8]),1:14] and for further details ?order. For matching try ?merge. Best Regards, Christian Stefanie von Felten, IPWIfU schrieb: Hello everyone, I want to sort a dataset in R, using multiple columns as sorting criteria. I know I

[R] questions about coxph.detail

2006-01-20 Thread singyee ling
Dear R- users, I obtained a coxph object using the coxph function and use the coxph.detail function to understand what coxph function actually does. what follow are the R output fit-coxph(Surv(B3TODEATH,STATUS)~GROUP+AGE+SEX+SEX:AGE) detail- coxph.detail(fit) -detail $time .(rows of

Re: [R] Questions about cbind

2006-01-04 Thread Sean Davis
On 1/4/06 12:28 AM, Vincent Deng [EMAIL PROTECTED] wrote: Dear R-helpers I have a stupid question about cbind function. Suppose I have a dataframe like this Frame: A 10 C 20 B 40 and a numeric matrix like this Matrix: A 1 B 2 C 3 cbind(Frame[,2],Matrix[,1]) simply binds

[R] Questions about cbind

2006-01-03 Thread Vincent Deng
Dear R-helpers I have a stupid question about cbind function. Suppose I have a dataframe like this Frame: A 10 C 20 B 40 and a numeric matrix like this Matrix: A 1 B 2 C 3 cbind(Frame[,2],Matrix[,1]) simply binds these two columns without checking the order, I mean, the result will be A 10 1 B

Re: [R] Questions about cbind

2006-01-03 Thread Marc Schwartz
On Wed, 2006-01-04 at 13:28 +0800, Vincent Deng wrote: Dear R-helpers I have a stupid question about cbind function. Suppose I have a dataframe like this Frame: A 10 C 20 B 40 and a numeric matrix like this Matrix: A 1 B 2 C 3 cbind(Frame[,2],Matrix[,1]) simply binds these two

Re: [R] R questions

2005-11-17 Thread Christoph Buser
Hi There is a very good introduction script to R on http://www.r-project.org/ under manuals, including an index of nice functions. For example you will find the basic plots, how to sort vectors and so on. Furthermore have a look at ?RSiteSearch It is very useful to search in R archives for

Re: [R] R questions

2005-11-17 Thread Uwe Ligges
Yuying Shi wrote: Dear Sir/Madam, I am a beginner in R. Here is my questions. 1. Can you give me one test for randomness (a name and descriptive paragraph is sufficient). 2. I have learned a uniform random number generator [e.g. not the algorithms: i)Wichmann-Hill, ii)

[R] R questions

2005-11-16 Thread Yuying Shi
Dear Sir/Madam, I am a beginner in R. Here is my questions. 1. Can you give me one test for randomness (a name and descriptive paragraph is sufficient). 2. I have learned a uniform random number generator [e.g. not the algorithms: i)Wichmann-Hill, ii) Marsaglia-Multicarry, iii) Super-Duper

[R] Questions about readBin function (Was: dec2bin?)

2005-10-12 Thread Tuszynski, Jaroslaw W.
Hi, The latest version of R had some changes to functions readbin() and writeBin() [which] now support raw vectors as well as filenames and connections.. As a result I am working on retiring raw2bin and bin2raw functions from caTools package which do exactly the same. Thanks to Prof. Ripley for

Re: [R] Questions about readBin function (Was: dec2bin?)

2005-10-12 Thread Roger D. Peng
I think you can use 'seek()' here, but it may not be completely reliable on all platforms. -roger Tuszynski, Jaroslaw W. wrote: Hi, The latest version of R had some changes to functions readbin() and writeBin() [which] now support raw vectors as well as filenames and connections.. As a

[R] questions about R

2005-10-01 Thread James Anderson
Hi, I am new to R. I have one question about outputing files in a loop; Suppose I have the following loop: for (i in 1:10) { temp = 100*2 matrix; } I want to output the value of temp into 10 files with each file containing the number of looping index (i.e, file1.csv, file2.csv, ...) without

Re: [R] questions about R

2005-10-01 Thread Marc Schwartz
On Sat, 2005-10-01 at 08:59 -0700, James Anderson wrote: Hi, I am new to R. I have one question about outputing files in a loop; Suppose I have the following loop: for (i in 1:10) { temp = 100*2 matrix; } I want to output the value of temp into 10 files with each file containing

Re: [R] questions about boxplots

2005-09-27 Thread Peter Wolf
concerning question 1: -- labeling of outliers -- you can get the outliers by boxplot(...)$out try: set.seed(17) x-rexp(99) names(x)-paste(x,1:99) out-boxplot(x)$out text(rep(1.1,length(out)), out, names(out)) Peter Wolf Stephen D. Weigand wrote: Dear Yulei, On Sep 26, 2005, at 6:56 PM,

[R] questions about boxplots

2005-09-26 Thread Yulei He
Hi, there. I have two questions about using R to create boxplots. 1. The function boxplot() plots the outliers. How can I label the exact values arount these outlier points? Does R have an option allow me to do that? 2. How can I put two boxplots in one x-y axis? Thanks. Yulei

Re: [R] questions about boxplots

2005-09-26 Thread Stephen D. Weigand
Dear Yulei, On Sep 26, 2005, at 6:56 PM, Yulei He wrote: Hi, there. I have two questions about using R to create boxplots. 1. The function boxplot() plots the outliers. How can I label the exact values arount these outlier points? Does R have an option allow me to do that? You can use

[R] Questions about R

2005-09-22 Thread 郑淇
Sep, 22nd,2005 Dear Authors, Thanks for reading this email. I'm a graduate student from China (PRC) and learning the R at present. Now I have some questions to ask you as I have met some strange problems during installing and

Re: [R] Questions about R

2005-09-22 Thread Roger Bivand
Thank you for your detailed description. Please look at what: capabilities() jpeg pngtcltk X11 http/ftp sockets libxml fifo TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE cledit IEEE754iconv TRUE TRUE TRUE says on your

  1   2   >