Re: [R] Principal coordinate analysis

2011-01-27 Thread Prof Brian Ripley
On Thu, 27 Jan 2011, Julie Smith wrote: Could someone please help me with instructions on running a principal coordinate analysis using R? ?cmdscale Julie Smith -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ U

[R] Boxplot

2011-01-27 Thread Ramya
Hi, I have 25 normal and 25 tumor samples and generated 50 boxplots one for each Is there a possibility to alternate the colors for the boxplots Green Red Green Red. Example: A B C D 10 23 23 34 20 24 24 30 20 2434 34 this would generate 4 boxplot one for each. I want the boxplot for

[R] read.table() versus scan()

2011-01-27 Thread H Roark
I need to import a large number of simple, space-delimited text files with a few columns of data each. The one quirk is that some rows are missing data and some contain junk text at the end of each line. A typical file might look like: a b c d 1 2 3 x 4 5 6 7 8 9 x 1 2 3 x c c 4 5 6 x 7 8 9 x

[R] Please help -- Converting a 2D matrix to 3 columns for graphical representation

2011-01-27 Thread kparamas
Hi, I am trying to convert a 2D correlation matrix to 3 columns for graphical representation: rdata = replicate(100, rnorm(15)) #construct a 2D matrix c1 = cor(rdata) #outputs a correlation matrix Now I want to convert the 2D c1 to (row#, col#, correlation) 1 1 cor1 1 2 cor2 1 3 cor3 ... 2 1

[R] Principal coordinate analysis

2011-01-27 Thread Julie Smith
Could someone please help me with instructions on running a principal coordinate analysis using R? Julie Smith Sent from my iPod __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://w

[R] Help with ape - read.GenBank()

2011-01-27 Thread James Meadow
Hi, I am trying to work with the ape package, and there is one thing I am struggling with. When calling the *read.GenBank()* function, I can get it to work with an object created like this: *>x <- c("AY395554","AY611035", ...)* *>read.GenBank(x)* However, I am trying to use the function to fetc

Re: [R] subloop - flexible coding - variable number of loops

2011-01-27 Thread David Winsemius
On Jan 27, 2011, at 6:29 PM, Peter Jaksons wrote: Hello, I want to create a flexible code for the following example: In stead of using a different code for each n (as in my example below), I want to write a general code for every n (n from 1 to 10). Have you done any thinking about the

Re: [R] Meaning of pterms in survreg object?

2011-01-27 Thread David Winsemius
On Jan 28, 2011, at 12:37 AM, Johannes Huesing wrote: David Winsemius [Thu, Jan 27, 2011 at 10:08:00PM CET]: You got a perfectly sensible reply from Thereau, the author of the package, a day after your posting and then failed to respond to his questions. I'm not sure what more you are expe

Re: [R] There must be a smarter way

2011-01-27 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of eric > Sent: Thursday, January 27, 2011 7:07 PM > To: r-help@r-project.org > Subject: [R] There must be a smarter way > > > Newbie and trying to learn the right way of doing thi

Re: [R] Meaning of pterms in survreg object?

2011-01-27 Thread Johannes Huesing
David Winsemius [Thu, Jan 27, 2011 at 10:08:00PM CET]: > You got a perfectly sensible reply from Thereau, the author of the > package, a day after your posting and then failed to respond to his > questions. I'm not sure what more you are expecting. > My apologies. Next time I'll be checking Gm

Re: [R] Problem converting zoo object (daily data) to a timeSeries object

