Re: [R] I don't know the difference between rank and order

2012-11-21 Thread Ted Harding
On 21-Nov-2012 02:57:19 li1127217ye wrote: I don't know the difference between rank and order.For example: x=c(10,30,30,20,10,20) x[rank(x,ties.method=first)] [1] 10 10 20 30 30 20 x[order(x)] [1] 10 10 20 20 30 30 the result is quite different, x[rank(x,ties.method=first)] [1] 10 10

Re: [R] Stepwise analysis with fixed variables

2012-11-21 Thread Einat
I am sorry, but I think my questions were forgotten. Can someone please answer them? Thank you :) -- View this message in context: http://r.789695.n4.nabble.com/Stepwise-analysis-with-fixed-variables-tp4650015p4650264.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Is it possible to draw with function image.asc and show a legend strip in the same window?

2012-11-21 Thread riodementa
Thank you David, Nice idea, but i think that the problem is with the map, (maybe, because image.plot is not for this kind of date) I can try to tranform the map with your idea, but it could be hard. I'm looking for an easier solution :) Forget the points. Example (with library adehabitat) CASE

Re: [R] FW: Select a random subset of rows out of matrix

2012-11-21 Thread Madhu Ganganapalli
Hi, This is Madhu and I have a following doubt please give a solution... **i have the following data frame from this i want to select a 80% of data randomly in such a way that if the selected records are 1 and then we have to get the all records corresponding to 1 similarly for 2 also and

[R] Integration in R

2012-11-21 Thread Rehena Sultana
Dear R - Experts,  I am trying to integrate lognormal distribution (mu = -0.3 and sigma2 = 0.00041.. ) based on the some hypothetical data. But I am getting 0 as the result. I have checked that my R-code is correct as code is giving me result for some other data. As I understand, when I am

Re: [R] I don't know the difference between rank and order

2012-11-21 Thread Patrick Burns
Obviously something that is possible to get wrong even when you know it: http://www.portfolioprobe.com/2012/07/26/r-inferno-ism-order-is-not-rank/ Pat On 21/11/2012 08:13, (Ted Harding) wrote: On 21-Nov-2012 02:57:19 li1127217ye wrote: I don't know the difference between rank and order.For

Re: [R] Function storing error messages in 32 bit R-2.15.2 version

2012-11-21 Thread Uwe Ligges
I think we need the data in order to see if this is a bug or just some numerical issue. Uwe Ligges On 21.11.2012 07:14, Maulik Shah wrote: I am using 32 bit R - 2.15.2 version and working on package ltm. The program does not give me any warning message when I run tpm command for a dataset.

Re: [R] lattice density plot: add vertical lines at groupwise medians for all panels

