Re: [R] ROCR package not installing

2012-11-22 Thread Mohammed Ouassou
try: install.packages(ROCR,dep=T) M.O On to., 2012-11-22 at 16:02 +1000, Philip Robinson wrote: I have tried installing the package (ROCR) with this command: Install.packages(ROCR) And with this command on the command line R CMD INSTALL ROCR_1.0-4.tar.gz But

Re: [R] cluster analysis in R

2012-11-22 Thread Ingmar Visser
It's hard to answer these questions without knowing what the errors are and how they can be reproduced. Best, Ingmar On Thu, Nov 22, 2012 at 1:03 AM, KitKat katherinewri...@trentu.ca wrote: Thanks, I have been trying that site and another one (http://www.statmethods.net/advstats/cluster.html)

Re: [R] ROCR package not installing

2012-11-22 Thread Philip Robinson
My version is: Linux bioinform08 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011 x86_64 GNU/Linux Ubuntu 10.04.3 LTS R version 2.10.1 (2009-12-14) Philip -Original Message- From: Pascal Oettli [mailto:kri...@ymail.com] Sent: Thursday, 22 November 2012 4:20 PM To: Philip

Re: [R] ROCR package not installing

2012-11-22 Thread Philip Robinson
Hi Mohammed, This didn't work either: Error in setMethod(plot, signature(x = performance, y = missing), : no existing definition for function plot Error : unable to load R code in package 'ROCR' ERROR: lazy loading failed for package ‘ROCR’ * removing

Re: [R] ROCR package not installing

2012-11-22 Thread Pascal Oettli
Very old version. Maybe you should try again after upgrading your version of R (current is 2.15.2). Pascal Le 22/11/2012 18:11, Philip Robinson a écrit : My version is: Linux bioinform08 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011 x86_64 GNU/Linux Ubuntu 10.04.3 LTS R

[R] error message in Linkcomm package

2012-11-22 Thread Nick Duncan
Dear All, Some of the functions in Linkcomm return an error: unused argument(s) (v = V(x$igraph)) Although I follow the guidance in the manual a number of the functions return this error. The igraph vector is an edgelist. Many thanks for any guidance. Best, Nick

[R] prediction problem

2012-11-22 Thread Catarina Maia
Hello, I am using the mda package and in particular the fda routine to classify/predict in terms of color to a set of 20 samples for which i don´t know the color. I preformed a flexible discriminant analysis (FDA) using a set of 147 samples for which i know all the information. My script

Re: [R] Stepwise analysis with fixed variables

2012-11-22 Thread Einat
Thanks. -- View this message in context: http://r.789695.n4.nabble.com/Stepwise-analysis-with-fixed-variables-tp4650015p4650419.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] problems with RPostgreSQL compilation

2012-11-22 Thread lanczos
Hello, I am trying to install RPostgreSQL, but without success at the moment, getting an errormessage - see below. My OS is Fedora 17, R version 2.15.2, PostgreSQL 9.2.1 with Postgis 2.0.1 spatial extension. Thank You for any help, advice or hint in advance. Regards Tomas

[R] [lattice] Increase distance between tick labels and ticks in wireframe plot (pad)

2012-11-22 Thread Felix Schönbrodt
Hello, I try to increase the distance between tick labels and ticks in a lattice wireframe plot. Here's a minimal example: ## Minimal example x - y - z - c(1,2,3) df - data.frame(x, y, z) wireframe(z ~ x*y, df, scales = list(arrows = FALSE, col = black, font = 1, tck=0.6)) I tried the

[R] How to read jpeg image with russian font in R?

2012-11-22 Thread Manish Gupta
Hi, I m working on R and read one image with russian font using readjpeg() function and write it on pdf (using grid). But russian text is not visible on pdf. How can i fix my pblm? Regards http://r.789695.n4.nabble.com/file/n4650417/pointer.jpg library(JPEG) library(grid) pdf(out.pdf , width =

Re: [R] Extracting random rows from a dataset

2012-11-22 Thread Madhu Ganganapalli
I found this code through internet and I have a one doubt about this example, which is Here you take a 70% random sample considering all the values but what I want is if the selected sample contains p1,p2 then I want all records of p1,p2 and also remaining data in some other data frame...like

Re: [R] problems with RPostgreSQL compilation

