[R] Extract variance from dist(cluster.data)

2009-12-17 Thread Philip Silva
Hi! I am currently clustering data that is read out of a csv file. The code is: file - read.table(/tmp/cluster_input.tmp) cluster.data - as.matrix(file[,2:39040]) cluster.dist - dist(cluster.data) cluster.hclust - hclust(cluster.dist) cluster.hcut - cutree(cluster.hclust,10) # 10 == number of

Re: [R] Error for making packages under windows XP-Error in library.dynam(lib, package, package.lib)

2009-12-17 Thread Duncan Murdoch
rusers.sh wrote: Hi, I have installed the necessary tools for making a R package under windows and am sure these tool have been correctly configured. I am very new to try writing a package, so the error may be very obvious for you. Forgive me if it is too easy. My package name is *stam*, and

Re: [R] CORRECTION - Generation of Random numbers in a loop

2009-12-17 Thread Gray Calhoun
Hi Maithili, This is probably easiest if you think in terms of functions. Just apply 'runif' along the right vectors ## gives you one data frame with the min and max limits - read.table(textConnection(name min max A111.05 1.30 A121.30 1.60 A131.60 1.99), header = TRUE) d -

Re: [R] What is the fastest way to see what are in an RData file?

2009-12-17 Thread Gustaf Rydevik
On Wed, Dec 16, 2009 at 10:13 PM, Peng Yu pengyu...@gmail.com wrote: Currently, I load the RData file then ls() and str(). But loading the file takes too long if the file is big. Most of the time, I only interested what the variables are in the the file and the attributes of the variables

[R] issue with using rm: cannot generate on-the-fly list

2009-12-17 Thread Cormac Long
Hello, I have the following problem when trying to use rm: In a top level script file I have a loop iterating over some index. The loop is not contained within a function, so the scope of variables declared in the loop is global. Within this loop I generate several variables which should be

[R] Fishers exact test at 2.2e-16

2009-12-17 Thread Søren Faurby
In an effort to select the most appropriate number of clusters in a mixture analysis I am comparing the expected and actual membership of individuals in various clusters using the Fisher?s exact test. I aim for the model with the lowest possible p-value, but I frequently get p-values below

Re: [R] Fishers exact test at 2.2e-16

2009-12-17 Thread Ben Bolker
Søren Faurby soren.faurby at biology.au.dk writes: In an effort to select the most appropriate number of clusters in a mixture analysis I am comparing the expected and actual membership of individuals in various clusters using the Fisher?s exact test. I aim for the model with the lowest

Re: [R] issue with using rm: cannot generate on-the-fly list