2011-01-27 Thread Gabor Grothendieck
On Thu, Jan 27, 2011 at 11:56 AM, John E. Kaprich wrote: > When I try to convert the zoo object to a timeSeries object, which would > allow me to utilize Rmetrics packages, I get an error message. > > > >> Data<-read.zoo("c:\\DOWUBSPRICING.txt,na.strings="NA",sep="\t",header=T) >> is(Data) > "zoo"

[R] There must be a smarter way

2011-01-27 Thread eric
Newbie and trying to learn the right way of doing things in R. in this case, I just have that feeling that my convoluted line of code is way more complicated than it needs to be. Please help me in seeing the easier way. I want to do something pretty simple. I have a dataframe called x that is 694

Re: [R] sapply puzzlement

2011-01-27 Thread Dario Strbenac
R works by going down the columns. If you make the rows into columns, it then does what you want. You just have to make the columns back into rows to get the original shape of your matrix. So the code in one line is : t(t(z) - means) Original message >Date: Fri, 28 Jan 2011 01:16:45

Re: [R] Quantile regression (rq) and complex samples

2011-01-27 Thread Thomas Lumley
You could use the survey package to run the bootstrapping, if you mean the Rao & Wu bootstrap that samples n-1 of n PSUs in each replicate. Set up a survey design object with bootstrap replicate weights: use svrepdesign() if you already have replicate weights, use svydesign() and then as.svrepdesi

Re: [R] sapply puzzlement

2011-01-27 Thread Pete Brecknock
In addition to what has already been suggested you could use .. mapply(function(x,y) x-y, z,means) which returns V1 V2 [1,] 0.333 -2.7142857 [2,] NA 7.2857143 [3,] -0.667 -3.7142857 [4,] -6.667 NA [5,] NA -0.7142857 [6,] 1.333

Re: [R] Problem with factor analysis

2011-01-27 Thread Juliet Hannah
It looks like the text didn't show assigning the results of factanal to an object. Try: pgdata<-read.table("pgfull.txt",header=T) names(pgdata) pgd<-pgdata[,1:54] #missing line model <- factanal(pgd,8) par(mfrow=c(2,2)) plot(loadings(model)[,1],loadings(model)[,2],pch=16,xlab="Factor 1",ylab="Fac

Re: [R] sapply puzzlement

2011-01-27 Thread David Winsemius
On Jan 27, 2011, at 7:16 PM, Ernest Adrogué i Calveras wrote: Hi, I have this data.frame with two variables in it, z V1 V2 1 10 8 2 NA 18 3 9 7 4 3 NA 5 NA 10 6 11 12 7 13 9 8 12 11 and a vector of means, means <- apply(z, 2, function (col) mean(na.omit(col))) means V1

Re: [R] HLM Model

2011-01-27 Thread Jeremy Miles
The empirical statement on the proc mixed line gives you robust standard errors, I don't think you get them in R. In SAS you specify that the predictors are to be dummy coded using the class . Are they factors in R? I can't tell from the SAS output, because the formatting has been lost. However

Re: [R] sapply puzzlement

2011-01-27 Thread David A. Johnston
sapply(z, function(row) ...) does not actually grab a row at a time out of 'z'. It grabs a column (because 'z' is a data.frame) You may want: t(apply(z, 1, function(row) row - means)) or: t(t(z) - means) Hope that helps, -David Johnston -- View this message in context: http://r.789695.n4.n

Re: [R] HLM Model

2011-01-27 Thread Belle
Hi Harold: I know the outputs are different between SAS and R, but the results that I got have big difference. Here is part of the result based on the SAS code I provided earlier: Cov Parm SubjectEstimate Error Value Pr > Z

[R] sapply puzzlement

2011-01-27 Thread Ernest Adrogué i Calveras
Hi, I have this data.frame with two variables in it, > z V1 V2 1 10 8 2 NA 18 3 9 7 4 3 NA 5 NA 10 6 11 12 7 13 9 8 12 11 and a vector of means, > means <- apply(z, 2, function (col) mean(na.omit(col))) > means V1V2 9.67 10.714286 My intention was substracting mean

[R] subloop - flexible coding - variable number of loops

2011-01-27 Thread Peter Jaksons
Hello, I want to create a flexible code for the following example: In stead of using a different code for each n (as in my example below), I want to write a general code for every n (n from 1 to 10). I tried a lot of things, but I always got stuck with the number of subloops or witch closing t

Re: [R] possible bug in packageVersion()?

2011-01-27 Thread dicko ahmadou
May be this problem is OS specific (mac OS or windows...) i use ubuntu and have no problem with this function R> packageVersion("base") [1] ‘2.12.1’ R> packageVersion('lme4') [1] ‘0.999375.37’ R> sessionInfo() R version 2.12.1 (2010-12-16) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_C

[R] Adding image to plotting area

2011-01-27 Thread Dario Strbenac
Hello, I've drawn a black rectangle over the plotting area, and when I add an image() heatmap, it doesn't take up all the area, but is set inward from the black rectangle. Can anyone suggest how to make it stretch out to the entire area ? Minimal example : y <- matrix(runif(2000*20), nrow = 20

Re: [R] agnes clustering and NAs

2011-01-27 Thread Dario Strbenac
Hello, Yes, that's right, it is a values matrix. Not a dissimilarity matrix. i.e. > str(iMatrix) num [1:23371, 1:56] -0.407 0.198 NA -0.133 NA ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:56] "-8100" "-7900" "-7700" "-7500" ... For the snippet of checking for NAs, I get all

Re: [R] HLM Model

2011-01-27 Thread Doran, Harold
Belle: Before I provide any more help, you'll need to follow some posting guide rules and describe what you have done with some R code, describe what the problem is, and describe what you are hoping to accomplish. The fact that the results you get from R and SAS are different doesn't mean ther

Re: [R] HLM Model

2011-01-27 Thread Belle
Hi Harold: Yes, this was the R code that I tried, and got different result from SAS. Is that mean I cannot actually use R to run unstructured covariance matrix? How can I solve this problem if I need an unstructured covariance matrix method? Thanks for the help. -- View this message in contex

[R] Modeling Binary x Binary Interactions with mlogit (and interpretation)

2011-01-27 Thread Marcel Gerds
Dear R community, I am using the mlogit package to analyze discrete choice data. Apart from a main effects model, I want to estimate interactions between the attributes of the choice set (e.g. the existence of a certain attribute) and some subject-specific data (like gender or income). Studyin

Re: [R] Meaning of pterms in survreg object?

2011-01-27 Thread David Winsemius
You got a perfectly sensible reply from Thereau, the author of the package, a day after your posting and then failed to respond to his questions. I'm not sure what more you are expecting. -- David On Jan 27, 2011, at 3:43 PM, Johannes Huesing wrote: Is there a special mailing list for th

Re: [R] normalizing prices to a specific year - how to?

2011-01-27 Thread David Winsemius
On Jan 27, 2011, at 3:02 PM, Martin Hvidberg wrote: Dear list I have a large data frame with house prices. Prices have been converted to price per m2, to be able to compare. Prices are spread over almost 10 years, each price is tagged with the year it relates to. I would like to 'normali

Re: [R] boxplot - code for labeling outliers - any suggestions for improvements?

2011-01-27 Thread Greg Snow
Try: library(TeachingDemos) plot(Sepal.Length~Sepal.Width, data=iris) tmp.y <- iris$Sepal.Length for( i in unique(iris$Sepal.Width) ) { tmp <- iris$Sepal.Width == i tmp.y[ tmp ] <- spread.labs( tmp.y[tmp], .6*strheight('A'), maxiter=1000 ) } # optional with(iris,

Re: [R] Meaning of pterms in survreg object?

2011-01-27 Thread Johannes Huesing
Is there a special mailing list for the survival package where my question would have been more appropriate? Johannes Huesing [Mon, Jan 10, 2011 at 09:26:37PM CET]: > I am trying to model survival data with a Weibull distribution >

Re: [R] Errors in Integrate

2011-01-27 Thread David Winsemius
On Jan 27, 2011, at 2:38 PM, mcitkowicz wrote: Hello, I have written the function I would like to integrate in two ways: denfxn <- function(yy,vv,a2,b2,mu2) { pp <- 1-pnorm(yy/sqrt(vv)) part1 <- pp^(a2-1) part2 <- (1-pp)^(b2-1) part3 <- dnorm(yy,mu2,sqrt(vv)) return(part1*part2*par

[R] normalizing prizes to a specific year - how to?

2011-01-27 Thread Martin Hvidberg
Dear list I have a large data frame with house prices. Prices have been converted to price per m2, to be able to compare. Prices are spread over almost 10 years, each price is tagged with the year it relates to. I would like to 'normalize' all the prices to, eg. 2010 prices. The data frame loo

Re: [R] HLM Model

2011-01-27 Thread Doran, Harold
I think it should be fm <- lmer(score ~ trt + pair + grade + school + (1|team), test) The unstructured covariance matrix you use in proc mixed is not available in Rs function for mixed models > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]

[R] HLM Model

2011-01-27 Thread Belle
Hi I am trying to convert SAS codes to R, but some of the result are quite different from SAS. When I ran proc mixed, I have an option ddfm=bw followed by the model. How can I show this method in R (I am thinking that this maybe the reason that I can't get the similar results) below is my SAS

[R] Errors in Integrate

2011-01-27 Thread mcitkowicz
Hello, I have written the function I would like to integrate in two ways: denfxn <- function(yy,vv,a2,b2,mu2) { pp <- 1-pnorm(yy/sqrt(vv)) part1 <- pp^(a2-1) part2 <- (1-pp)^(b2-1) part3 <- dnorm(yy,mu2,sqrt(vv)) return(part1*part2*part3) } denfxnorg <- function(yy,vv,a2,b2,mu2)

Re: [R] Colour area under density curve

2011-01-27 Thread RICHARD M. HEIBERGER
David, I would do this with the HH package. Rich install.packages("HH") ## if you don't already have it library(HH) ## the first call is to learn the number .8162 and see what the scaling is. normal.and.t.dist(mu.H0=5.01, obs.mean=log(300), std.dev=.77, Use.alpha.left=TRUE

[R] possible bug in packageVersion()?

2011-01-27 Thread Yihui Xie
Hi, I received a bug report from a French user who told me there was something wrong with the function packageVersion(), but packageDescription() worked well. Below is the session info; I'm not sure if other French users can reproduce the error message: > packageVersion('base') Erreur : spécifica

[R] Saving log file in R and display run time

2011-01-27 Thread Raquel Rangel de Meireles Guimarães
Hi all, I have two basic questions, hope you should help me: 1. How do I save a log file in R with the results? For example, in Stata it can be done by using "log using c:\...\test.txt" 2. How do I display the execution time of one function like the one below: CalculaCorrelacao <- function(co

Re: [R] help for a loop procedure

2011-01-27 Thread Petr Savicky
On Thu, Jan 27, 2011 at 11:30:37AM +0100, Serena Corezzola wrote: > Hello everybody! > > > > I?m trying to define the optimal number of surveys to detect the highest > number of species within a monitoring season/session. > > To do this I want to run all the possible combinations between a set

[R] Problems installing gputools

2011-01-27 Thread Noah Silverman
Hi, I have some surprising trouble installing the gputools package. This is a linux box running Fedora with an Nvidia GeForce GTX 260 card and R 2.12.1 I had gputools running on it for the past several months. Wanting to update to the newest version, I simply executed install.packages("gputools"

[R] igraph package question

2011-01-27 Thread Yan Jiao
Dear R users, I'm using igraph package for clustering, just wondering is leading.eigenvector.community function result deterministic or not? I got slightly different results on different runs... Many thanks Yan ***

Re: [R] Issue with installing BRugs

2011-01-27 Thread Uwe Ligges
First for general info: Although I am listed as maintainer I am not maintaining this version currently. Thanks to the developers who offer this version and work on it. We will try to get a version on CRAN soon. For your specific question: Download the file and rename it to BRugs_0.6-1.zip. Th

[R] GLM Empirical Likelihood

2011-01-27 Thread Antonio Paredes
Hello, I wanted to ask if there is an R package to fit GLM (logistic for example) via empirical likelihood. -- -Tony [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] Issue with installing BRugs

2011-01-27 Thread Fahrbach, Kyle
Hello, all. When I try to install the most recent BRugs package (the one that uses version 3.1.2), found here: http://www.openbugs.info/w/UserContributedCode I get the following error: > utils:::menuInstallLocal() Error in gzfile(file, "r") : cannot open the connection In addition: Wa

[R] Problem converting zoo object (daily data) to a timeSeries object

2011-01-27 Thread John E. Kaprich
When I try to convert the zoo object to a timeSeries object, which would allow me to utilize Rmetrics packages, I get an error message. > Data<-read.zoo("c:\\DOWUBSPRICING.txt,na.strings="NA",sep="\t",header=T) > is(Data) "zoo" > as.timeSeries.zoo(Data) Error in .local (.Object, . ) Is

Re: [R] applying a set of rules to each row

2011-01-27 Thread David Winsemius
On Jan 27, 2011, at 8:45 AM, KATSCHKE, ADRIAN CIV DFAS wrote: Dennis, This is excellent. Thank you for the help. I knew I had a tangle mess, but I didn't realize how much of a tangle until I used this code. The coding definitely simplified the process and sped up the execution time. Ad

Re: [R] boxplot - code for labeling outliers - any suggestions for improvements?

2011-01-27 Thread Kevin Wright
My colleagues that use one of the .Net languages/libraries can make scatter plots that look better than R's because they have better spreading of the labels. If someone could spread this labels on the following graph, I would be impressed. plot(Sepal.Length~Sepal.Width, data=iris) with(iris,text(

[R] adaptIntegral takes too much time

2011-01-27 Thread Alaios
Hello Dear List members, as you can see (and guess) from the code below adaptIntegrate(f,lowerLimit=c(-1,-1),upperLimit=c(.,.)) $integral [1] 9.997e-09 $error [1] 1.665168e-16 $functionEvaluations [1] 17 $returnCode [1] 0 > adaptIntegrate(f,lowerLimit=c(-1,-1),upperLimit=c(1,1)) the

Re: [R] optim function multi variables -newbie

2011-01-27 Thread Hans W Borchers
michalseneca gmail.com> writes: > Hi, > Basically what I am trying is to rewrite matlab code into R ...This is code > for famous SABR model Calibration. > I did most of the code up to optimalization issue. > In the attachment you can find matlab and my unfinished R code..This is very > helpful co

Re: [R] Measure execution time

2011-01-27 Thread Douglas Bates
?system.time On Thu, Jan 27, 2011 at 10:31 AM, Alaios wrote: > Dear list members, > I would like to measure how much time one function call makes from the time > is call until the time it returns. > > Could you please tell me if that is possible in R? > > > Best Regards > Alex > > __

[R] Measure execution time

2011-01-27 Thread Alaios
Dear list members, I would like to measure how much time one function call makes from the time is call until the time it returns. Could you please tell me if that is possible in R? Best Regards Alex __ R-help@r-project.org mailing list https://stat.e

Re: [R] optim function multi variables -newbie

2011-01-27 Thread michalseneca
Hi, Basically what I am trying is to rewrite matlab code into R ...This is code for famous SABR model Calibration. I did most of the code up to optimalization issue. In the attachment you can find matlab and my unfinished R code..This is very helpful code...Basically I am trying to achieve the sam

Re: [R] boxplot - code for labeling outliers - any suggestions for improvements?

2011-01-27 Thread Tal Galili
Thanks again for the pointer to spread.labs Greg. I implemented it into the function and also extended it to deal with formulas so it could behave just like boxplot. Code and examples are available here: http://www.r-statistics.com/2011/01/how-to-label-all-the-outliers-in-a-boxplot/ I'd be happy

Re: [R] how to divide each element of a matrix by a specific value per column

2011-01-27 Thread Henrique Dallazuanna
Try this: sweep(y, 2, x, "/") On Thu, Jan 27, 2011 at 1:18 PM, adam_pgsql wrote: > > Hi, > > I'd like to divide each element of a matrix by a specific value per column. > These specific values are stored in a list. For example: > > > x <- c(1,2,3,4,5) > > y <- matrix(c(1:30), nrow = 6) > > Now

[R] I am doint this because I dont know if I can just reply to the person that responded to me.

2011-01-27 Thread Ben Boyadjian
I sent this to Siri Bjoner so I dont know if that is allowed or even if it went through. Simulate 1000 observations from the student-t distribution with 3 > degrees of freedom and then calculate the truncated mean by > excluding bottom 5% and top 5%. This is the question I had and I poste

Re: [R] how to divide each element of a matrix by a specific value per column

2011-01-27 Thread Marc Schwartz
On Jan 27, 2011, at 9:18 AM, adam_pgsql wrote: > > Hi, > > I'd like to divide each element of a matrix by a specific value per column. > These specific values are stored in a list. For example: > >> x <- c(1,2,3,4,5) >> y <- matrix(c(1:30), nrow = 6) > > Now I want to divide each element in

Re: [R] how to divide each element of a matrix by a specific value per column

2011-01-27 Thread Dennis Murphy
Here's one way: y/outer(rep(1, nrow(y)), x) [,1] [,2] [,3] [,4] [,5] [1,]1 3.5 4.33 4.75 5.0 [2,]2 4.0 4.67 5.00 5.2 [3,]3 4.5 5.00 5.25 5.4 [4,]4 5.0 5.33 5.50 5.6 [5,]5 5.5 5.67 5.75 5.8 [6,]6 6.0 6.00 6.00 6.0 Run the outer c

Re: [R] creating categorical frequency tables from continuous data

2011-01-27 Thread Dennis Murphy
Hi: Using your data below as the template, u <- cut(x, breaks = c(0, seq(1000, 7000, by = 1000)), dig.lab = 4, right = FALSE) as.data.frame(table(u)) u Freq 1[0,1000)0 2 [1000,2000)5 3 [2000,3000)0 4 [3000,4000)0 5 [4000,5000)0 6 [5000,6000)0 7 [6000,7000)

Re: [R] creating categorical frequency tables from continuous data

2011-01-27 Thread Sascha Vieweg
On 11-01-27 14:58, Louise Mair wrote: Hello, I am working with a dataset which essentially has only one column - a list of distances in metres, accurate to several decimal places. eg distance 1000 6403.124 1000 1414.214 1414.214 1000 I want to organise this into a frequency table, grouping

Re: [R] Writing program for these

2011-01-27 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [cc'ing back to r-help] On 01/27/2011 10:06 AM, Ben Boyadjian wrote: > Yes the it says the uniform distribution on the interval (-5,5). If this is real-valued (which again is not precisely defined, but that would be how I would interpret) then the

[R] how to divide each element of a matrix by a specific value per column

2011-01-27 Thread adam_pgsql
Hi, I'd like to divide each element of a matrix by a specific value per column. These specific values are stored in a list. For example: > x <- c(1,2,3,4,5) > y <- matrix(c(1:30), nrow = 6) Now I want to divide each element in y[,1] by x[1], y[,2] by x[2] etc. I have tried this > my_function

Re: [R] Help needed

2011-01-27 Thread Peter Ehlers
On 2011-01-27 05:16, Ben Boyadjian wrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. B)add elements until the

Re: [R] optim function multi variables -newbie

2011-01-27 Thread Uwe Ligges
On 27.01.2011 14:08, michalseneca wrote: Hi , can i ask if somebody know the syntax for optim function with multiple variables: I have function f (params,y,g,h,j) returnig z y<-C(0.2,0.5,0.6) where params<-c(x1,x2) I define g,h,j and then I define params, then use optim to structure it ..ho

Re: [R] install.packages

2011-01-27 Thread Uwe Ligges
On 27.01.2011 11:16, Temel Canpolat wrote: Hi, I need to install "lmtest package".I have tried to several times to install packages however I could not. Can anyone help? Best regards install.packages () --- Please select a CRAN mirror for use in this session --- Warning: unable to access

[R] creating categorical frequency tables from continuous data

2011-01-27 Thread Louise Mair
Hello, I am working with a dataset which essentially has only one column - a list of distances in metres, accurate to several decimal places. eg distance 1000 6403.124 1000 1414.214 1414.214 1000 I want to organise this into a frequency table, grouping into categories of 0 - 999, 1000 - 199

Re: [R] How to xyplot without borders

2011-01-27 Thread Peter Ehlers
On 2011-01-27 03:34, Juan Andres Hernandez wrote: Hello I have the following data.frame and xyplot. I need this plot without the borders. Does anybody know how to get this xyplot without borders o with white borders? Thank's in advance Juan Hernández my.label<- data.frame(quantil=rep(20,8), my

Re: [R] Help needed

2011-01-27 Thread Thomas Stewart
For question 2, TTT <- rt(1000,3) mean(TTT[rank(TTT) <= 975 & rank(TTT) >25]) On Thu, Jan 27, 2011 at 8:16 AM, Ben Boyadjian wrote: > Hello I am trying to solve these problems and I am not allowed to use loops > or ifs. > > 1st Question > My first question is that I have generated 100 random num

Re: [R] Writing program for these

2011-01-27 Thread Siri Bjoner
Siterer "Sascha Vieweg" : On 11-01-27 14:24, Ben Bolker wrote: Ben Boyadjian hotmail.com> writes: Double post? Yes, probably just hoped that if he changed the subject someone would do his homework for him... __ R-help@r-project.org mailing

Re: [R] Writing program for these

2011-01-27 Thread Sascha Vieweg
On 11-01-27 14:24, Ben Bolker wrote: Ben Boyadjian hotmail.com> writes: Double post? Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add o

Re: [R] Inconsistencies in the rpart.object help file?

2011-01-27 Thread Tal Galili
Thank you Terry, I suspected that this was a mistake in the help file. Who should be contacted regarding this? Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

Re: [R] Writing program for these

2011-01-27 Thread Ben Bolker
Ben Boyadjian hotmail.com> writes: > > Hello I am trying to solve these problems and I am not allowed to use loops or ifs. > > 1st Question > My first question is that I have generated 100 random numbers from the uniform distribution then > A)add only the negative integers. > B)add elements u

[R] adding error bars:Fixed

2011-01-27 Thread ogbos okike
Dear list, Indeed, there is no need adding error bars to boxplot. Points with error bars as suggested will be quite better. Many thanks to those who have advised me on this. Regards Ogbos On 27 January 2011 12:29, Jim Lemon wrote: > On 01/27/2011 05:04 AM, ogbos okike wrote: > >> Dear all, >> I

Re: [R] Help needed

2011-01-27 Thread Sascha Vieweg
On 11-01-27 15:12, Sascha Vieweg wrote: On 11-01-27 13:16, Ben Boyadjian wrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only th

Re: [R] Help needed

2011-01-27 Thread Sascha Vieweg
On 11-01-27 13:16, Ben Boyadjian wrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. x <- c(1, 1.3) x==round

[R] Writing program for these

2011-01-27 Thread Ben Boyadjian
Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. B)add elements until the first appearance of a negative element.

[R] Help needed

2011-01-27 Thread Ben Boyadjian
Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. B)add elements until the first appearance of a negative element.

[R] Quasi-poisson glm and calculating a qAIC and qAICc...trying to modilfy Bolker et al. 2009 function to work for a glm model

2011-01-27 Thread Jason Nelson
Sorry about re-posting this, it never went out to the mailing list when I posted this to r-help forum on Nabble and was pending for a few days, now that I am subscribe to the mailing list I hope that this goes out: I've been a viewer of this forum for a while and it has helped out a lot, but this

[R] selection of hinge function with restrictions, machine learning, earth package,

2011-01-27 Thread Rasti Matus
Hi, I have a few questions regarding machine learning packages in R, e.g. earth package and its forward pass and prunning pass, and hinge functions selection in the example below. 1) How could I force the algorithm to generate knots in hinge function only with values < 90 for e.g. variable doy? 2

Re: [R] Warning with mle

2011-01-27 Thread Ben Bolker
Antje Niederlein yahoo.de> writes: [snip] > But what goes wrong if I want to display confidence intervals? I get a > lot of warnings but I simply don't know why... > > confint(fit) > > Has it something to do with constraints for my parameters (lambda > should be > than zero and prop should r

Re: [R] applying a set of rules to each row

2011-01-27 Thread KATSCHKE, ADRIAN CIV DFAS
Dennis, This is excellent. Thank you for the help. I knew I had a tangle mess, but I didn't realize how much of a tangle until I used this code. The coding definitely simplified the process and sped up the execution time. Adrian -Original Message- From: Dennis Murphy [mailto:djmu...@gm

Re: [R] Inconsistencies in the rpart.object help file?

2011-01-27 Thread Terry Therneau
> splits, a matrix of split labels This is a mistake in the help file. > I'm also not sure I understand what the yval2 columns signify (even that I read what it says in the help). For the kyphosis data set y is a factor with two levels. For the first split yval2 contains (1, 64, 17, .79012

[R] optim function multi variables -newbie

2011-01-27 Thread michalseneca
Hi , can i ask if somebody know the syntax for optim function with multiple variables: I have function f (params,y,g,h,j) returnig z y<-C(0.2,0.5,0.6) where params<-c(x1,x2) I define g,h,j and then I define params, then use optim to structure it ..however if i use syntax optim(params , f,y=y,

Re: [R] Sweave with pdf(): how to remove mention "null device"

2011-01-27 Thread Kevin E. Thorpe
Hi there. Out of curiosity, why are you doing it that way instead of this: <>= plot(runif(100)) @ Kevin On January 27, 2011 05:30:08 am Matthieu Stigler wrote: > great, solved! Thanks a lot for your quick help! > > Le 27. 01. 11 11:22, Prof Brian Ripley a écrit : > > Note that the 'problem' is

[R] help for a loop procedure

2011-01-27 Thread Serena Corezzola
Hello everybody! I’m trying to define the optimal number of surveys to detect the highest number of species within a monitoring season/session. To do this I want to run all the possible combinations between a set of samples and to calculate the total number of species for each combination of 2,

[R] install.packages

2011-01-27 Thread Temel Canpolat
Hi, I need to install "lmtest package".I have tried to several times to install packages however I could not. Can anyone help? Best regards install.packages () --- Please select a CRAN mirror for use in this session --- Warning: unable to access index for repository http://cran.cict.fr/bin/wind

[R] MONMLP neural network

2011-01-27 Thread Raji
Hi R-helpers, I am using MONMLP package for Neural network.I am able to do regression using that.Now, i want to use it for classification.Say, for classifying Iris dataset.I have not seen any example regarding that. Can you please let me know if classification is possible using monmlp NN? If so,

Re: [R] adding error bars

2011-01-27 Thread kirtau
Have you tried using the arrows function with angle = 90? you will have to create a mean and standard error variable - - AK -- View this message in context: http://r.789695.n4.nabble.com/adding-error-bars-tp3238562p3242110.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Extrapolating values from a glm fit

2011-01-27 Thread Ahnate Lim
Thank you for the clarification, this makes sense now! dose.p from MASS also does the job perfectly, in returning x values for specified proportions. I'm curious, if I use the other parameter in predict.glm type="link" (instead of type="response"), in the case of a logistic binomial, what does this

Re: [R] agnes clustering and NAs

2011-01-27 Thread Gavin Simpson
On Thu, 2011-01-27 at 10:45 +0100, Uwe Ligges wrote: > > On 27.01.2011 05:00, Dario Strbenac wrote: > > Hello, > > > > In the documentation for agnes in the package 'cluster', it says that NAs > > are allowed, and sure enough it works for a small example like : > > > >> m<- matrix(c( > > 1, 1, 1,

Re: [R] pdf greek letter typos

2011-01-27 Thread Claudia Beleites
Eduardo, On 01/27/2011 12:53 PM, Philipp Pagel wrote: caused by a problem with font substitution in some version of the poppler library which is uses by many LINUX PDF viewers. Try to view the file in acrobat reader and possibly other viewers. I'm running Ubuntu, and uninstalling package ttf-s

Re: [R] Extrapolating values from a glm fit

2011-01-27 Thread Gavin Simpson
On Thu, 2011-01-27 at 00:10 -1000, Ahnate Lim wrote: > Thank you for the clarification, this makes sense now! dose.p from > MASS also does the job perfectly, in returning x values for specified > proportions. I'm curious, if I use the other parameter in predict.glm > type="link" (instead of type="r

Re: [R] pdf greek letter typos

2011-01-27 Thread Philipp Pagel
On Thu, Jan 27, 2011 at 01:29:31AM -0200, Eduardo de Oliveira Horta wrote: > Hi there, > > yet on the topic of greek letters and pdf plotting: when I run the > following code > > pdf(file="temp.pdf") > mu=seq(from=-pi, to=pi, length=100) > plot(mu, sin(mu^2), > type="l", > xlab=expressi

[R] Can not invoke maxent() of library(dismo) in GNU linux

2011-01-27 Thread Mao Jianfeng
Dear R-helpers and Dr. Hijmans, I can not invoke maxent() in GNU Linux. Could you give me any directions on that? There is maxent.jar in version 3.3.3e in the right folder. R: > jar <- paste(system.file(package="dismo"), "/java/maxent.jar", sep='') > jar [

[R] How to xyplot without borders

2011-01-27 Thread Juan Andres Hernandez
Hello I have the following data.frame and xyplot. I need this plot without the borders. Does anybody know how to get this xyplot without borders o with white borders? Thank's in advance Juan Hernández my.label <- data.frame(quantil=rep(20,8), my.factor=factor(c('FA','FB','FC','FD','FE','FG','FH',

Re: [R] Need help with my homework

2011-01-27 Thread Joshua Wiley
On Thu, Jan 27, 2011 at 1:41 AM, gaja wrote: > > Hey Josh. Thanx for an explicit post, but I still can't get it. Would be nice > if someone would just do that maths instead of posting "forum isn't for > that". I know its for R help and that, but if I can't do it, u could, huh? The whole point of

[R] overlapping linear plots

2011-01-27 Thread anupam sinha
Hi all, Is there any way to plot multiple linear models(lm) on the same window. I have data in the following format where I would like get a log-log plot between 3rd column and 4th column and fit a straight line through the points. The problem is that I have multiple files with such a f

Re: [R] Sweave with pdf(): how to remove mention "null device"

2011-01-27 Thread Matthieu Stigler
great, solved! Thanks a lot for your quick help! Le 27. 01. 11 11:22, Prof Brian Ripley a écrit : Note that the 'problem' is with dev.off(), not pdf(), and the answer is ?invisible. pdf() invisible(dev.off()) On Thu, 27 Jan 2011, Matthieu Stigler wrote: Hi I am sorry, my question seems sim

Re: [R] adding error bars

2011-01-27 Thread Jim Lemon
On 01/27/2011 05:04 AM, ogbos okike wrote: Dear all, I am trying to add error bars on a boxplot but have encountered an error as indicated below. Is there a package I need to install or a library I have to load before this goes please. Thanks for any idea. Ogbos x<-replicate(20,rnorm(50)) boxp

  1   2   >