2012-11-22 Thread Pascal Oettli
Hello, Do you have the shared libraries required by PostgreSQL installed on your machine (libpq)? Regards, Pascal Le 22/11/2012 18:45, lanc...@t-zones.sk a écrit : Hello, I am trying to install RPostgreSQL, but without success at the moment, getting an errormessage - see below. My OS is

Re: [R] histogram help

2012-11-22 Thread Jim Lemon
On 11/22/2012 05:15 AM, Rosario Scandurra wrote: 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. Hi Rosario,

Re: [R] Help with loop

2012-11-22 Thread Rui Barradas
Hello, I'm glad it helped. You should have kept this in the list, the odds of getting more answers are bigger. As for your problem with NAs, what do you want to do with them? Should they count as within range? Rui Barradas Em 22-11-2012 10:18, Helene Frigstad escreveu: Hi, yes, that is a

Re: [R] printing difftime summary

2012-11-22 Thread R. Michael Weylandt
On Thu, Nov 22, 2012 at 4:01 AM, Sam Steingold s...@gnu.org wrote: Hi, * arun fznegcvax...@lnubb.pbz [2012-11-21 14:04:36 -0800]: Are you looking for some other function (difftime2string) ot just remove the quotes from the printed output? I am wondering what others do when they want to see

[R] Trick to replace NA

2012-11-22 Thread Marc Girondot
Dear members, I have a series of values in a vector and some value are missing and replaced with NA. For example: a - c(27, 25, NA, NA, 24, 26, 27, NA, 26) I would like to replace the NAs with the value taken from the previous value that is non-NA. The output would be in this case: 27 25 25

Re: [R] Trick to replace NA