2009-12-17 Thread Romain Francois
The list argument of rm is supposed to be a character vector, as indicated in ?rm. not a list. You can do something like this: rm( list = Filter( exists, c(rv1,rv2, rv3, rv4) ) ) or, considering rm only warns when you attempt to remove objects, you could: suppressWarnings( rm( list =

Re: [R] issue with using rm: cannot generate on-the-fly list

2009-12-17 Thread Duncan Murdoch
On 17/12/2009 5:33 AM, Cormac Long wrote: Hello, I have the following problem when trying to use rm: In a top level script file I have a loop iterating over some index. The loop is not contained within a function, so the scope of variables declared in the loop is global. Within this loop I

Re: [R] Fishers exact test at 2.2e-16

2009-12-17 Thread Robin Hankin
The aylmer package has some functionality in this regard which you may find useful. In particular, you can use good() to get a feel for the number of tableaux that are consistent with the specified marginal totals: good(dat2) [1] 42285210 good(dat3) [1] 2.756286e+12 HTH rksh Søren

[R] Problem with spliting a dataframe values

2009-12-17 Thread venkata kirankumar
Hi all, Hi this is kiran I am facing a problem to split a dataframe that is.. i have a string like:a,b,c|1,2,3|4,5,6|7,8,8 first I have to split with respect to | I did it with command unlist(strsplit(a,b,c|1,2,3|4,5,6|7,8,8, \\,)) after getting that set i made it as a dataframe and

Re: [R] Fishers exact test at 2.2e-16

2009-12-17 Thread Peter Dalgaard
Søren Faurby wrote: In an effort to select the most appropriate number of clusters in a mixture analysis I am comparing the expected and actual membership of individuals in various clusters using the Fisher?s exact test. I aim for the model with the lowest possible p-value, but I frequently

Re: [R] Fishers exact test at 2.2e-16

2009-12-17 Thread Christian Hennig
I know that you didn't ask for this but to me this seems to be a very dodgy method to select a best number of clusters with no proper basis at all. All of these tests are data dependent, so the p-values cannot be interpreted in the usual way. It is actually not clear how they can be

[R] nonlinear (especially logistic) regression accounting for spatially correlated errors

2009-12-17 Thread Seth J Myers
Hello, Sorry to be a bit longwinded, but I've struggled quite a bit with the following over the last few days. I've read all entries related to spatial autocorrelation in R help and haven't found what I'm after. If it's okay, I'm going to first describe my general understanding of the

[R] Exchange NAs for mean

2009-12-17 Thread Joel Fürstenberg-Hägg
Hi all, I'm have a matrix (X) with observations as rows and parameters as columns. I'm trying to exchange all missing values in a column by the column mean using the code below, but so far, nothing happens with the NAs... Can anyone see where the problem is? N-nrow(X) # Calculate

Re: [R] Exchange NAs for mean

2009-12-17 Thread Barry Rowlingson
2009/12/17 Joel Fürstenberg-Hägg joel_furstenberg_h...@hotmail.com: Hi all, I'm have a matrix (X) with observations as rows and parameters as columns. I'm trying to exchange all missing values in a column by the column mean using the code below, but so far, nothing happens with the

Re: [R] Exchange NAs for mean

2009-12-17 Thread Chuck Cleland
On 12/17/2009 9:31 AM, Joel Fürstenberg-Hägg wrote: Hi all, I'm have a matrix (X) with observations as rows and parameters as columns. I'm trying to exchange all missing values in a column by the column mean using the code below, but so far, nothing happens with the NAs... Can anyone

Re: [R] Exchange NAs for mean

2009-12-17 Thread Paul Hiemstra
Barry Rowlingson wrote: 2009/12/17 Joel Fürstenberg-Hägg joel_furstenberg_h...@hotmail.com: Hi all, I'm have a matrix (X) with observations as rows and parameters as columns. I'm trying to exchange all missing values in a column by the column mean using the code below, but so far,

[R] unable to run JGR in windows 7

2009-12-17 Thread Krishna
Hi, I installed JGR as decribed on website along with all supporting packages. But when i start R-software JGR doesnt start. if i type library(JGR) in front r prompt, the following error is displayed. library(JGR) Loading required package: iplots Error in .jinit() : unable to find the basic

Re: [R] What is the fastest way to see what are in an RData file?

2009-12-17 Thread Peng Yu
On Thu, Dec 17, 2009 at 5:33 AM, Gustaf Rydevik gustaf.ryde...@gmail.com wrote: On Wed, Dec 16, 2009 at 10:13 PM, Peng Yu pengyu...@gmail.com wrote: Currently, I load the RData file then ls() and str(). But loading the file takes too long if the file is big. Most of the time, I only interested

Re: [R] Problem with spliting a dataframe values

2009-12-17 Thread David Winsemius
On Dec 17, 2009, at 8:11 AM, venkata kirankumar wrote: Hi all, Hi this is kiran I am facing a problem to split a dataframe that is.. i have a string like:a,b,c|1,2,3|4,5,6|7,8,8 first I have to split with respect to | I did it with command unlist(strsplit(a,b,c|1,2,3|4,5,6|7,8,8,

[R] cross-product

2009-12-17 Thread Chuck White
Hello -- I am trying to create a dataframe whose rows are the cross product of rows in two other dataframes. Here's an example: A = data.frame(F1=c('1','2','3','2')) B = data.frame(F2=c('4','5')) C = data.frame() for (x in unique(A[,'F1'])) { C = rbind(C, cbind(F1=x,B)) } How can I achieve

[R] SPLUS Seqtrial vs. R Packages for sequential clinical trials designs

2009-12-17 Thread Paul Miller
Hello Everyone,   I’m a SAS user who has recently become interested in sequential clinical trials designs. I’ve discovered that the SAS based approaches for these designs are either too costly or are “experimental.” So now I’m looking for alternative software. Two programs that

Re: [R] cross-product

2009-12-17 Thread Marc Schwartz
On Dec 17, 2009, at 9:47 AM, Chuck White wrote: Hello -- I am trying to create a dataframe whose rows are the cross product of rows in two other dataframes. Here's an example: A = data.frame(F1=c('1','2','3','2')) B = data.frame(F2=c('4','5')) C = data.frame() for (x in unique(A[,'F1'])) {

[R] StructTS standard errors

2009-12-17 Thread Giovanni Petris
Hello, Does anybody know if (and how) it is possible to obtain standard errors of estimated variances from StructTS? (R 2.10.0). Thank you in advance, Giovanni __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Error for making packages under windows XP-Error in library.dynam(lib, package, package.lib)

2009-12-17 Thread rusers.sh
Dear Duncan, I just followed an example to try making a package. The problem is really on the useDynLib. It works after i delete it. Thanks a lot. 2009/12/17 Duncan Murdoch murd...@stats.uwo.ca rusers.sh wrote: Hi, I have installed the necessary tools for making a R package under windows

[R] how to import data from excel to R

2009-12-17 Thread sta_2279
Hi, I am using R and I want to know how data can be transferred from Excel Spread sheet to R for analyzing. I have done like this mydata-read.table(C:\Documents and Settings\admin\Desktop\data.txt); but its not working how can i do it

Re: [R] SPLUS Seqtrial vs. R Packages for sequential clinical trials designs

2009-12-17 Thread David Freedman
You'll probably want to take a look at the CRAN Task View, http://cran.r-project.org/web/views/ClinicalTrials.html david freedman Paul Miller wrote: Hello Everyone,   I’m a SAS user who has recently become interested in sequential clinical trials designs. I’ve discovered that the

Re: [R] how to import data from excel to R

2009-12-17 Thread Richardson, Patrick
Well, first of all it doesn't look like you're trying to read an excel file as the file you are trying you specify is data.txt not data.xls. Try: library(gdata) ?read.xls HTH, Patrick -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On

Re: [R] how to import data from excel to R

2009-12-17 Thread Joshua Wiley
Hey, If you want to read it in as a text file, make sure to have Excel save it as a text file first. For instance, a tab delimited text file. Then you could read it in with mydata - read.table(myfile.txt, sep=\t) HTH, Josh On Thu, Dec 17, 2009 at 9:24 AM, sta_2...@spectrum.net.in wrote:

[R] R on amazon's EC2 cloud?

2009-12-17 Thread Blair Christian
Hi All, I was wondering if anybody had experience running R on amazon's ec2 cloud? More specifically, has anybody created an amazon machine image (AMI) for use with it? I was wondering if there was a quantian type image available as an amazon machine image, maybe running debian or ubuntu? It

Re: [R] how to import data from excel to R

2009-12-17 Thread milton ruser
Hi Sarath, try C:\\Documents and Settings\\admin\\Desktop\\data.txt or C:/Documents and Settings/admin/Desktop/data.txt or yet setwd(your path) mydata-read.table(data.txt) cheers miltinho On Thu, Dec 17, 2009 at 12:24 PM, sta_2...@spectrum.net.in wrote: Hi, I am using R and I want to

Re: [R] R on amazon's EC2 cloud?

2009-12-17 Thread Roy Mendelssohn
Go to: http://biocep-distrib.r-forge.r-project.org/ Choose documentation, scroll own you will see a section called: Biocep-R on Amazon's Cloud -roy M. On Dec 17, 2009, at 9:55 AM, Blair Christian wrote: Hi All, I was wondering if anybody had experience running R on amazon's ec2 cloud?

Re: [R] R on amazon's EC2 cloud?

2009-12-17 Thread Dirk Eddelbuettel
On 17 December 2009 at 12:55, Blair Christian wrote: | Hi All, | | I was wondering if anybody had experience running R on amazon's ec2 | cloud? More specifically, has anybody created an amazon machine | image (AMI) for use with it? I was wondering if there was a quantian | type image available

Re: [R] how to import data from excel to R

2009-12-17 Thread David Winsemius
On Dec 17, 2009, at 11:24 AM, sta_2...@spectrum.net.in wrote: Hi, I am using R and I want to know how data can be transferred from Excel Spread sheet to R for analyzing. I have done like this mydata-read.table(C:\Documents and Settings\admin\Desktop \data.txt); but its not working

Re: [R] SPLUS Seqtrial vs. R Packages for sequential clinical trials designs

2009-12-17 Thread Marc Schwartz
On Dec 17, 2009, at 9:58 AM, Paul Miller wrote: Hello Everyone, I’m a SAS user who has recently become interested in sequential clinical trials designs. I’ve discovered that the SAS based approaches for these designs are either too costly or are “experimental.” So now I’m looking for

Re: [R] user-written splits in rpart

2009-12-17 Thread Verspagen B (ALGEC)
--- begin original message --- I am trying to write my own split function for rpart. The aim is to do, instead of anova, a linear regression to determine the split (minimize some criterion like sum of rss left and right of the split). The regression (lm) should simply use the dependent and

Re: [R] how to import data from excel to R

2009-12-17 Thread Gabor Grothendieck
Check out these notes: http://wiki.r-project.org/rwiki/doku.php?id=tips:data-io:ms_windows and note that within quotes you must double each backslash so one writes c:\\mydirectory\\abc.xls for example. On Thu, Dec 17, 2009 at 12:24 PM, sta_2...@spectrum.net.in wrote: Hi,   I am using R and I

Re: [R] Remove duplicates from a data frame but with some special requirements

2009-12-17 Thread gcam
Thanks Gray, This helps, I'd completely forgotten about the subset command. However, it doesn't quite get me where I need. Perhaps an example will help. I will simplify my dataframe to the three important variables: ESR_ref ESR_ref_editLoaded 1.1 1.1 Y 1.1.1

[R] forecasting

2009-12-17 Thread DispersionMap
I have some data that i ran a regression on and got the usual r output, with the a intercept and b coefficient for my independent variable. i want to forecast the number of future events using these parameters. What function / packages in R would you recommend to be used in good effect for

Re: [R] forecasting

2009-12-17 Thread Stephan Kolassa
?predict HTH Stephan DispersionMap schrieb: I have some data that i ran a regression on and got the usual r output, with the a intercept and b coefficient for my independent variable. i want to forecast the number of future events using these parameters. What function / packages in R would

Re: [R] how to import data from excel to R

2009-12-17 Thread Charlie Sharpsteen
On Thu, Dec 17, 2009 at 9:24 AM, sta_2...@spectrum.net.in wrote: Hi,   I am using R and I want to know how data can be transferred from Excel Spread sheet to R for analyzing. I have done like this mydata-read.table(C:\Documents and Settings\admin\Desktop\data.txt); but its not working how

[R] Sweave Makefile issue

2009-12-17 Thread Luc Villandré
Dear R-specialists, I am trying to create a Makefile that will first convert all my .Rnw files into .tex files and then, that will run the LaTeX compiler to produce a pdf document. This issue has been discussed before. Hence, I've basically adapted a Makefile I found at

[R] Problem reading binaries created with fortran

2009-12-17 Thread kapo coulibaly
Is it possible to read fortran binaries with R? I tried unsucessfully and my understanding is that fortran write binaries with leading and trailing bytes. I get numbers but not the right ones. Thanks ps: the binary I'm interested in reading is a MODFLOW output with a mix of character, double and

Re: [R] Problem reading binaries created with fortran

2009-12-17 Thread Duncan Murdoch
On 17/12/2009 3:48 PM, kapo coulibaly wrote: Is it possible to read fortran binaries with R? I tried unsucessfully and my understanding is that fortran write binaries with leading and trailing bytes. I get numbers but not the right ones. Thanks ps: the binary I'm interested in reading is a

Re: [R] Problem reading binaries created with fortran

2009-12-17 Thread Duncan Murdoch
On 17/12/2009 3:48 PM, kapo coulibaly wrote: Is it possible to read fortran binaries with R? I tried unsucessfully and my understanding is that fortran write binaries with leading and trailing bytes. I get numbers but not the right ones. Thanks ps: the binary I'm interested in reading is a

[R] ROracle on Windows Vista?

2009-12-17 Thread cstrato
Dear All, Does anybody know whether the package ROracle_0.5-9 does compile and run on Windows Vista? (Since I do not have Oracle I am not able to test this myself.) I have tried to contact the maintainer of ROracle but it seems that the email address is no longer valid. Best regards

Re: [R] how to import data from excel to R

2009-12-17 Thread Steve Taylor
Or copy a rectangle of data in Excel, then grab it from the clipboard in R as follows: my.data - read.table(clipboard,head=TRUE,sep='\t') cheers, Steve [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Sweave Makefile issue

2009-12-17 Thread Gray Calhoun
Hi Luc, I haven't been actively participating in this list for that long, so I may be wrong here... but I suspect that debugging makefiles is a bit off topic. Two quick points that might help: You probably want to use R CMD texi2dvi on your tex files instead of pdflatex; and you'll probably

[R] (no subject)

2009-12-17 Thread Jadoon, Ayesha
Hi I am really struggling jsut putting the labels on the leaves of my dendrogram. I have a dendrogram that i create using the hclust/as.dendrogram commands. I then plot it...but i want to feed a file/list that contains all the labels of the leaves of a dendrogram and others that way if R

Re: [R] Problem reading binaries created with fortran (More infos)

2009-12-17 Thread kapo coulibaly
The structure of the file is clear (see below) the first line is made of integers and doubles with the fifth being a text string followed by arrays of double precision number.: int1 int2 double1 double2 text int3 int4 int5 (array of double) here is an example of file: 1 1 1.0 1.0 HEAD 160 224 3

Re: [R] Problem reading binaries created with fortran

2009-12-17 Thread kapo coulibaly
Duncan, I couldn't find clear details about the way fortran writes the binaries. I was hoping someone here has done it before. But the hexView package seems like a great idea i'll give it a shot. Thanks a bunch On Thu, Dec 17, 2009 at 4:02 PM, Duncan Murdoch murd...@stats.uwo.cawrote: On

[R] Do a log rank test of two group in a fit more with more than 2 groups

2009-12-17 Thread Anh Tran
Hi all, I'm trying to find a way to get a log-rank and Wilcoxon p-value of two single groups in a survfit() of coxph model (2 strata covariates). Is there a quick way to this information? survdiff() does not work with coxph model. -- Regards, Anh Tran [[alternative HTML version

Re: [R] Sweave Makefile issue

2009-12-17 Thread Duncan Murdoch
On 17/12/2009 3:19 PM, Luc Villandré wrote: Dear R-specialists, I am trying to create a Makefile that will first convert all my .Rnw files into .tex files and then, that will run the LaTeX compiler to produce a pdf document. This issue has been discussed before. Hence, I've basically adapted

Re: [R] Problem reading binaries created with fortran (More infos)

2009-12-17 Thread Duncan Murdoch
On 17/12/2009 4:30 PM, kapo coulibaly wrote: The structure of the file is clear (see below) the first line is made of integers and doubles with the fifth being a text string followed by arrays of double precision number.: int1 int2 double1 double2 text int3 int4 int5 (array of double) here is

[R] poly() with unnormalized values

2009-12-17 Thread Michael Friendly
How can I get the result of, e.g., poly(1:3. degree=2) to give me the unnormalized integer coefficients usually used to explain orthogonal polynomial contrasts, e.g, -1 1 0 -2 1 1 As I understand things, the columns of x^{1:degree} are first centered and then are normalized by

Re: [R] Problem with spliting a dataframe values

2009-12-17 Thread jim holtman
Does this do what you want. x - a,b,c|1,2,3|4,5,6|7,8,8 x.1 - strsplit(x, [|]) x.1 [[1]] [1] a,b,c 1,2,3 4,5,6 7,8,8 x.2 - lapply(x.1, strsplit, ',') x.2 [[1]] [[1]][[1]] [1] a b c [[1]][[2]] [1] 1 2 3 [[1]][[3]] [1] 4 5 6 [[1]][[4]] [1] 7 8 8 do.call(rbind, x.2[[1]]) [,1] [,2] [,3]

[R] to remove an error with log(zero)

2009-12-17 Thread Moohwan Kim
Dear R family I have an arbitrary column vector. 1 2 4 0 7 5 0 0 0 9 11 12 When I attempt to take natural logarithm of the series, as you guess there is an error message. To overcome this problem, my idea is to replace a zero or zeros in a row with appropriate numbers. In order to implement it, I

Re: [R] to remove an error with log(zero)

2009-12-17 Thread jim holtman
Does this do what you want: x [1] 1 2 4 0 7 5 0 0 0 9 11 12 # create a matrix with the first column being a sequence number x.mat - cbind(seq(length(x)), x) # remove zeros in second column x.mat - x.mat[x.mat[,2] != 0,] x.mat x [1,] 1 1 [2,] 2 2 [3,] 3 4 [4,] 5 7

Re: [R] Remove duplicates from a data frame but with some special requirements

2009-12-17 Thread Gray Calhoun
The easiest thing might be to just sort on the Loaded column: start of example d - read.table(textConnection(ESR_ref ESR_ref_editLoaded 1.1 1.1 Y 1.1.11.1 NC 1.1.21.1 Y 2.1 2.1 N 2.1.1

[R] ggplot2 / lattice

2009-12-17 Thread Gary Miller
Hi R Users, Is there a equivalent function for the following R code in Lattice package. I want to plot a grouped box plots (grouped by two factors). g - rep.int(c(A, B, C, D), 125) t - rnorm(5000) a - sample(t, 500, replace=TRUE) b - sample(t, 500, replace=TRUE) dta - data.frame(val =

Re: [R] ggplot2 / lattice

2009-12-17 Thread Gabor Grothendieck
Try this: bwplot(val ~ g | G2, dta) On Thu, Dec 17, 2009 at 9:34 PM, Gary Miller mail2garymil...@gmail.com wrote: Hi R Users, Is there a equivalent function for the following R code in Lattice package. I want to plot a grouped box plots (grouped by two factors). g - rep.int(c(A, B, C, D),

Re: [R] ggplot2 / lattice

2009-12-17 Thread Gary Miller
@ Gabor: Thanks, it worked. @ All: Which options I should explore to change the appearance of boxes. Like, 1. Color change. 2. Fill-in boxes with colors. 3. Change dot to line (used to represent median) 4. No gaps between boxplots in each category. # R Code: g - rep.int(c(A, B, C, D), 125) t -

Re: [R] ggplot2 / lattice

2009-12-17 Thread Felix Andrews
Look at ?panel.bwplot specifically 'fill', 'pch', and 'box.width'. 2009/12/18 Gary Miller mail2garymil...@gmail.com: @ Gabor: Thanks, it worked. @ All: Which options I should explore to change the appearance of boxes. Like, 1. Color change. 2. Fill-in boxes with colors. 3. Change dot to

[R] Getting Rd pages right for redefined S3 generic

2009-12-17 Thread S Ellison
I'm writing a package, and would appreciate advice on controlling the help documentation cross-references for a redefined generic. I wanted to define a cbind equivalent for an object that mostly behaves like a data frame. base::cbind dispatches to a data frame method if _any_ parameter is a data

Re: [R] poly() with unnormalized values

2009-12-17 Thread Gray Calhoun
Hi Michael, If I remember right, this question has been asked several times on this mailing list in the past. The reference listed in the help page for poly explain how to get the un-orthogonalized coefficients, but those coefficients aren't needed for prediction. For more details, though,

[R] Covariate adjusted survival curves

2009-12-17 Thread Lakshmi Venkitachalam
Hello, We are using frailty models to estimate risk of one year death. Is there a way to generate survival curves adjusted for covariates and also include frailty term? Any help will be much appreciated! Thanks! LV [[alternative HTML version deleted]]

[R] data download from metastock into r-software

2009-12-17 Thread SNV Krishna
Hi All, is there a way to download data from metastock to R-software. most of my data is in date,OHLC format downloaded from reuters to metastock software in my local pc. many thanks for the help., krishna [[alternative HTML version deleted]]

Re: [R] Covariate adjusted survival curves

2009-12-17 Thread David Winsemius
On Dec 17, 2009, at 11:47 PM, Lakshmi Venkitachalam wrote: Hello, We are using frailty models to estimate risk of one year death. Is there a way to generate survival curves adjusted for covariates and also include frailty term? Is there really only _one_ way to generate such estimates?

[R] Plot with a factor variable which has large values

2009-12-17 Thread changzhu
I wanted to do a simple plot: Death Rate vs Clinical Site, and then draw a confidence interval of Death Rate at each clinical site, which is a factor variable with 100 levels. I used the following code: plot(Site, Rate, col=red, type=o) However, the graph was a short line at each site instead

[R] Testing equality of regression model on multiple groups

2009-12-17 Thread Clara Yuan
Hello, I'm trying to test for the joint equality of coefficients of the same model across different subsets of the data (ie, is it necessary to estimate the same model on these different populations, or can I just estimate the model once on the whole dataset?). My plan is to use the F-test on

[R] Ryacas: problem with Sym

2009-12-17 Thread Gavin Steininger
I have been trying to get the Ryacas package to work without any success. I do not seem to be able to the Sym function work, for example: library(XML) library(Ryacas) a=Sym(a) a Error in summary.connection(x) : invalid connection I am windows XP with R 2.10 Thanks for you help gavin

[R] Compare two repeated measures mixed models

2009-12-17 Thread Chunhao
Hi R users, I have a statistical question. If I have two repeated measures models such as, m1, y=u+a+time+a:time+e m2, y=u+b+time+b:time+e How can I compare these two models (such as which one is the better predictor, a or b)? Many Thanks In Advance. Chunhao -- View this message in context:

[R] some help regarding combining columns from different files

2009-12-17 Thread Harikrishnadhar
Dear all, Here is my code which am using to combine 5th column from different data sets. Here is the function to do my job genesymbol.append.file -NULL gene.column - NULL readGeneSymbol - function(files,genesymbol.column=5){ for(i in fnames){ temp -

[R] Error using step.gam from the gam library

2009-12-17 Thread McEachron, Luke
I am running multiple GAMs using the step.gam function and am receiving an error. I have copied my code and bolded the error at the bottom. Any help is greatly appreciated.

[R] How to run several scripts?

2009-12-17 Thread kayj
Hi All, I am a windows user and I would like to run several R scripts one after the other, I was wondering if that is possible to do on windows instead of clicking on each script to run it. Thanks -- View this message in context:

[R] mantel test and NAs

2009-12-17 Thread marciarocha
Dear R users, I am having a problem performing the mantel test (both with functions mantel {vegan} and mantel.test {ape}) due to I believe the presence of NAs on my distance matrices, which look like e.g.: NA 12 12 3 NA 4 5 6 and 1 1 2 2 3 4 5 6 7 8 Would any of you

[R] Which hist cell each value falls in?

2009-12-17 Thread Doug Hill
Hi, all. I'm using hist() to obtain a vector of break values in an interval. I then want to be able to identify which cell any value from another vector falls in. E.g. applying breaks [1] -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 to x [1] -3.74519666 -0.38183630

[R] write.csv and col.names=F

2009-12-17 Thread kayj
Hi All, I always have a problem with write.csv when I want the column names to be ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc. for example I tried write.csv(mydata, file=data.csv, quote=FALSE, row.names=F, col.names=F) Warning message: In write.csv(mydata, file =

Re: [R] How to run several scripts?

2009-12-17 Thread guohao.huang
Write a new script as the following source(path/1.R) source(path/2.R) R will execute these scripts in sequence. Guo-Hao Huang -- From: kayj kjaj...@yahoo.com Sent: Friday, December 18, 2009 3:01

Re: [R] write.csv and col.names=F

2009-12-17 Thread milton ruser
?write.table On Thu, Dec 17, 2009 at 6:52 PM, kayj kjaj...@yahoo.com wrote: Hi All, I always have a problem with write.csv when I want the column names to be ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc. for example I tried write.csv(mydata, file=data.csv,

Re: [R] Which hist cell each value falls in?

2009-12-17 Thread Jim Lemon
On 12/18/2009 06:35 AM, Doug Hill wrote: Hi, all. I'm using hist() to obtain a vector of break values in an interval. I then want to be able to identify which cell any value from another vector falls in. E.g. applying breaks [1] -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 0.5 1.0