[R] handling categorical features;

2009-08-16 Thread rami jiossy
Hi; datamining question: -- my input data table is of size 1000-rows, 2000-columns. each column represents one features. one of the columns represent a categorical features with 900 levels. i would like to apply KNN / distance matrix on the table rows, while preserving

[R] Hi, a problem in using SNR

2009-08-16 Thread Gina Liao
Hello All, I'm going to select the differentially genes from my array by using SNR. There are two conditions:condition1:mean(group1)mean(group2)condition2:mean(group1)mean(group2) But I had a problem that how to write the code in R.I've searched in Internet, but I couldn't find anything.Hope

[R] bootstrapped correlation confint lower than -1 ?

2009-08-16 Thread Liviu Andronic
Dear R users, Does the results below make any sense? Can the the interval of the correlation coefficient be between *-1.0185* and -0.8265 at 95% confidence level? Liviu library(boot) data(mtcars) with(mtcars, cor.test(mpg, wt, met=spearman)) Spearman's rank correlation rho data:

Re: [R] bootstrapped correlation confint lower than -1 ?

2009-08-16 Thread Duncan Murdoch
Liviu Andronic wrote: Dear R users, Does the results below make any sense? Can the the interval of the correlation coefficient be between *-1.0185* and -0.8265 at 95% confidence level? Why not? You used an ordinary nonparametric bootstrap, so it doesn't know that the parameter is

Re: [R] Solutions of equation systems

2009-08-16 Thread Moreno Mancosu
Ravi Varadhan wrote: [cut] It seems to work! Thanks a lot Ravi and Berend. Moreno. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

[R] Can a variable name include '_' or '.' in portable R code

2009-08-16 Thread Peng Yu
Hi, It says in R-intro.pdf, For portable R code (including that to be used in R packages) only A–Za–z0–9 should be used. I'm an wondering why '_' and '.' can be used in portable R code. It very common that some variable name should be composed of two or more English words. Can somebody let me

[R] How to show line number when using Rscript?

2009-08-16 Thread Peng Yu
Hi, When I use Rscript to run an R script, I want Rscript show the line numbers along with the commands executed. I am wondering if there is a way to do so. Regards, Peng __ R-help@r-project.org mailing list

Re: [R] Can a variable name include '_' or '.' in portable R code

2009-08-16 Thread Ben Bolker
I think you're misinterpreting the context, although it is admittedly a confusing context. I think that what is meant by this that you should NOT use accented symbols (or other symbols such as ß), which could be considered alphanumeric. The rest of the sentence in which this note occurs

[R] How to deal with multicollinearity in mixed models (with lmer)?

2009-08-16 Thread willow1980
Dear R users, I have a problem with multicollinearity in mixed models and I am using lmer in package lme4. From previous mailing list, I learn of a reply http://www.mail-archive.com/r-h...@stat.math.ethz.ch/msg38537.html; which states that if not for interpretation but just for prediction,

[R] What is the returned type of strsplit?

2009-08-16 Thread Peng Yu
Hi, I run the following program. I thought that 'b' was a matrix. But it is actually not, right? Can somebody elaborate more on the type difference between 'b' and 'c' to help me understand it better? Why 'c' is what it is now? Why 'c' is not the transpose of what it is now? Regards, Peng $

Re: [R] bootstrapped correlation confint lower than -1 ?

2009-08-16 Thread Robert A LaBudde
The basic interval (which you are using by default) is just the usually normal distribution interval with the standard error estimated from the resampling distribution. It has all the benefits and problems of assuming a normal distribution. If you wish to maintain the domain limits on the

Re: [R] bootstrapped correlation confint lower than -1 ?

2009-08-16 Thread Liviu Andronic
Hello, On 8/16/09, Robert A LaBudde r...@lcfltd.com wrote: The basic interval (which you are using by default) is just the usually normal distribution interval with the standard error estimated from the resampling distribution. It has all the benefits and problems of assuming a normal

[R] challenge in using layout with r bind function

2009-08-16 Thread RAVI KAPOOR
Hi Can any one explain how i can divide the graphic window into two rows and two columns -- allocate figure 1 all of row 1 and allocate figure 2 the intersection of column 2 and row 2 Actually through above also want to understand the use of rbind() function that is used in call to layout()