2012-11-22 Thread R. Michael Weylandt
Take a look at na.locf() in the zoo package. (LOCF = last observation carried forward) RMW On Thu, Nov 22, 2012 at 12:56 PM, Marc Girondot marc_...@yahoo.fr wrote: Dear members, I have a series of values in a vector and some value are missing and replaced with NA. For example: a - c(27,

Re: [R] Trick to replace NA

2012-11-22 Thread Jorge I Velez
Dear Marc, Try require(zoo) na.locf(a) HTH, Jorge.- On Thu, Nov 22, 2012 at 11:56 PM, Marc Girondot wrote: Dear members, I have a series of values in a vector and some value are missing and replaced with NA. For example: a - c(27, 25, NA, NA, 24, 26, 27, NA, 26) I would like to

Re: [R] Help with loop

2012-11-22 Thread Hefri
Hi again, I was thinking that the interval would stop when there was a NA, ignore subsequent NAs and only start a new interval when there was a new value. So in the example below, the interval would stop at row 320, and a new interval started at row 334. head (D, 20) Salt time 319

[R] lapack routines cannot be loaded [Help request]

2012-11-22 Thread Manca Marco (PATH)
Dear BioConductor and R fellow users I apologize in advance for double posting, but I am not sure which list would actually be best fit for this message. I am experiencing a weird error with my R installation on Ubuntu 10.04.4 (LTS) 64bit: When I run R on the terminal everything goes

[R] Data Extraction

2012-11-22 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hello, I would appreciate if someone could help me resolve the following: 1. df1[!is.na( X1 | X2 | X3 | X4 | X5),][,1:5] # This does not work 2. Is these message harmful? The following object(s) are masked from 'df1 (position 3)': X1, X2, X3, X4, X5 Thanks, Pradip Muhuri #Reproducible

Re: [R] rapache memory problem

2012-11-22 Thread Gergely Daróczi
Hello mrzung, it depends on several factors. First of all: do your clients use RApache for computations in separate sessions (possible which computations does not build on the previous ones) or do they need a stateful application? The first would be pretty easy to resolve, just clean the R

Re: [R] Data Extraction

2012-11-22 Thread Sarah Goslee
Hi, is.na( X1 | X2 | X3 | X4 | X5) isn't a valid construct. You'd need !(is.na(X1) | is.na(X2) etc ) Or more elegantly df1[apply(df1, 1, function(x)all(!is.na(x))), ] Sarah On Thursday, November 22, 2012, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: Hello, I would appreciate if someone could help

Re: [R] Data Extraction

2012-11-22 Thread PIKAL Petr
Hi do you want this? df1[complete.cases(df1),] X1 X2 X3 X4 X5 2 8 8 3 2 10 6 8 6 7 10 1 11 4 5 5 10 8 12 6 1 7 8 4 17 5 7 3 1 3 18 10 7 3 8 7 19 7 5 3 5 6 20 10 5 2 4 6 Regards Petr -Original Message- From: r-help-boun...@r-project.org

[R] ggplot2 and the legend

2012-11-22 Thread Peter Kupfer
Dear all, i try to plot with ggplot2. Therefor I have an matrix with 3 colums. With cbind I add an additional column called col. I need this column col because in a later step and want to specify here some plot details which I will get from another analysis If I want to plot with this code, I

Re: [R] error message in Linkcomm package

2012-11-22 Thread Jeff Newmiller
Your questions are all but unanswerable. Read the posting guide and http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example --- Jeff NewmillerThe . .

Re: [R] Data Extraction

2012-11-22 Thread Berend Hasselman
On 22-11-2012, at 15:11, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: Hello, I would appreciate if someone could help me resolve the following: 1. df1[!is.na( X1 | X2 | X3 | X4 | X5),][,1:5] # This does not work 2. Is these message harmful? The following object(s) are masked from 'df1

Re: [R] Data Extraction

2012-11-22 Thread Bert Gunter
Unnecessarily complicated. ?na.omit (linked from ?complete.cases) df - na.omit(df) -- Bert On Thu, Nov 22, 2012 at 6:49 AM, Berend Hasselman b...@xs4all.nl wrote: On 22-11-2012, at 15:11, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: Hello, I would appreciate if someone could help me resolve

Re: [R] Data Extraction

2012-11-22 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Petr, You have shown a solution that is the simplest. Thanks and regards, Pradip Muhuri Beginner useR From: PIKAL Petr [petr.pi...@precheza.cz] Sent: Thursday, November 22, 2012 9:33 AM To: Muhuri, Pradip (SAMHSA/CBHSQ); r-help@r-project.org Subject:

Re: [R] Data Extraction

2012-11-22 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hi Bert, Your solution is similar to Petr's. Thanks and regards, Pradip Muhuri BeginneR UseR From: Bert Gunter [gunter.ber...@gene.com] Sent: Thursday, November 22, 2012 10:20 AM To: Berend Hasselman Cc: Muhuri, Pradip (SAMHSA/CBHSQ);

Re: [R] Data Extraction

2012-11-22 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hi Berend, You have compared all 3 ways. ... very nicely evaluated. Thanks and regards, Pradip Muhuri Beginner UseR From: Berend Hasselman [b...@xs4all.nl] Sent: Thursday, November 22, 2012 9:49 AM To: Muhuri, Pradip (SAMHSA/CBHSQ) Cc:

Re: [R] selcting a random sample and saving it in a seprate dataframe and also remaining part in other data frame

2012-11-22 Thread arun
HI Madhu, I guess you got your solution from Rui:  dat1-data.frame(x=c(1,1,2,2,2,3,4,4,4),y=c(23,45,87,46,78,12,87,79,76)) s-sample(unique(dat1[,1]),length(unique(dat1[,1]))*0.8)  s #[1] 3 4 2 You can have a list containing both the dataframes list1-list(dat1[dat1$x%in%s,],dat1[!dat1$x%in%s,])

Re: [R] Data Extraction

2012-11-22 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hi Sarah, I am glad you have precisely caught where I made the mistake. Thank you so much. regards, Pradip Muhuri From: Sarah Goslee [sarah.gos...@gmail.com] Sent: Thursday, November 22, 2012 9:21 AM To: Muhuri, Pradip (SAMHSA/CBHSQ) Cc:

Re: [R] Data Extraction

2012-11-22 Thread Berend Hasselman
On 22-11-2012, at 16:50, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: Hi Berend, You have compared all 3 ways. ... very nicely evaluated. Bert's solution is indeed nice and simple. But Petr's solution is still the quickest: N - 10 set.seed(13) df -

Re: [R] ggplot2 and the legend

2012-11-22 Thread Jeff Newmiller
a) Don't crosspost. Read the posting guide(s) for more cautions. This question is probably more appropriate on the ggplot Google Group than either of these two mailing lists. b) Post reproducible examples. c) Use data frames with ggplot, not matrices. The read.csv or read.table functions