2012-11-21 Thread Jose Iparraguirre
Dear AnjaM There may be better ways of dealing with this, but the following works: densityplot(~gcsescore | factor(score), groups=gender, data=Chem97, auto.key=TRUE, plot.points=FALSE, ref=TRUE, panel=function(x,...){ panel.densityplot(x,...)

[R] Sourcing files with Umlaut in path no longer works

2012-11-21 Thread Ulrike Grömping
Dear helpeRs, on my new machine - Windows 7 64Bit, R 2.15-2, I can no longer source files for which the path contains the o-Umlaut (ö). As a historical burden, my username is Grömping and contains that Umlaut (I wouldn't have chosen it now, but decided to keep it for easy transfer). I have

Re: [R] Stepwise analysis with fixed variables

2012-11-21 Thread PIKAL Petr
Hi. What questions? I do not see any. Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Einat Sent: Wednesday, November 21, 2012 9:32 AM To: r-help@r-project.org Subject: Re: [R] Stepwise analysis with fixed variables

Re: [R] I don't know the difference between rank and order

2012-11-21 Thread Duncan Murdoch
On 12-11-21 4:59 AM, Patrick Burns wrote: Obviously something that is possible to get wrong even when you know it: http://www.portfolioprobe.com/2012/07/26/r-inferno-ism-order-is-not-rank/ They're not just different, they are inverses of each other: x - rnorm(10) rank(x) [1] 8 1 4 2

Re: [R] Sourcing files with Umlaut in path no longer works

2012-11-21 Thread Duncan Murdoch
On 12-11-21 6:49 AM, Ulrike Grömping wrote: Dear helpeRs, on my new machine - Windows 7 64Bit, R 2.15-2, I can no longer source files for which the path contains the o-Umlaut (ö). As a historical burden, my username is Grömping and contains that Umlaut (I wouldn't have chosen it now, but

Re: [R] Controlling the number of interactions of a lme

2012-11-21 Thread Ben Bolker
cleberchaves cleberchaves at gmail.com writes: [snip] My model have many response variables and when i run the anova, the number of interactions (up to six) is great and the p-values of all variables not appear. I wanted to know if i could to control the number of interactions of the

Re: [R] FW: Select a random subset of rows out of matrix

2012-11-21 Thread arun
HI, Your question is not very clear to me. dat1-data.frame(x=c(1,1,2,2,2,3,4,4),y=c(23,45,87,46,78,12,87,79)) If I select randomly 80% of data:  dat1[sample(nrow(dat1),0.8*nrow(dat1)),] #  x  y #4 2 46 #6 3 12 #7 4 87 #3 2 87 #2 1 45 #8 4 79 In this case, it is a mix of all the records that was

Re: [R] FW: Select a random subset of rows out of matrix

2012-11-21 Thread Rui Barradas
Hello, It's not, in general, possible to fullfill the two constraints, to both select 80% of the rows and to select all x %in% sampled x. Maybe the following is a way close enough. set.seed(244) s - sample(unique(dat$x), length(unique(dat$x))*0.8, prob = table(dat$x)) dat[dat$x %in% s,]

Re: [R] Sourcing files with Umlaut in path no longer works

2012-11-21 Thread peter dalgaard
On Nov 21, 2012, at 12:49 , Ulrike Grömping wrote: Dear helpeRs, on my new machine - Windows 7 64Bit, R 2.15-2, I can no longer source files for which the path contains the o-Umlaut (ö). As a historical burden, my username is Grömping and contains that Umlaut (I wouldn't have chosen it

Re: [R] Sourcing files with Umlaut in path no longer works

2012-11-21 Thread Duncan Murdoch
On 21/11/2012 6:49 AM, Ulrike Grömping wrote: Dear helpeRs, on my new machine - Windows 7 64Bit, R 2.15-2, I can no longer source files for which the path contains the o-Umlaut (ö). As a historical burden, my username is Grömping and contains that Umlaut (I wouldn't have chosen it now, but

[R] Create BATCH file

2012-11-21 Thread R_Antony
Hi, I have a .R file written many functions into that. My requirement what is, i need to create a batch file for this. No idea, how to create it. Tried it many other ways, but no result !. Could anyone please help me out ? Thanks. Antony. -- View this message in context:

[R] Statistical significance in robust estimation rlm()

2012-11-21 Thread fxen3k
Hi there, I used the rlm() function for doing a robust estimation based on M-estimates. Obviously, you only get the estimate, standard error and t- value by implementing this rlm() function. So, how can I say if a coefficient is statistical significant without the presence of a p-value? Thanks

[R] [lattice] print only legend

2012-11-21 Thread AnjaM
Is it possible to plot (and save) only the legend of a lattice plot? Of course I could make the axes and axis labels transparent and use an empty panel function, but additionally to being a very dirty solution, there would be still a lot of free space on the plot, while I would like to save only

Re: [R] lattice density plot: add vertical lines at groupwise medians for all panels

2012-11-21 Thread Anja Mirenska
Dear José Thanks for your reply. I've tried out your suggestion, but this code plots the overall median for each group rather than plotting the medians for the individual panels. What I am looking for is a way to calculate the medians per group for each panel. Sorry if I didn't state it clearly

[R] dúvidas com matriz de correlação e covariancia

2012-11-21 Thread alanarocha
Bom dia eu chamo-me Ana, estou a tentar fazer matriz de correlação e covariancia para comparar 4 variaveis e saber quais são as mehores... fiz o segundo codigo mas devo tar a fazer alguma confusão para nao me aparecer o output correcto: cor(dados[,2:5],method=c(pearson))

[R] creat an interactive graph

2012-11-21 Thread Henry Smith
Hello! Does anyone get any idea how to generate a following graph by using R? http://www.fastcodesign.com/multisite_files/codesign/imagecache/inline-large/post-inline/inline-north-carolina-gay-rights.jpg Any information or hint will be highly appreciated. Kind regards, Henry

Re: [R] Stepwise analysis with fixed variables

2012-11-21 Thread Einat
These are my questions: 1. For example, if this is my code: RegModel = lm(glucose~sex+BMI+height+weight+education+ses,weight=w_without_non_response) summary(RegModel) step(RegModel, direction =backward,scope=list(lower=?,upper=?)) and I want the sex and height variables to be fixed, but

[R] size of the side panel in gvisMotionChart

2012-11-21 Thread xavier abulker
Hello, Is there an option parameter to increase the size of the bottom right side panel in gvisMotionChart? My data labels are too long for this panel (for example Call butterfly spread @ 2400/2600/2800) and the names are always cut even if I increase the width and height. Regards Xavier

[R] Creating a frequency table for binomial varaible

2012-11-21 Thread arun4
Hello, I have simulated 30 observations from a binomial(5,0.1) distribution. Now I need to make frequency table( that means I need to tally how many 0's , 1's 2's... 5's) I know that the simple R function table() will do this, but I am afraid that some times I may get zero frequency for

Re: [R] Stepwise analysis with fixed variables

2012-11-21 Thread Einat
These are my questions: 1. For example, if this is my code: RegModel = lm(glucose~sex+BMI+height+weight+education+ses,weight=w_without_non_response) summary(RegModel) step(RegModel, direction =backward,scope=list(lower=?,upper=?)) and I want the sex and height variables to be fixed, but the

Re: [R] Ben Bolker's '‘emdbook’ Package , rbetabinom

2012-11-21 Thread arun4
I understood that from the source code. Currently I am referring the suggested articles. Thank you very much for the off-list answer and this reply. -- View this message in context: http://r.789695.n4.nabble.com/Ben-Bolker-s-emdbook-Package-rbetabinom-tp4650056p4650287.html Sent from the R

Re: [R] Controlling the number of interactions of a lme

2012-11-21 Thread cleberchaves
Is it, bbolker! Thank you very, very much! -- View this message in context: http://r.789695.n4.nabble.com/Controlling-the-number-of-interactions-of-a-lme-tp4650183p4650290.html Sent from the R help mailing list archive at Nabble.com. __

[R] Weighted least squares

2012-11-21 Thread rbowman16
Hi everyone, I admit I am a bit of an R novice, and I was hoping someone could help me with this error message: Warning message: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : extra arguments weigths are just disregarded. My equation is: lm( Y ~ X1 + X2 + X3, weigths

Re: [R] Creating a frequency table for binomial varaible

2012-11-21 Thread arun4
As I have to to this in a simulation study for 1000 such binomial variables, I have created a R function as below.. Am I doing in the correct way? or is there any other simplest ways? #using a user defined function to create a frequency distribution create.freq.table- function(x){

Re: [R] Creating a frequency table for binomial varaible

2012-11-21 Thread Rui Barradas
Hello, Try table(x) # or table(dat$value) Hope this helps, Rui Barradas Em 21-11-2012 13:19, arun4 escreveu: Hello, I have simulated 30 observations from a binomial(5,0.1) distribution. Now I need to make frequency table( that means I need to tally how many 0's , 1's 2's... 5's) I

Re: [R] dúvidas com matriz de correlação e covariancia

2012-11-21 Thread Rui Barradas
Olá É melhor escreveres em inglês, esta lista é anglófona. As for your file, r-help doesn't like attachments, use ?dput instead: dput( head(dados, 30) ) # paste the output of this in a post Hope this helps, Rui Barradas Em 21-11-2012 11:03, alanaro...@sapo.pt escreveu: Bom dia eu chamo-me

Re: [R] Weighted least squares

2012-11-21 Thread Martyn Byng
Hi, That message usually means that an unknown argument has been supplied to the function. In this case you have spelt weights incorrectly. Best wishes Martyn -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of rbowman16 Sent: 21

Re: [R] Creating a frequency table for binomial varaible

2012-11-21 Thread William Dunlap
I know that the simple R function table() will do this, but I am afraid that some times I may get zero frequency for some particular values Make a factor out of your data, specifying all the levels you want counts for, and pass that factor to table(). E.g., x - rep(0:6,

Re: [R] Stepwise analysis with fixed variables

2012-11-21 Thread Marc Schwartz
On Nov 21, 2012, at 6:41 AM, Einat einatgra...@gmail.com wrote: These are my questions: 1. For example, if this is my code: RegModel = lm(glucose~sex+BMI+height+weight+education+ses,weight=w_without_non_response) summary(RegModel) step(RegModel, direction

Re: [R] Stepwise analysis with fixed variables

2012-11-21 Thread PIKAL Petr
Hi I am not at all an expert in step. From the help page I inferred that step(lm1, scope=list(lower=~Catholic)) keeps Catholic in model. So something like step(RegModel, direction =backward,scope=list(lower=~sex+height)) shall leave those two in a model. AFAIK there is no parameter alpha in

Re: [R] creat an interactive graph

2012-11-21 Thread R. Michael Weylandt
I'd use ggplot2 and combine geom_bar() and coord_polar() Google the LearningR blog and find the consultant's chart entry. Michael On Wednesday, November 21, 2012, Henry Smith wrote: Hello! Does anyone get any idea how to generate a following graph by using R?

[R] lists as matrix cells ?

2012-11-21 Thread Asis Hallab
Dear R experts, since more or less half a year I am using R. In many of my computations I construct huge matrices. Often I do so using 'cbind' on named lists: do.call( 'cbind', list( Column_A=list(Row_one=1.0, Row_two=2.0, Row_three=3.0), Column_B=list(Row_one=4.0, Row_two=5.0,

[R] Scaling values 0-255 - -1 , 1 - how can this be done?

2012-11-21 Thread Brian Feeny
I have a dataframe in which I have values 0-255, I wish to transpose them such that: if value 127.5 value = 1 if value 127.5 value = -1 I did something similar using the binarize function of the biclust package, this transforms my dataframe to 0 and 1 values, but I wish to use -1 and 1 and

Re: [R] Creating a frequency table for binomial varaible

2012-11-21 Thread arun4
Thank you A.K Btw in which package count() is available? -- View this message in context: http://r.789695.n4.nabble.com/Creating-a-frequency-table-for-binomial-varaible-tp4650286p4650305.html Sent from the R help mailing list archive at Nabble.com.

[R] installing Rmpi on centos 6 with mpich

2012-11-21 Thread Ricardo Román Brenes
Hello everyone im trying to install Rmpi library on centos 6. I have already installed mpich2 1.4 [root@localhost ~]# R --version R version 2.15.1 (2012-06-22) -- Roasted Marshmallows Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform:

Re: [R] Creating a frequency table for binomial varaible

2012-11-21 Thread arun4
Thank you Bill Dunlap . This seems very simple. -- View this message in context: http://r.789695.n4.nabble.com/Creating-a-frequency-table-for-binomial-varaible-tp4650286p4650312.html Sent from the R help mailing list archive at Nabble.com. __

[R] Help with loop

2012-11-21 Thread Hefri
Hi, I have used R for some time, but managed to avoid writing loops. But this time I am afraid there is no way around it. I have a dataframe with time and salinity (see below). I would like to extract the time intervals where salinity changes by less than 0.05. So using the values below this

[R] installing Rmpi on centos 6 with mpich

2012-11-21 Thread Ricardo Román Brenes
Hello everyone im trying to install Rmpi library on centos 6. I have already installed mpich2 1.4 [root@localhost ~]# R --version R version 2.15.1 (2012-06-22) -- Roasted Marshmallows Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform:

[R] help with if statement

2012-11-21 Thread york8866
Hi all, I had a dataset A like: TIME DV 0 0 1 10 520 24 30 36 80 48 60 72 15 I would like to add 24 to those values higher than 24 in the TIME column. I did the following: If (A$TIME=24) { A$TIME - A$TIME+24} It did not work. How should I do it? Thanks, -- View this message

[R] Finding a max

2012-11-21 Thread Ignacio Martinez
My data looks like this: X Y1(X) Y2(X) i want to find the values of x that maximize Y1 and Y2. Right now I'm getting the answer but I would like to know if there is a more efficient/elegant way of doing this. This code reproduces what I'm doing: [code] prop3-structure(list(effort = c(0,

Re: [R] Scaling values 0-255 - -1 , 1 - how can this be done?

2012-11-21 Thread Marc Schwartz
On Nov 21, 2012, at 9:32 AM, Brian Feeny bfe...@me.com wrote: I have a dataframe in which I have values 0-255, I wish to transpose them such that: if value 127.5 value = 1 if value 127.5 value = -1 I did something similar using the binarize function of the biclust package, this

Re: [R] Scaling values 0-255 - -1 , 1 - how can this be done?

2012-11-21 Thread Sarah Goslee
fakedata - data.frame(matrix(sample(1:255, 50, replace=TRUE), ncol=5)) ifelse(fakedata 127.5, 1, -1) Sarah On Wed, Nov 21, 2012 at 10:32 AM, Brian Feeny bfe...@me.com wrote: I have a dataframe in which I have values 0-255, I wish to transpose them such that: if value 127.5 value = 1 if

Re: [R] lists as matrix cells ?

2012-11-21 Thread Sarah Goslee
A matrix may only contain one data type. By not specifying when you created m, it was filled with logical values of NA. A logical value can't hold a list. You can see that with str(m) which returns: str(m) logi [1:3, 1:2] NA NA NA NA NA NA - attr(*, dimnames)=List of 2 ..$ : chr [1:3]

Re: [R] help with if statement

2012-11-21 Thread Sarah Goslee
Use ifelse(). ifelse(A$TIME = 24, A$TIME + 24, A$TIME) Please in the future use dput() to provide your data, and explain what did not work means. Sarah On Wed, Nov 21, 2012 at 12:05 PM, york8866 yu_y...@hotmail.com wrote: Hi all, I had a dataset A like: TIME DV 0 0 1 10 520 24

Re: [R] Create BATCH file

2012-11-21 Thread Suzen, Mehmet
Try this: http://stat.ethz.ch/R-manual/R-patched/library/utils/html/BATCH.html On Wed, Nov 21, 2012 at 11:58 AM, R_Antony antony.akk...@ge.com wrote: Hi, I have a .R file written many functions into that. My requirement what is, i need to create a batch file for this. No idea, how to create

Re: [R] help with if statement

2012-11-21 Thread Rainer Schuermann
Does A$TIME - ifelse( A$TIME = 24, A$TIME + 24, A$TIME ) what you want? Rgds, Rainer On Wednesday 21 November 2012 09:05:39 york8866 wrote: Hi all, I had a dataset A like: TIME DV 0 0 1 10 520 24 30 36 80 48 60 72 15 I would like to add 24 to those values higher

Re: [R] installing Rmpi on centos 6 with mpich

2012-11-21 Thread Marc Schwartz
On Nov 21, 2012, at 10:40 AM, Ricardo Román Brenes rro...@cenat.ac.cr wrote: Hello everyone im trying to install Rmpi library on centos 6. I have already installed mpich2 1.4 [root@localhost ~]# R --version R version 2.15.1 (2012-06-22) -- Roasted Marshmallows Copyright (C) 2012 The R

Re: [R] installing Rmpi on centos 6 with mpich

2012-11-21 Thread Ricardo Román Brenes
i've followed that guide already to no success On Wed, Nov 21, 2012 at 11:34 AM, Marc Schwartz marc_schwa...@me.comwrote: On Nov 21, 2012, at 10:40 AM, Ricardo Román Brenes rro...@cenat.ac.cr wrote: Hello everyone im trying to install Rmpi library on centos 6. I have already installed

Re: [R] Help with loop

2012-11-21 Thread Rui Barradas
Hello, If I understand it well, this might avoid a loop. dat - read.table(text= Salt time 1 35.65114 2003-07-19 2 35.64226 2003-07-20 3 35.62411 2003-07-21 4 35.62473 2003-07-22 5 35.65893 2003-07-23 6 35.70140 2003-07-24 7 35.62157 2003-07-25 8 35.64122 2003-07-26 9 35.63515

Re: [R] installing Rmpi on centos 6 with mpich

2012-11-21 Thread Marc Schwartz
On Nov 21, 2012, at 11:36 AM, Ricardo Román Brenes rro...@cenat.ac.cr wrote: i've followed that guide already to no success That installation guide shows the installation taking place from the CLI outside of R, using R CMD INSTALL ..., not using install.packages() from within an R session,

Re: [R] Scaling values 0-255 - -1 , 1 - how can this be done?

2012-11-21 Thread Rainer Schuermann
x - as.data.frame( matrix( 0:255, nrow = 16 ) ) ifelse( x 127.5, 1, -1 ) Is that what you want? Rgds, Rainer On Wednesday 21 November 2012 10:32:49 Brian Feeny wrote: I have a dataframe in which I have values 0-255, I wish to transpose them such that: if value 127.5 value = 1 if

[R] Help: is there a R Package for L1-regression (not regression with L1-penalty)

2012-11-21 Thread Chee Chen
Dear All, Is there a R package for L1-regression (meaning, optimize the sum of absolute deviations, NOT TO BE UNDERSTOOD as regression with L1-penalty) ? Any information will be appreciated. Regards, Chee [[alternative HTML version deleted]] __

Re: [R] Finding a max

2012-11-21 Thread Rui Barradas
Hello, You're complicating what is simple: prop3$effort[which.max(prop3$Low)] # First maximum of Low prop3$effort[which.max(prop3$High)] # Ditto, of High which.max(prop3$Low) # Row number that maximizes Low which.max(prop3$High) # Row number that maximizes High Hope this helps, Rui

Re: [R] Finding a max

2012-11-21 Thread Bert Gunter
On Wed, Nov 21, 2012 at 9:51 AM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, You're complicating what is simple: Fortune? (Well, it's a profound truism that we all should live by -- but I leave it to others to judge whether it meets Fortunes criteria). -- Bert

Re: [R] Scaling values 0-255 - -1 , 1 - how can this be done?

2012-11-21 Thread arun
HI, You could also use: set.seed(5)  x1-data.frame(matrix(sample(0:255,80,replace=TRUE),ncol=10)) library(car)  do.call(cbind,lapply(x1,function(x) x-recode(x,0:127.5=-1;127.6:255=1))) # X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 #[1,] -1  1 -1 -1 -1  1  1 -1  1  -1 #[2,]  1 -1  1 -1 -1 -1  1 -1  1   1

Re: [R] Create BATCH file

2012-11-21 Thread FJ M
C:\Program Files\R\R-2.15.1\bin\x64\R.exe CMD BATCH C:\Users\Frank\Documents\R\Projects\Current_Yield\Divs.txt C:\Users\Frank\Documents\R\Projects\Current_Yield\Divs.out Divs.txt contains my R code and the output goes to Divs.out. I always check Divs.out first. If you want to write objects

Re: [R] Sourcing files with Umlaut in path no longer works

2012-11-21 Thread Ulrike Grömping
Duncan and Peter, thank you very much! Actually, I made a mistake with the path, due to my inexperience with Windows 7 (user instead of users). The R warning then confused me, because I was told that 'C:/user/grömping/documents/publicat/...' wasn't found. In fact, once the path was correct,

Re: [R] GEE - order of data?

2012-11-21 Thread JoAnn Alvarez
Hi Anna, In the geeglm help file, it states Data are assumed to be sorted so that observations on a cluster are contiguous rows for all entities in the formula. I'm not sure if you are asking how to sort data, or how your data should be sorted. If your data come from a data frame called dat, it

Re: [R] Remove Column from matrix

2012-11-21 Thread JoAnn Alvarez
Hi frespider, I think the problem is first that you are referring to column names that you haven't yet defined. To add the column names you can use the dimnames argument of the matrix function. Asse - matrix(0,nrow=5,ncol=length(namVar), dimnames = list(NULL, namVar)) JoAnn -- View this

Re: [R] help with if statement

2012-11-21 Thread David Winsemius
On Nov 21, 2012, at 9:05 AM, york8866 wrote: Hi all, I had a dataset A like: TIME DV 0 0 1 10 520 24 30 36 80 48 60 72 15 I would like to add 24 to those values higher than 24 in the TIME column. I did the following: If (A$TIME=24) { A$TIME - A$TIME+24} It did not work.

Re: [R] Spider Graph

2012-11-21 Thread Britt Aronovich
Hi, Is the stars command in the base package or do I need to download? I am looking to make star/radar/spider charts. Thanks! Britt Britt Aronovich Marketing Analyst BAM (Brooklyn Academy of Music) ... Peter Jay Sharp Building 30 Lafayette Ave. Brooklyn, NY 11217-01486 ... P: 718.724.8038 E:

[R] Modify Y axis

2012-11-21 Thread Elli
How you can change the Y-axis intervals in a graph? Use and ylim command but this command only changes the minimum and maximum values ​​of the axis, I want to do is take the axis values ​​from 10 to 10 for example How I can do? thanks -- View this message in context:

[R] Remove Column from matrix

2012-11-21 Thread frespider
Hi,, Can I get help with this. I need to remove a column form the matrix if that specific column has his all entry zero, here the code I wrote but it is not working can you help me please namVar -

[R] histogram help

2012-11-21 Thread Rosario Scandurra
Hi, I want to generate an histogram and plot on the y axis the percentage of a categorical variable and on the x axis a nominal variable. I want to move the origin to have 2 categories below 0. Hope somebody could help me. Thanks. Best, -- Rosario Ivano Scandurra [[alternative HTML

[R] Bayesian cluster analysis - R functions

2012-11-21 Thread KitKat
I want to try Bayesian cluster analysis. Someone suggested using package mcclust. Is there a website that says how to install mcclust or another appropriate Bayesian package? Including the appropriate R functions that I can follow? I am trying to get probability of membership for each individual

[R] plotting 1000 simulations, error message: plot.new has not been called yet

2012-11-21 Thread Maximilian Lklweryc
Hi, I know this is not a mailing list for r, but I posted my question on several help pages and did not get any help. I really don't know how to solve my problem, maybe you could help me? want to simulate stock paths. I have simulated 1000 paths with 22 trading days (1 starting value). Now I want

Re: [R] cluster analysis in R

2012-11-21 Thread KitKat
Thank you for replying! I made a new post asking if there are any websites or files on how to download package mclust (or other Bayesian cluster analysis packages) and the appropriate R functions? Sorry I don't know how this forum works yet -- View this message in context:

[R] printing difftime summary

2012-11-21 Thread Sam Steingold
Hi, I have a vector of difftime objects and I want to see its summary. Alas: --8---cut here---start-8--- summary(infl$delay) LengthClass Mode 9008386 difftime numeric --8---cut here---end---8--- this is almost

Re: [R] side by side boxplots

2012-11-21 Thread JoAnn Alvarez
Hi Charlie, I'm not sure what you mean by opposite direction. It would be helpful if you include a simple, self-contained dataset here to illustrate your problem. For side-by-side boxplots, you can use tplot. JoAnn -- View this message in context:

[R] remote connection to an Oracle database - using RODBC - RMySQL..?

2012-11-21 Thread Raffaello Vardavas
Dear users, I can access an database oracle database using sql developer. This was done by importing an xml file that contains the login details - username, password and specifies that it uses the KERBEROS_AUTHENTICATION. I'm trying to connect R - so that it can access this database - do sql

Re: [R] Scaling values 0-255 - -1 , 1 - how can this be done?

2012-11-21 Thread David Winsemius
On Nov 21, 2012, at 7:32 AM, Brian Feeny wrote: I have a dataframe in which I have values 0-255, I wish to transpose them such that: if value 127.5 value = 1 if value 127.5 value = -1 c(-1, 1)[ 1+(value 127.5) ] I suspect most will find this less intuitive than `ifelse`, but I

Re: [R] histogram help

2012-11-21 Thread John Kane
i think we need some sample data. I would not have thought that you could calculate the percentage of a categorical data so perhaps a simple example of what you are doing would help. John Kane Kingston ON Canada -Original Message- From: rosario.scandu...@gmail.com Sent: Wed, 21

Re: [R] Modify Y axis

2012-11-21 Thread jim holtman
?axis On Wed, Nov 21, 2012 at 12:44 PM, Elli ellilti_...@hotmail.com wrote: How you can change the Y-axis intervals in a graph? Use and ylim command but this command only changes the minimum and maximum values of the axis, I want to do is take the axis values from 10 to 10 for example How

Re: [R] Spider Graph

2012-11-21 Thread David Winsemius
On Nov 21, 2012, at 9:09 AM, Britt Aronovich wrote: Hi, Is the stars command in the base package No. or do I need to download? No I am looking to make star/radar/spider charts. The `stars` function is in the graphics package which is loaded by default. You should ahve been able to

Re: [R] Modify Y axis

2012-11-21 Thread David Winsemius
On Nov 21, 2012, at 9:44 AM, Elli wrote: How you can change the Y-axis intervals in a graph? Use and ylim command but this command only changes the minimum and maximum values ​​of the axis, I want to do is take the axis values ​​ from 10 to 10 for example How I can do? ?axis You will

Re: [R] Spider Graph

2012-11-21 Thread John Kane
is this link of any use? http://www.inside-r.org/packages/cran/fmsb/docs/radarchart John Kane Kingston ON Canada -Original Message- From: baronov...@bam.org Sent: Wed, 21 Nov 2012 12:09:38 -0500 To: r-help@r-project.org Subject: Re: [R] Spider Graph Hi, Is the stars command

Re: [R] Scaling values 0-255 - -1 , 1 - how can this be done?

2012-11-21 Thread S Ellison
Subject: Re: [R] Scaling values 0-255 - -1 , 1 - how can this be done? #Also by taking advantage of numerical interpretation of booleans: x- sample(255) #toy data 2*( x 127.5 ) - 1 #S Ellison *** This email and any

Re: [R] cluster analysis in R

2012-11-21 Thread Brian Feeny
http://cran.r-project.org/web/views/Cluster.html might be a good start Brian On Nov 21, 2012, at 1:36 PM, KitKat wrote: Thank you for replying! I made a new post asking if there are any websites or files on how to download package mclust (or other Bayesian cluster analysis packages) and

Re: [R] remote connection to an Oracle database - using RODBC - RMySQL..?

2012-11-21 Thread Marc Schwartz
On Nov 21, 2012, at 1:52 PM, Raffaello Vardavas r_varda...@hotmail.com wrote: Dear users, I can access an database oracle database using sql developer. This was done by importing an xml file that contains the login details - username, password and specifies that it uses the

Re: [R] Remove Column from matrix

2012-11-21 Thread Rui Barradas
Hello, Three things: 1. You don't need an explicit comparison to TRUE, if(all(Asse[,SSdiff]==0)){ will do the same. 2. Your matrix Asse doesn't have colnames, try to see the output of colnames(Asse) You forgot to assign colnames(Asse) - namVar. 3. Even if it did, SSdiff is the 4th column,

[R] Using doMC to run parallel SVM grid search?

2012-11-21 Thread Brian Feeny
Has anyone used doMC to speed up an SVM grid search? I am considering doing like so: library(doMC) registerDoMC() foreach (i=0:3) %dopar% { tuned_part1 - tune.svm(label~., data = trainset, gamma = 10^(-10:-6), cost = 10^(-1:1)) tuned_part2 - tune.svm(label~., data = trainset,

Re: [R] Help: is there a R Package for L1-regression (not regression with L1-penalty)

2012-11-21 Thread cberry
Chee Chen chee.c...@yahoo.com writes: Dear All, Is there a R package for L1-regression (meaning, optimize the sum of absolute deviations, NOT TO BE UNDERSTOOD as regression with L1-penalty) ? Yes. Any information will be appreciated. See

[R] Regression: standardized coefficients CI

2012-11-21 Thread Torvon
I run 9 WLS regressions in R, with 7 predictors each. What I want to do now is compare: (1) The strength of predictors within each model (assuming all predictors are significant). That is, I want to say whether x1 is stronger than x2, and also say whether it is significantly stronger. I compare

Re: [R] Integration in R

2012-11-21 Thread Rolf Turner
On 21/11/12 22:26, Rehena Sultana wrote: Dear R - Experts, I am trying to integrate lognormal distribution (mu = -0.3 and sigma2 = 0.00041.. ) based on the some hypothetical data. But I am getting 0 as the result. I have checked that my R-code is correct as code is giving me result for some

Re: [R] Regression: standardized coefficients CI

2012-11-21 Thread Bert Gunter
1. This is a statistics, not an R, question. Post on a statistics list, like stats.stackexchange.com Also... On Wed, Nov 21, 2012 at 12:39 PM, Torvon tor...@gmail.com wrote: I run 9 WLS regressions in R, with 7 predictors each. What I want to do now is compare: (1) The strength of predictors

Re: [R] [lattice] print only legend

2012-11-21 Thread David Winsemius
On Nov 21, 2012, at 1:45 AM, AnjaM wrote: Is it possible to plot (and save) only the legend of a lattice plot? Of course I could make the axes and axis labels transparent and use an empty panel function, but additionally to being a very dirty solution, there would be still a lot of free

Re: [R] Integration in R

2012-11-21 Thread William Dunlap
But if you use a smaller sdlog value then integrate does get it wrong because it does not find the delta-like function hidden somewhere between 0 and infinity. integrate(function(x){dlnorm(x,meanlog=-0.3,sdlog=0.00041)},0,Inf) 0 with absolute error 0

Re: [R] Finding a max

2012-11-21 Thread Ignacio Martinez
Thanks a lot! On Wed, Nov 21, 2012 at 12:51 PM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, You're complicating what is simple: prop3$effort[which.max(prop3$**Low)] # First maximum of Low prop3$effort[which.max(prop3$**High)] # Ditto, of High which.max(prop3$Low) # Row number

Re: [R] update fit (removing insignificant variables)

2012-11-21 Thread arun
HI, I am not sure about the ?update() method. You could try this: set.seed(232) mat1-matrix(sample(1:100,80,replace=TRUE),ncol=8) #with 8 columns dat1-data.frame(mat1)  names(dat1)[1]-Y  fit-lm(Y~.,data=dat1) res-coef(summary(fit))  res # Estimate Std. Error t value  

Re: [R] Remove Column from matrix

2012-11-21 Thread frespider
Hi, I edited the code sorry, I forgot the line before Can you have look again please? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Remove-Column-from-matrix-tp4650334p4650348.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Remove Column from matrix

2012-11-21 Thread arun
Hi, In this particular example, you may not be able to remove any columns: because: namVar - c(TrlgWSST,TrlgWSSE,TrlgWSSR,SSdiff,TrlgWMSE,TrlgWR2,TrlgWR2adj,TrlgSSE,TrlgMSE,TrlgR2,TrlgR2adj,TrSSE,TrMSE,TrR2,TrR2adj,rdf2, TelgSSE,TelgMSE,TelgR2,TelgR2adj,TelgWSSE,TelgWMSE

[R] lmer model specification

2012-11-21 Thread Roy
I am running version 2.15.2 64 bit version on 64 bit Windows 7. I have a data set with the following structure: Fixed Effect: locationFact Random Effects: datefact, timefact nested in datefact, interactions of datefact and timefact with locationFact I fit the model with the latest version of

Re: [R] Creating a frequency table for binomial varaible

2012-11-21 Thread arun
Hi, library(plyr) #sorry, forgot about that ?count() Anyway, Bill's solution is much easier and simple. You can also use this: set.seed(25)   bindat-rbinom(20,15,0.1)  data.frame(value=0:5,freq=sapply(0:5,function(x,y=bindat) length(y[y==x]))) #  value freq #1 0    4 #2 1    7 #3 2 

  1   2   >