Re: [R] challenge in using layout with r bind function

2009-08-16 Thread baptiste auguie
Hi, Try this, layout(matrix(c(1,1,2,3), ncol=2, byrow=T)) hist(1:10) plot.new()# empty space plot(1:10) HTH, baptiste 2009/8/16 RAVI KAPOOR ravk...@gmail.com: Hi Can any one explain how i can divide the graphic window  into two rows and two columns  -- allocate figure 1 all of row 1 and

Re: [R] why summary() does not work here???

2009-08-16 Thread Hongwei Dong
I'm quite sure the VGAM package has been installed because I used it to estimate the model before I use summary(). One reason I can guess is that the default method for summary() is S3, but here it is S4. But I'm not sure and don't know what to do with that. Here is an example you can reproduce:

Re: [R] How to deal with multicollinearity in mixed models (with lmer)?

2009-08-16 Thread Daniel Malter
Hi, more generally you might be overfitting your model by interacting all of the kidc polynomials with all of the year polynomials. Have a look at the following example: year=rep(1:4,each=25) year=year-mean(year) kids=c(sample(c(0:1),25,replace=T),sample(c(0:2),25,replace=T),sample(c(0:3)

[R] predict.kohonen som: what is the trainY parameter?

2009-08-16 Thread Francesco Stablum
Hello, I am quite new to R, and, after having used successfully the function som (package kohonen), I am trying to use the predict.kohonen function for pattern recognition under noise, but cannot find further documentation about the trainY parameter. The documentation of predict.kohonen says

[R] Installing quantreg package under Ubuntu

2009-08-16 Thread Frank E Harrell Jr
Does any have installation instructions for this? When I run install.packages('quantreg') I get: gcc -std=gnu99 -shared -o quantreg.so akj.o boot.o brute.o chlfct.o cholesky.o combos.o crq.o crqfnb.o dsel05.o etime.o extract.o idmin.o iswap.o kuantile.o mcmb.o penalty.o powell.o rls.o rq0.o

Re: [R] challenge in using layout with r bind function

2009-08-16 Thread John Kane
?layout first example seems to do this unless I misunderstand the placement of the second graph. layout(matrix(c(1,1,0,2), 2, 2, byrow = TRUE)) plot(1:10, col=blue) plot(1:5,col=red) ?rbind for information on it. rbind basically concatinates two rectangular data.sets such as matrices or

[R] : source R-script interactively outside R

2009-08-16 Thread Angel Spassov
DeaR list, let us assume we have stored a couple of functions in 'test.R'. Is it possible to run R CMD BATCH test.R or R --file=test.R interactively and if yes how? A better formulated question sounds like this: how can I source test.R interactively OUTSIDE R? Another clarification try: I

[R] How to use your own data in gstat and sp?

2009-08-16 Thread Paul Heinrich Dietrich
This seems pretty basic, but I can't get any data to work except for the documented examples. When the goal is to get to SpatialPixels, here is what I see... x - runif(10,1,10) y - runif(10,1,10) z - rnorm(10,0,1) MyData - as.data.frame(cbind(x,y,z)) library(gstat) coordinates(MyData) -

[R] Plot(x,y)

2009-08-16 Thread malcolm Crouch
Hi , I am using the plot function for some data , and the plot is coming back pure black , with scales on the side . Regards Malcolm [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Plot(x,y)

2009-08-16 Thread malcolm Crouch
My apologies for the poor quality of the last post. Query plot(V6,V5, col=red) or plot(V6,V5) the graph is attached. Data V5 V6 2063 0.009179148 -8117667.885 2064 0.03854349 -8117963.045 2065 -0.018345998 -8117980.935 2066 0.023662906 -8118013.245 2067

Re: [R] why summary() does not work here???

2009-08-16 Thread Gavin Simpson
On Sun, 2009-08-16 at 10:48 -0700, Hongwei Dong wrote: I'm quite sure the VGAM package has been installed because I used it to estimate the model before I use summary(). One reason I can guess is that the default method for summary() is S3, but here it is S4. But I'm not sure and don't know

[R] run R codes every startup.

2009-08-16 Thread milton ruser
Dear all, how can I setup R(gui) to run some commands evertime R startup? cheers milton [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] What is the returned type of strsplit?

2009-08-16 Thread Patrick Connolly
On Sun, 16-Aug-2009 at 10:40AM -0500, Peng Yu wrote: | Hi, | | I run the following program. I thought that 'b' was a matrix. But it | is actually not, right? Can somebody elaborate more on the type | difference between 'b' and 'c' to help me understand it better? | | Why 'c' is what it is now?

Re: [R] predict.kohonen som: what is the trainY parameter?

2009-08-16 Thread Gavin Simpson
On Sun, 2009-08-16 at 19:59 +0200, Francesco Stablum wrote: Hello, I am quite new to R, and, after having used successfully the function som (package kohonen), I am trying to use the predict.kohonen function for pattern recognition under noise, but cannot find further documentation about the

Re: [R] why summary() does not work here???

2009-08-16 Thread Hongwei Dong
it seems we are using the version of VGAM and R. packageDescription(VGAM)$Version [1] 0.7-9 sessionInfo() R version 2.9.1 (2009-06-26) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United

Re: [R] run R codes every startup.

2009-08-16 Thread Jason Morgan
On 2009.08.16 15:59:15, milton ruser wrote: Dear all, how can I setup R(gui) to run some commands evertime R startup? cheers milton You'll want to read: help(Startup) HTH, ~Jason -- Jason W. Morgan Graduate Student Department of Political Science *The Ohio State University* 154 North

[R] good and bad ways to import fixed column data (rpy)

2009-08-16 Thread Ross Boylan
Recorded here so others may avoid my mistakes. I have a bunch of files containing fixed width data. The R Data guide suggests that one pre-process them with a script if they are large. They were 50MG and up, and I needed to process another file that gave the layout of the lines anyway. I tried

[R] Mix font families in a single label?

2009-08-16 Thread Marc Chiarini (Tufts)
Dear R-help community: I have been searching for an elegant solution to the question posed in my subject. I would like to be able to use any of the R functions like text() or mtext() to display some text with mixed font families. For example, a label like huge-class background load, where the

Re: [R] good and bad ways to import fixed column data (rpy)

2009-08-16 Thread Gabor Grothendieck
Check out ?read.fwf On Sun, Aug 16, 2009 at 4:49 PM, Ross Boylanr...@biostat.ucsf.edu wrote: Recorded here so others may avoid my mistakes. I have a bunch of files containing fixed width data.  The R Data guide suggests that one pre-process them with a script if they are large. They were

Re: [R] Plot(x,y)

2009-08-16 Thread Remko Duursma
What is the problem exactly? Remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109

Re: [R] good and bad ways to import fixed column data (rpy)

2009-08-16 Thread Wensui Liu
Gabor made a good point. Here is an example I copied from my blog. ## # READ FIXED-WIDTH DATA FILE WITH read.fwf() # # -- # # EQUIVALENT SAS CODE: # # filename data 'E:\sas\fixed.txt';

[R] large list from mdb.get - change labled atomic to double

2009-08-16 Thread stephen sefick
I have a microsoft database that I have read in that is a list of dataframes processed by mdb.get. I am trying to read this into GRASS gis and need to change the labled atomic vectors to double precision- especially the coord.x coord.y. Now is there a way to check for classes and then change

Re: [R] Question regarding finding credible interval using r2winbugs

2009-08-16 Thread Ben Bolker
coda::HPDinterval(fit,prob=0.9) SATRAJIT ROYCHOUDHURY-2 wrote: Dear I am trying to find a 90% credible interval. I am using the following code. fit-bugs( model.file=BUGScode, data=data, inits = list(geninits1,geninits2), parameters.to.save=keepers,

Re: [R] good and bad ways to import fixed column data (rpy)

2009-08-16 Thread Ross Boylan
Just to quote explicitly the passage I mentioned in the R Data document: QUOTE Function `read.fwf' provides a simple way to read such files, specifying a vector of field widths. The function reads the file into memory as whole lines, splits the resulting character strings, writes out a

Re: [R] System is computationally singular and scale of covariates

2009-08-16 Thread Moshe Olshansky
Hi, What do you mean by outer product? If you have two vectors, say x and y, of lenght n and you define matrix A by A(i,j) = x(i)*y(j) then your matrix has rank one and it is VERY singular (in exact arithmetics). Is this is what you mean by outer product? --- On Sun, 16/8/09, Stephan Lindner