Re: [R] Data Extraction - benchmark()

2012-11-22 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hi Berend, I see you are one of the contributors to the rbecnhmark package. I am sorry that I am bothering you again. I have tried to run your code (slightly tweaked) involving the benchmark function, and I am getting the following error message. What am I doing wrong? Error in

[R] error in replor: Results suspect!

2012-11-22 Thread Anera Salucci
Hello all, I am trying to fit a gee model using repolr and  I get a warning message  that Results suspect. Warning message: Note: In ogee(formula, data = , id =.,  :  Cgee  had an error (code= 104).  Results suspect. I checked the  source code as Prof. Ripley advice in 2007  but the

Re: [R] Data Extraction

2012-11-22 Thread Bert Gunter
Berend et. al: 1, Except you did not use my solution. It is not what you have but instead: f4 - function(df)na.omit.df wrapping the return in data.frame() is both unnecessary and inefficient. 2. But my point is not to be the speediest nor even to show how clever I am -- using a built-in

Re: [R] Data Extraction - benchmark()

2012-11-22 Thread Berend Hasselman
On 22-11-2012, at 18:20, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: Hi Berend, I see you are one of the contributors to the rbecnhmark package. I am sorry that I am bothering you again. I have tried to run your code (slightly tweaked) involving the benchmark function, and I am getting the

Re: [R] printing difftime summary

2012-11-22 Thread Sam Steingold
* R. Michael Weylandt zvpunry.jrlyn...@tznvy.pbz [2012-11-22 12:11:55 +]: I now think that what I want is --8---cut here---start-8--- difftime.summary - function (v) { s - summary(as.numeric(v)) r -

Re: [R] How to read jpeg image with russian font in R?

2012-11-22 Thread David Winsemius
On Nov 21, 2012, at 11:21 PM, Manish Gupta wrote: Hi, I m working on R and read one image with russian font using readjpeg() function and write it on pdf (using grid). But russian text is not visible on pdf. How can i fix my pblm? You are working with two different plotting paradigms.

Re: [R] [BioC] lapack routines cannot be loaded [Help request]

2012-11-22 Thread Martin Morgan
On 11/22/2012 03:23 AM, Manca Marco (PATH) wrote: Dear BioConductor and R fellow users I apologize in advance for double posting, but I am not sure which list would actually be best fit for this message. It helps to narrow the problem down. It looks like the problem occurs when chol2inv is

[R] Using cumsum with 'group by' ?

2012-11-22 Thread TheRealJimShady
Hi, First post here. Grateful for any help you can give. I have data which looks like this: idtimex 1 12:015 1 12:02 14 1 12:03 6 1 12:04 3 2 12:01 98 2 12:02 23 2 12:03 1 2 12:04 4 3 12:01 5 3 12:02 65 3 12:03 23 3 12:04 23 But I want

Re: [R] Help with loop

2012-11-22 Thread arun
HI, If it is possible to remove those NA values:  dat$time - as.Date(dat$time,format=%Y-%m-%d) newdat-dat[complete.cases(dat),]  change-cumsum(c(FALSE,abs(diff(newdat$Salt))0.05))  #Rui's solution  split(newdat,change) A.K. - Original Message - From: Hefri helenefrigs...@hotmail.com

[R] How to control plotting formula above lm diagnostic plots?

2012-11-22 Thread ksaw
Dear All, I am trying to plot four diagnostic plots for my lm in one window. Here is some random data for an example: a = rnorm(20, mean=2, sd=0.2) b = rnorm(20, mean=1, sd=0.4) model=lm(a~b) When I set the page as: par(mfrow=c(1,1), oma=c(1,0,2,0)) and plot my model: plot(model)

[R] Partial dependence plot in randomForest package (all flat responses)

2012-11-22 Thread Oritteropus
Hi, I'm trying to make a partial plot with package randomForest in R. After I perform my random forest object I type partialPlot(data.rforest, pred.data=act2, x.var=centroid, C) where data.rforest is my randomforest object, act2 is the original dataset, centroid is one of the predictor and C is

[R] Mixed models and learning curves

2012-11-22 Thread Giovanna Ottaviani
My name is Giovanna and I am a PhD student in Norway. I am a beginner with statistics and R, hence my ignorance. Apologies from now. I have been collecting data on time performances of 5 subjects using a 1:3 scale tower yarder. The task was consisting in yarding 5 small logs placed on

Re: [R] cluster analysis in R

2012-11-22 Thread KitKat
These are the errors I've been having. I have been trying 3 different things 1- Mclust: This is the example I have been following: # Model Based Clustering library(mclust) fit - Mclust(mydata) plot(fit, mydata) # plot results print(fit) # display the best model What I have done: fit -

[R] ROC Curve: negative AUC

2012-11-22 Thread brunosm
Hi all, does anyone know why the area under the curve (AUC) is negative? I'm using ROC function with a logistic regression, package Epi. First time it happens... Thanks a lot! Bruno -- View this message in context: http://r.789695.n4.nabble.com/ROC-Curve-negative-AUC-tp4650469.html Sent

Re: [R] Using cumsum with 'group by' ?

2012-11-22 Thread William Dunlap
transform(d, cumsumXById = ave(x, id, FUN=cumsum)) id time x cumsumXById 1 1 12:01 5 5 2 1 12:02 14 19 3 1 12:03 6 25 4 1 12:04 3 28 5 2 12:01 98 98 6 2 12:02 23 121 7 2 12:03 1 122 8 2 12:04 4 126 9

Re: [R] Data Extraction - benchmark()

2012-11-22 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hi Berend, Thank you very much for pointing out the mistake and for your patience. I have corrected the the script, which has worked fine. regards, Pradip Muhuri From: Berend Hasselman [b...@xs4all.nl] Sent: Thursday, November 22, 2012 12:42 PM To:

Re: [R] Using cumsum with 'group by' ?

2012-11-22 Thread Berend Hasselman
On 22-11-2012, at 18:08, TheRealJimShady wrote: Hi, First post here. Grateful for any help you can give. I have data which looks like this: idtimex 1 12:015 1 12:02 14 1 12:03 6 1 12:04 3 2 12:01 98 2 12:02 23 2 12:03 1 2 12:04 4 3

Re: [R] ROC Curve: negative AUC

2012-11-22 Thread Wensui Liu
wrong direction for ranking On Thu, Nov 22, 2012 at 1:58 PM, brunosm brunos...@gmail.com wrote: the area under the curve (AUC) is negative? I'm using ROC function with a logistic regression, package Epi. First time it happens... Thanks a lot! Bruno -- ==

Re: [R] ROC Curve: negative AUC

2012-11-22 Thread Thomas Lumley
On Fri, Nov 23, 2012 at 7:58 AM, brunosm brunos...@gmail.com wrote: Hi all, does anyone know why the area under the curve (AUC) is negative? I'm using ROC function with a logistic regression, package Epi. First time it happens... Have you looked at the ROC curve? That should tell you

[R] Plotting specific points with type='l'

2012-11-22 Thread eric
I have a dataframe (x) and I'm plotting the 5th column vs the index. I also have a vector (v) with a few select points that I want to emphasize with a dot for those points head(x) period AP EU LA NA 1 Jan 2007 0.18 0.45 0.19 3.19 2 Feb 2007 0.14 0.48 0.36 3.55 3 Mar 2007 0.14 0.42

[R] Simulating a VEC

2012-11-22 Thread Laura Catalina Echeverri
Hello everyone, I have estimated a VEC using functions of package urca. Now I need to simulate several trajectories of the variables of the model based in the information of the model. To do that first I converted the VEC to a VAR using vec2var (from package vars) and then I converted de VAR to

Re: [R] ifelse + numeric

2012-11-22 Thread djbanana
Thanks, it worked without quotation marks. -- View this message in context: http://r.789695.n4.nabble.com/ifelse-numeric-tp4650390p4650482.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Plotting specific points with type='l'

2012-11-22 Thread jim holtman
try this # you need to provide sample data x - runif(10) v - c(2, 4, 7) plot(x, type = 'l') # highlight points points(v, x[v], pch = 19) On Thu, Nov 22, 2012 at 2:22 PM, eric ericst...@aol.com wrote: I have a dataframe (x) and I'm plotting the 5th column vs the index. I also have a

[R] SEM raw moment matrix

2012-11-22 Thread Maya Abou Zeid
Hello, I estimated a model using SEM package in R, which was fit to a raw moment matrix, and includes an intercept term. The only goodness of fit statistics that are output are Model Chisquare, AIC, AICc, BIC, CAIC, and normalized residuals. How can I get the other goodness of fit statistics,

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

2012-11-22 Thread Greg Snow
Why are you using jpeg to create files with a .png extension? wouldn't it make more sense to use the png function? There are a couple of options, you could plot using the matplot function (with different subsets in the loop). Or you can start an initial empty plot and use lines to add to it,

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread Pete Brecknock
frespider wrote Hi, is there a way I can calculate a summary statistics for a columns matrix let say we have this matrix x - matrix(sample(1:8000),nrow=100) colnames(x)- paste(Col,1:ncol(x),sep=) if I used summary summary(x) i get the output for each column but I need the output

[R] Data frame manipulation

2012-11-22 Thread Raoni Rodrigues
Hello, I have a table that was constructed in a wrong way (dput data on bottom - wrong data-frame): Local Mês Dia Colonia X6h X7h X8h X9hX10hX11h X12hX13hX14hX15hX16hX17h 1 Conceição Junho 1 3 2.16137 2.20412 2.08991 1.72428 1.69897

Re: [R] [lattice] Increase distance between tick labels and ticks in wireframe plot (pad)

2012-11-22 Thread Peter Ehlers
On 2012-11-22 01:16, Felix Schönbrodt wrote: Hello, I try to increase the distance between tick labels and ticks in a lattice wireframe plot. Here's a minimal example: ## Minimal example x - y - z - c(1,2,3) df - data.frame(x, y, z) wireframe(z ~ x*y, df, scales = list(arrows = FALSE, col =

[R] Adding a function with default parameters into the Rcmdr menu

2012-11-22 Thread vincent guyader
Hi everyone, I made some tests with Rcmdr, to add a function with default parameters : For example (very simple): myfunction-function(var=314){ print(hello) print(var) } if I run myfunction() directly i see : myfunction() [1] hello [1] 314 it's ok. But if i edit de Rcmdr-menu.txt (in

Re: [R] Data frame manipulation

2012-11-22 Thread jim holtman
The 'reshape2' package is your friend: require(reshape2) x - melt(wrong, id = c(Local, Mês, Dia, Colonia), variable.name = Hora) # remove X from Hora x$Hora - as.character(substring(x$Hora, 2)) head(x) # not in the right order Local Mês Dia Colonia Hora value 1 Conceição Junho

[R] Constant (= wrong) historical quotes via get.hist.quote() from yahoo.finance

2012-11-22 Thread Marius Hofert
Dear expeRts, I would like to download a time series of historical data from the ticker with symbol ROG.VX. Interestingly, I obtain constant values (138.3 for each day in the chosen period) although the yahoo.finance website tells me that the time series is not at all constant. What's wrong?

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
I also don't like to use split function because I have like around 800 columns Date: Thu, 22 Nov 2012 18:08:54 -0800 From: ml-node+s789695n4650496...@n4.nabble.com To: frespi...@hotmail.com Subject: RE: Summary statistics for matrix columns Hi, How about this:

[R] Summary statistics for matrix columns

2012-11-22 Thread frespider
Hi, is there a way I can calculate a summary statistics for a columns matrix let say we have this matrix x - matrix(sample(1:8000),nrow=100) colnames(x)- paste(Col,1:ncol(x),sep=) if I used summary summary(x) i get the output for each column but I need the output to be in matrix with

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
Hi peter, but this doesn't give me them in the order I want. Is there a better approach Thanks -- View this message in context: http://r.789695.n4.nabble.com/Summary-statistics-for-matrix-columns-tp4650489p4650492.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
There is still missing some statistics, like sd and IQR and I prefer the output to be matrix Thanks Date: Thu, 22 Nov 2012 18:00:20 -0800 From: ml-node+s789695n4650493...@n4.nabble.com To: frespi...@hotmail.com Subject: Re: Summary statistics for matrix columns HI, You could try

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
HI, but Sd and IQR not in the order I want , Thanks Date: Thu, 22 Nov 2012 18:08:57 -0800 From: ml-node+s789695n4650496...@n4.nabble.com To: frespi...@hotmail.com Subject: RE: Summary statistics for matrix columns Hi, How about this:

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
Hi, it is possible. but don't you think it will slow the code if you convert to data.frame? Thanks Date: Thu, 22 Nov 2012 18:31:35 -0800 From: ml-node+s789695n4650500...@n4.nabble.com To: frespi...@hotmail.com Subject: RE: Summary statistics for matrix columns HI, Is it possible

Re: [R] Plotting specific points with type='l'

2012-11-22 Thread arun
Hi, If you wanted to emphasize the select points from the 5th column: You could try: plot(x[,5], type='l')  points(dat2[c(2,4,7),5],pch=19) A.K. - Original Message - From: eric ericst...@aol.com To: r-help@r-project.org Cc: Sent: Thursday, November 22, 2012 2:22 PM Subject: [R]

[R] Factor function for coded numerical values

2012-11-22 Thread maths123
I have s data set where 2 of the columns give the coded versions of the factors A and B. Factor A is coded with 1, 2, 3. Factor B is coded with 1,2. How do use the factor function to convert these variables into factors, and also use the labels= command to give them a more informative name?

Re: [R] Using cumsum with 'group by' ?

2012-11-22 Thread arun
Hi, No problem. One more method if you wanted to try: library(data.table) dat2-data.table(dat1) dat2[,list(x,time,Cumsum=cumsum(x)),list(id)]  #   id  x  time Cumsum  #1:  1  5 12:01  5  #2:  1 14 12:02 19  #3:  1  6 12:03 25  #4:  1  3 12:04 28  #5:  2 98 12:01 98  #6:  2 23

[R] Optimizing nested function with nlminb()

2012-11-22 Thread Дмитрий Островский
I am trying to optimize custom likelyhood with nlminb() Arguments h and f are meant to be fixed. example.R: compute.hyper.log.likelyhood - function(a, h, f) { a1 - a[1] a2 - a[2] l - 0.0 for (j in 1:length(f)) { l - l + lbeta(a1 + f[j], a2 + h - f[j]) - lbeta(a1, a2) } return(l)

[R] help in M-estimator by R

2012-11-22 Thread Sarah_R_edu
hi guys and gals ... How are you all ... i have to do something in robust regression by R programm , and i have some problems as following: *the first :* suppose w(r) =1/(1 r^2) and r - c(7.01,2.07,7.061,5.607,8.502,54.909,12.222) and i want to exclude some values from r so that (abs(r)4.9

[R] (no subject)

2012-11-22 Thread Sarah AdDawsary
__ 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 provide commented, minimal, self-contained, reproducible code.

Re: [R] Data frame manipulation

2012-11-22 Thread arun
Hi, May be this helps: library(reshape) dat1 # data that needs to be converted res-melt(dat1,id=c(Local,Mês,Dia,Colonia))  names(res)[5:6]-c(Hora,N)  res1-res[order(res$Dia),]  row.names(res1)-1:nrow(res1) res1$Hora-gsub([X],,res1$Hora)  head(res1) #  Local   Mês Dia Colonia Hora   N #1

[R] What is the . in formula ~. syntax?

2012-11-22 Thread Brian Feeny
I know if I have a dataframe with columns y, x1, x2 and I wish to have y as my y value and x1 and x2 as x values I can do: y ~ x1 + x2 or y ~. but can someone explain what . actually is or what its transposed into? I searched for this with no success, reading the formula manual pages. Brian

[R] How to override gWidgets:gvarbrowser_classes

2012-11-22 Thread wampeh
How do I get gvarbrowser to display the contents of data.frame named, say atab1? That is modify the Filter by: entries to only show data.frame Also, how do I turn off the selection pull down box, given that I know the name of the data.frame variable? Basically, I will like to browse the

Re: [R] Odp: Object Browser

2012-11-22 Thread wampeh
How do I get gvarbrowser to display only data.frame named, say atab1 or atab2 or atab*? Also, how do I turn off the selection pull down box? #I tried: mydefaultclasses - list(Data sets1=c(data.frame) ) # # Then v - gvarbrowser( container =gwindow(Object broser),

[R] Barplot with lines

2012-11-22 Thread Ripples
Hi, I'm trying to plot stacked barplot with lines on it. Here is the data. emp days val1 val2 score 1 21 1 0 1200 2 35 1 1 na 3 42 na na 3000 4 53 2 1 2100 5 64 1 0 na 6 73 na na 1400 My X-axis is days. I'm looking to plot val1,val2 as stacked bars and score as lines with different y-axis. I