Re: [R] detect filetype (as in unix 'file')

2011-04-04 Thread Prof Brian Ripley
On Sun, 3 Apr 2011, Jeroen Ooms wrote: Is there a way in R (in Linux) to detect the type of a file without invoking a shell? E.g to do this: system(file density.plot) density.plot: PDF document, version 1.4 but without using system()? I tried file() and file.info(), but both do display the

[R] RmetricsTools.R

2011-04-04 Thread Luis Felipe Parra
Hello I read on the Rmetrics webpage that all the development packages could be intalled using the following command source(RmetricsTools.R) install.RmetricsDev([Rmetrics package to be installed] I would like to know where I could get this RmetricsTools.R . I suppose it might be somewhere

Re: [R] loading R object files on an RWeb server

2011-04-04 Thread Dieter Menne
jose romero-3 wrote: For one thing, i am using google docs to host the R object file and google docs has secure https URL's, which apparently cannot be handled by R's url(). So my questions are these: Try ?getURL in the RCurl package Dieter -- View this message in context:

[R] Support Counting

2011-04-04 Thread psombe
Hi, I'm new to R and trying to some simple analysis. I have a data set with about 88000 transactions and i want to perform a simple support count analysis of an itemset which is say not a complete transaction but a subset of a transaction. say {A,B,D} is a transaction and i want to find

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-04-04 Thread yrosseel
On 04/03/2011 09:38 PM, jouba wrote: Daer all, I have a question concerning longitudinal data: When we have a longitudinal data and we have to do sem analysis there is in the package lavaan some functions,options in this package that help to do this or we can treat these data like non

[R] multiple variables Y and X

2011-04-04 Thread Rosario Garcia Gil
Hello I have a model with several hundred Y variables, and also several 1000 X variables. The model is linear lm(Y ~ X). My questions are: 1.- how to avoid writing all Xs variables? is list() the right function? 2.- about the multiple Ys with dependence among some of them, how to incorporate

Re: [R] MySql Versus R

2011-04-04 Thread Henri Mone
Dear All, Thank you to all of you for your fast reply. I will run the test and subscribe to the R-sig-db list. Cheers, Henri __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] RmetricsTools.R

2011-04-04 Thread Martin Maechler
LFP == Luis Felipe Parra felipe.pa...@quantil.com.co on Mon, 4 Apr 2011 14:32:32 +0800 writes: LFP Hello I read on the Rmetrics webpage that all the LFP development packages could be intalled using the LFP following command LFP source(RmetricsTools.R) LFP

Re: [R] Error in color2D.matplot : Error in plot.new() : figure margins too large

2011-04-04 Thread Jim Lemon
On 04/03/2011 10:02 PM, shahab wrote: Hi, I am using color2D.matplot (...) function of plotrix package. I used a matrix of size around 20*20 However, apparently it failed to visualize the matrix and gave the following exception, which I don't have any idea about possible source of this error.

[R] svd

2011-04-04 Thread nuncio m
Dear list, I searched the libraries but could not find means to compute the svd of a coupled field. Is it possible in R Thanks nuncio -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 [[alternative HTML

Re: [R] power of 2 way ANOVA with interaction

2011-04-04 Thread peter dalgaard
On Apr 4, 2011, at 01:10 , Timothy Spier wrote: I've been searching for an answer to this for a while but no joy. I have a simple 2-way ANOVA with an interaction. I'd like to determine the power of this test for each factor (factor A, factor B, and the A*B interaction). How can I do

Re: [R] svd

2011-04-04 Thread nuncio m
Thanks juan, I got that, but what I have two matrices A and B, How can an svd be performed on the two together. Is it correct to get the covariance matrix and then perform the svd on the covariance matrix. If that is the case I have another doubt. I understand the covariance of A and B is

Re: [R] multiple variables Y and X

2011-04-04 Thread Carlos Ortega
Hello, You can do that like in the example included in the function step() lm1 - lm(Fertility ~ ., data = swiss) But my advise is that prior to doing that, you should check this old thread in this list: http://tolstoy.newcastle.edu.au/R/e4/help/08/02/2842.html Regards, Carlos Ortega

Re: [R] Support Counting

2011-04-04 Thread Petr Savicky
On Mon, Apr 04, 2011 at 01:11:37AM -0500, psombe wrote: Hi, I'm new to R and trying to some simple analysis. I have a data set with about 88000 transactions and i want to perform a simple support count analysis of an itemset which is say not a complete transaction but a subset of a

Re: [R] another question on shapefiles and geom_point in ggplot2

2011-04-04 Thread ahmadou dicko
Hi all Just as Pierre pointed out, i used rgeos instead of gpclib (the licence is less restrictive even though i'm still students). A since the last release the rgeos package seems to work well. I'm really disapointed by the fact that some packages (e.g adehabitatMA which is great thank's M.

[R] Deriving formula with deriv

2011-04-04 Thread kitty
Dear list, Hi, I am trying to get the second derivative of a logistic formula, in R summary the model is given as : ### $nls Nonlinear regression model model: data ~ logistic(time, A, mu, lambda, addpar) data: parent.frame() A mu lambda 0.53243 0.03741 6.94296 ### but I know

[R] add zero in front of numbers

2011-04-04 Thread Yan Jiao
Dear R users, I need to add 0 in front of a series of numbers, e.g. 1-001, 19-019, Is there a fast way of doing that? Many thanks yan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] add zero in front of numbers

2011-04-04 Thread Luis Ridao
Have a look at ?formatC On Mon, Apr 4, 2011 at 11:35 AM, Yan Jiao y.j...@ucl.ac.uk wrote: Dear R users, I need to add 0 in front of a series of numbers, e.g. 1-001, 19-019, Is there a fast way of doing that? Many thanks yan [[alternative HTML version deleted]]

Re: [R] principal components

2011-04-04 Thread Gavin Simpson
On Fri, 2011-04-01 at 11:52 +0530, nuncio m wrote: HI all, I am trying to compute the EOF of a matrix using prcomp but unable to get the expansion co-efficients. is it possible using prcomp or are there any other methods thanks nuncio *sigh* RSiteSearch(EOF) It is at times like this

[R] Clarks 2Dt function in R

2011-04-04 Thread bialozyt
Dear Ben, you answerd to Nancy Shackelford about Clarks 2Dt function. Since the thread ended just after your reply, I would like to ask, if you have an idea how to use this function in R I defined it the following way: function(x , p, u) { (p/(pi*u))*(1+(x^2/u))^(p+1) } and would like to fit

[R] Please help

2011-04-04 Thread Sadaf Zaidi
Dear Sir/Madam, I am stuck with a nagging problem in using R for SVM regression. My data has 5 dimensions and 400 observations. The independent variables are : Peb, Ksub, Sub, and Xtt. The dependent variable is: Rexp. I tried using the svm.tune function to tune the hyper parameters: gamma,

[R] Problem using svm.tune

2011-04-04 Thread sadaf zaidi
Dear Sir, I am stuck with a nagging problem in using R for SVM regression. My data has 5 dimensions and 400 observations. The independent variables are : Peb, Ksub, Sub, and Xtt. The dependent variable is: Rexp. I tried using the svm.tune function as well as _tune(svm.), to tune the hyper

[R] ticklabs in scatterplot3d

2011-04-04 Thread suparna mitra
Hello, I am having a problem to control ticklabs in scatterplot3d. When I am using it for small data then it is working fine. But with my big data all the labels are misplaced (one upon another). For example see the code below (I have just modified the scatterplot3d example to show my problem ).

Re: [R] add zero in front of numbers

2011-04-04 Thread January Weiner
Dear Yan, apart from formatC, you can also use sprintf, which works almost exactly like the C sprintf function. To convert an integer x to a string with 5 leading 0s, you do: sprintf( %05d, x ) Best regards, j. On Mon, Apr 4, 2011 at 12:35 PM, Yan Jiao y.j...@ucl.ac.uk wrote: Dear R users,

[R] lattice: how to center a subtitle?

2011-04-04 Thread Marius Hofert
Dear expeRts, I recently asked for a real centered title (see, e.g., http://tolstoy.newcastle.edu.au/R/e13/help/11/01/0135.html). A nice solution (from Deepayan Sarkar) is to use xlab.top instead of main: library(lattice) trellis.device(pdf) print(xyplot(0 ~ 0, xlab.top = This title is now

[R] system() command in R

2011-04-04 Thread rasanpreet kaur suri
Hi all, I have a local server insalled on my system and have to start that from within my R function. here is how I start it: cmd-sh start-server.sh system(cmd, wait=FALSE) My function has to start the server and proceed with further steps. The server starts but the further steps of the

Re: [R] another question on shapefiles and geom_point in ggplot2

2011-04-04 Thread Manuel Spínola
Thank you Ahmadou, I got an error when I change fill to colour: p + geom_point(aes(size = ACE, colour = ACE)) + theme_bw() + + scale_size(to = c(3, 15), name = Número de especies, breaks = c(10, 40, 70, 100, 130, 160, 190, 220, 250)) + + scale_colour_gradientn(name = 'Número de especies',

[R] moving mean and moving variance functions

2011-04-04 Thread Steve Friedman
Hello Lets say as an example I have a dataframe with the following attributes: rownum(1:405), colnum(1:287), year(2000:2009), daily(rownum x colnum x year) and foragePotential (0:1, by 0.01). The data is actually stored in a netcdf file and I'm trying to provide a conceptual version of the

[R] Examples of web-based Sweave use?

2011-04-04 Thread carslaw
I appreciate that this is OT, but I'd be grateful for pointers to examples of where Sweave has been used for web-based applications. In particular, examples of where reports/analyses are produced automatically through submission of data to a web-sever. I am mostly interested in situations

Re: [R] hc2Newick is different than th hclust dendrogram

2011-04-04 Thread Jose Hleap Lozano
Hi R helpers... I am having troubles because of the discrepancy between the dendrogram plotted from hclust and what is wrote in the hc2Newick file. I've got a matrix C: hc - hclust(dist(C)) plot(hc) with the: write(hc2Newick(hc),file='test.newick') both things draw completely different

Re: [R] I think I just broke R

2011-04-04 Thread Thomas Rusch
and time to upgrade R I'm still fighting to find out how to upgrade stuff on Ubuntu. After a repository update the newest available version was still 2.10.1. I'll figure it out, sooner or later :) That's simple. Just add $deb http://my.favorite.cran.mirror/bin/linux/ubuntu

Re: [R] moving mean and moving variance functions

2011-04-04 Thread Gabor Grothendieck
On Mon, Apr 4, 2011 at 8:30 AM, Steve Friedman skfgla...@gmail.com wrote: Hello Lets say as an example I have a dataframe with the following attributes: rownum(1:405), colnum(1:287), year(2000:2009), daily(rownum x colnum x year) and foragePotential (0:1, by 0.01).  The data is actually

Re: [R] RGtk2: How to populate an GtkListStore data model?

2011-04-04 Thread Michael Lawrence
On Sun, Apr 3, 2011 at 8:29 PM, Cleber N. Borges kle...@yahoo.com.brwrote: hello all I am trying to learn how to use the RGtk2 package... so, my first problem is: I don't get the right way for populate my gtkListStore object! any help is welcome... because I am trying several day to mount

Re: [R] Examples of web-based Sweave use?

2011-04-04 Thread Tal Galili
I've written about a bunch of Web R interfaces here: * http://www.r-statistics.com/2010/04/jeroen-oomss-ggplot2-web-interface-a-new-version-released-v0-2/ * http://www.r-statistics.com/2010/04/r-node-a-web-front-end-to-r-with-protovis/ (And some other posts here:

[R] How to speed up grouping time series, help please

2011-04-04 Thread Den Alpin
I retrieve for a few hundred times a group of time series (10-15 ts with 1 values each), on every group I do some calculation, graphs etc. I wonder if there is a faster method than what presented below to get an appropriate timeseries object. Making a query with RODBC for every group I get a

[R] reading from text file that have different rowlength and create a data frame

2011-04-04 Thread Ram H. Sharma
Hi R-experts I have many text files to read and combined them into one into R that are output from other programs. My textfile have unbalanced number of rows for example: ;this is example ; r help Var1 Var2 Var3 Var4 Var5 0 0.05 0.0112 1

[R] gap.barplot doesn't support data arrays?

2011-04-04 Thread Andrew D. Steen
I am trying to make a barplot with a broken axis using gap.barplot (in the indispensable plotrix package). This works well when the data is a vector: twogrp-c(rnorm(10)+4,rnorm(10)+20) gap.barplot(twogrp,gap=c(8,16),xlab=Index,ytics=c(3,6,17,20),ylab=Group values,main=Barplot with gap) But

Re: [R] reading from text file that have different rowlength and create a data frame

2011-04-04 Thread jim holtman
?read.table Then look at the 'fill' 'flush' parameters; this may do the trick On Mon, Apr 4, 2011 at 9:32 AM, Ram H. Sharma sharma.ra...@gmail.com wrote: Hi R-experts I have many text files to read and combined them into one into R that are output from other programs. My textfile have

Re: [R] Difference in mixture normals and one density

2011-04-04 Thread Jim Silverton
Hello, I am trying to find out if R can do the following: I have a mixture of normals say f = 0.2*Normal(2, 5) + 0.8*Normal(3,2) How do I find the difference in the densities at any particular point of f and at Normal(2,5)? -- Thanks, Jim. [[alternative HTML version deleted]]

Re: [R] reading from text file that have different rowlength and create a data frame

2011-04-04 Thread jim holtman
try this: x - read.table(textConnection(;this is example + ; r help + Var1 Var2 Var3 Var4 Var5 + 0 0.05 0.0112 + 1 0.04 0.0618A + 2 0.05 0.0814 + 3 0.01 0.0615 B + 4

Re: [R] How to speed up grouping time series, help please

2011-04-04 Thread Joshua Ulrich
Hi Dan, On Mon, Apr 4, 2011 at 7:49 AM, Den Alpin den.al...@gmail.com wrote: I retrieve for a few hundred times a group of time series (10-15 ts with 1 values each), on every group I do some calculation, graphs etc. I wonder if there is a faster method than what presented below to get an

Re: [R] How to speed up grouping time series, help please

2011-04-04 Thread Gabor Grothendieck
On Mon, Apr 4, 2011 at 8:49 AM, Den Alpin den.al...@gmail.com wrote: I retrieve for a few hundred times a group of time series (10-15 ts with 1 values each), on every group I do some calculation, graphs etc. I wonder if there is a faster method than what presented below to get an

Re: [R] Difference in mixture normals and one density

2011-04-04 Thread Liaw, Andy
Is something like this what you're looking for? R library(nor1mix) R nmix2 - norMix(c(2, 3), sig2=c(25, 4), w=c(.2, .8)) R dnorMix(1, nmix2) - dnorm(1, 2, 5) [1] 0.03422146 Andy -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of

Re: [R] Please help

2011-04-04 Thread Steve Lianoglou
Hi, On Mon, Apr 4, 2011 at 5:15 AM, Sadaf Zaidi s.zaidi...@amu.ac.in wrote: Dear Sir/Madam, I am stuck with a nagging problem in using R for SVM regression. My data has 5 dimensions and 400 observations. The independent variables are : Peb, Ksub, Sub, and Xtt. The dependent variable is:

Re: [R] gap.barplot doesn't support data arrays?

2011-04-04 Thread Peter Ehlers
On 2011-04-04 06:39, Andrew D. Steen wrote: I am trying to make a barplot with a broken axis using gap.barplot (in the indispensable plotrix package). This works well when the data is a vector: twogrp-c(rnorm(10)+4,rnorm(10)+20)

[R] Creating multiple vector/list names-novice

2011-04-04 Thread michalseneca
Hi I have very simple issue as I am still new to the group of R I have basically vector of names for which i want to create mutliple combinations and then place them in different vectors. In some other language I can just place a third dimension to separate list (or matrix) but i do not know

Re: [R] Clarks 2Dt function in R

2011-04-04 Thread Ben Bolker
bialozyt at biologie.uni-marburg.de writes: Dear Ben, you answerd to Nancy Shackelford about Clarks 2Dt function. Since the thread ended just after your reply, I would like to ask, if you have an idea how to use this function in R Dear Ronald, I got started on your problem, but I

Re: [R] Creating multiple vector/list names-novice

2011-04-04 Thread Henrique Dallazuanna
Try this: lapply(2:3, FUN = combn, x = string, paste, collapse = '') On Mon, Apr 4, 2011 at 11:24 AM, michalseneca michalsen...@gmail.com wrote: Hi I have very simple issue as I am still new to the group of R I have basically vector of names for which i want to create mutliple combinations

Re: [R] lattice: how to center a subtitle?

2011-04-04 Thread David Winsemius
On Apr 4, 2011, at 7:39 AM, Marius Hofert wrote: Dear expeRts, I recently asked for a real centered title (see, e.g., http://tolstoy.newcastle.edu.au/R/e13/help/11/01/0135.html) . A nice solution (from Deepayan Sarkar) is to use xlab.top instead of main: library(lattice)

[R] simulating a VARXls model using dse

2011-04-04 Thread Alison Callahan
Hello, Using the dse package I have estimated a VAR model using estVARXls(). I can perform forecasts using forecast() with no problems, but when I try to use simulate() with the same model, I get the following error: Error in diag(Cov, p) : 'nrow' or 'ncol' cannot be specified when 'x' is a

Re: [R] simulating a VARXls model using dse

2011-04-04 Thread Alison Callahan
Hi Paul, I am using R v. 2.12.2, and the dse package with build 2.12.2. I have attached some sample data to this email, and the R code I use to create the model and then forecast with it. Thanks, Alison On Mon, Apr 4, 2011 at 11:02 AM, Paul Gilbert pgilb...@bank-banque-canada.ca wrote: Could

Re: [R] How to speed up grouping time series, help please

2011-04-04 Thread Den Alpin
I did some tests on Your and Gabor solutions, below my findings: - Your solution is fast as my solution in xts (below) but MUCH MORE READABLE, in particular I think your test should take into account xts creation from the data.frame (see below); - Gabor's solution with read.zoo is fast as xts but

Re: [R] Deriving formula with deriv

2011-04-04 Thread David Winsemius
On Apr 4, 2011, at 6:35 AM, kitty wrote: Dear list, Hi, I am trying to get the second derivative of a logistic formula, in R summary the model is given as : ### $nls Nonlinear regression model model: data ~ logistic(time, A, mu, lambda, addpar) data: parent.frame() A mu lambda

Re: [R] D'Agostino test

2011-04-04 Thread Dieter Menne
Juraj17 wrote: Do I have to write my own, or it exists yet? How name has it, or how can I use it. Try the R-function search. It return the function you are looking for as the first match. Dieter -- View this message in context:

Re: [R] How to speed up grouping time series, help please

2011-04-04 Thread Gabor Grothendieck
On Mon, Apr 4, 2011 at 11:20 AM, Den Alpin den.al...@gmail.com wrote: I did some tests on Your and Gabor solutions, below my findings: - Your solution is fast as my solution in xts (below) but MUCH MORE READABLE, in particular I think your test should take into account xts creation from the

Re: [R] replace last 3 characters of string

2011-04-04 Thread Dieter Menne
Bert Jacobs-2 wrote: I would like to replace the last tree characters of the values of a certain column in a dataframe. Besides the mentioned standard method: I found the subset of string operations in Hadley Wickhams stringr package helpful. They have a much more consistent interface

Re: [R] gap.barplot doesn't support data arrays?

2011-04-04 Thread Andrew D. Steen
True - gapped stacked bar plots make no sense at all. I'm working my way up to a gapped bar plot with series next to each other (and error bars!), what you'd get if you put a gap in the y-axis of twogrp2-array(twogrp, dim=c(2,5)) barplot(twogrp2, beside=TRUE) I'm guessing I can do this if I

Re: [R] help

2011-04-04 Thread Vijayan Padmanabhan
Hi R Group Thanks for some suggestions. I have finally figured it out.. The following script called from within R Session does what i want..(to attach files called test1.pdf and Document-1.pdf into the file test2.pdf and then save the new file with attachments as test3.pdf at the given path)

[R] merging data list in to single data frame

2011-04-04 Thread Umesh Rosyara
Dear R community members I did find a good way to merge my 200 text data files in to a single data file with one column added will show indicator for that file. filelist = list.files(pattern = K*cd.txt) # the file names are K1cd.txt .to K200cd.txt data_list

[R] Adjusting p values of a matrix

2011-04-04 Thread January Weiner
Dear all, I have an n x n matrix of p-values. The matrix is symmetrical, as it describes the each against each p values of correlation coefficients. How can I best correct the p values of the matrix? Notably, the total number of the tests performed is n(n-1)/2, since I do not test the

Re: [R] Creating multiple vector/list names-novice

2011-04-04 Thread michalseneca
Hi Thanks ,however I would need something different still... I would need to return a vector so if as to choose cc[[3]] [2] would return vector/list as in terms of c(b,d,e) Thanks -- View this message in context:

[R] Multithreading of Geneland

2011-04-04 Thread Aurélien Chateigner
Hi all, I would like to multithread that script, to detect structure from multilocus genetic data : library(Geneland) geno = read.table(cot966gen_test.txt) #the file is show after MCMC(geno.dip.codom = geno, varnpop=T, npopmax=20, spatial = F, nit=10, thinnin=100, path.mcmc=./)

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread Bert Gunter
1. This is not an R question, AFAICS. 2. Sounds like a research topic. I don't think there's a meaningful simple answer. I suspect it strongly depends on the model and context. -- Bert On Mon, Apr 4, 2011 at 8:02 AM, January Weiner january.wei...@mpiib-berlin.mpg.de wrote: Dear all, I have

Re: [R] power of 2 way ANOVA with interaction

2011-04-04 Thread Greg Snow
You can use simulation: 1. decide what you think your data will look like 2. decide how you plan to analyze your data 3. write a function that simulates a dataset (common arguments include sample size(s) and effect sizes) then analyzes the data in your planned manner and returns the p-value(s)

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread peter dalgaard
On Apr 4, 2011, at 17:02 , January Weiner wrote: Dear all, I have an n x n matrix of p-values. The matrix is symmetrical, as it describes the each against each p values of correlation coefficients. How can I best correct the p values of the matrix? Notably, the total number of the

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread Spencer Graves
There are also the multcomp and multcompView packages that might provide something of interest in this regard. multcomp has a companion book, Multiple Comparisons Using R (Bretz, Hothorn, Westfall, 2010, CRC Press), which I believe provides an excellent overview of the state of the art

Re: [R] add zero in front of numbers

2011-04-04 Thread Uwe Ligges
On 04.04.2011 12:35, Yan Jiao wrote: Dear R users, I need to add 0 in front of a series of numbers, e.g. 1-001, 19-019, Is there a fast way of doing that? formatC(c(1, 19), flag=0, width=3) Uwe Ligges Many thanks yan [[alternative HTML version deleted]]

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread Benno Pütz
How about as.matrix(p.adjust(as.dist(pmat))) Benno On 4.Apr.2011, at 17:02, January Weiner wrote: Dear all, I have an n x n matrix of p-values. The matrix is symmetrical, as it describes the each against each p values of correlation coefficients. How can I best correct the p

Re: [R] merging data list in to single data frame

2011-04-04 Thread Uwe Ligges
On 04.04.2011 16:41, Umesh Rosyara wrote: Dear R community members I did find a good way to merge my 200 text data files in to a single data file with one column added will show indicator for that file. filelist = list.files(pattern = K*cd.txt) I doubt you meant K*cd.txt but

Re: [R] 'RQuantLib for 2.12 version

2011-04-04 Thread Joshua Ulrich
Hi Mauricio, A Windows binary is now available on CRAN: http://dirk.eddelbuettel.com/blog/2011/04/04/#rquantlib_0.3.7 Best, -- Joshua Ulrich  |  FOSS Trading: www.fosstrading.com On Tue, Mar 29, 2011 at 10:38 AM, Mauricio Romero mauricio.rom...@quantil.com.co wrote: Dear R users, I have

Re: [R] lattice: how to center a subtitle?

2011-04-04 Thread Marius Hofert
Dear David, I intended to use another x-label. But your suggestion brings me to the idea of just using a two-line xlab, so s.th. like print(xyplot(0 ~ 0, xlab.top = This title is now 'centered' for the human's eye, xlab = but subtitles are _now_ centered\nbla, scales = list(alternating =

Re: [R] converting affybatch object to matrix

2011-04-04 Thread Juliet Hannah
Use exprs on the output from RMA (or another method you like) library(affy) myData -ReadAffy() myRMA - rma(myData) e = exprs(myRMA) Also, check out the Bioconductor mailing list where Bioconductor-related topics are discussed. On Fri, Apr 1, 2011 at 9:54 AM, Landes, Ezekiel

[R] r-squared for object timeseries

2011-04-04 Thread user84
Hi, i am new in this forum. I hope someone can help me or correct me, if this is the false subforum to write this. I have to choose the best arima model from different possibilities of a timeseries. I know the AIC; BIC and similar. But now i would like to check the value called r-squared or

Re: [R] Adjusting p values of a matrix

2011-04-04 Thread Spencer Graves
There are, however, the multcomp and multcompView packages that might provide something of interest in this regard. multcomp has a companion book, Multiple Comparisons Using R (Bretz, Hothorn, Westfall, 2010, CRC Press), which I believe provides an excellent overview of the state of

[R] Questions remaining: define any character as na.string RE: merging data list in to single data frame

2011-04-04 Thread Umesh Rosyara
Dear Uwe and R community members Thank you Uwe for the help. I have still a question remaining, I am trying to find answer from long time. While exporting my data, I have some characters mixed into it. I want to define any characters as na.string? Is it possible to do so? Thanks; Umesh

Re: [R] lattice: how to center a subtitle?

2011-04-04 Thread David Winsemius
On Apr 4, 2011, at 12:45 PM, Marius Hofert wrote: Dear David, I intended to use another x-label. But your suggestion brings me to the idea of just using a two-line xlab, so s.th. like print(xyplot(0 ~ 0, xlab.top = This title is now 'centered' for the human's eye, xlab = but subtitles are

[R] merging 2 frames while keeping all the entries from the reference frame

2011-04-04 Thread Dimitri Liakhovitski
Hello! I have my data frame mydata (below) and data frame reference - that contains all the dates I would like to be present in the final data frame. I am trying to merge them so that the the result data frame contains all 8 dates in both subgroups (i.e., Group1 should have 8 rows and Group2 too).

Re: [R] Questions remaining: define any character as na.string RE: merging data list in to single data frame

2011-04-04 Thread David Winsemius
On Apr 4, 2011, at 12:37 PM, Umesh Rosyara wrote: Dear Uwe and R community members Thank you Uwe for the help. I have still a question remaining, I am trying to find answer from long time. While exporting my data, I have some characters mixed into it. I want to define any characters

Re: [R] merging 2 frames while keeping all the entries from the reference frame

2011-04-04 Thread Dimitri Liakhovitski
To clarify just in case, here is the result I am trying to get: mydate group values 12/29/2008 Group1 0.453466522 1/5/2009Group1 NA 1/12/2009 Group1 0.416548943 1/19/2009 Group1 2.066275155 1/26/2009 Group1 2.037729638 2/2/2009Group1 -0.598040483

Re: [R] lattice: how to center a subtitle?

2011-04-04 Thread Marius Hofert
Dear David, do you know how to get plotmath-like symbols in both rows? I tried s.th. like: lab - expression(paste(alpha==1, , , beta==2, sep=)) xlab - substitute(expression( atop(lab==lab., bold(foo)) ), list(lab.=lab)) xyplot(0 ~ 0, xlab = xlab) Cheers, Marius On 2011-04-04, at 18:59 , David

Re: [R] lattice: how to center a subtitle?

2011-04-04 Thread David Winsemius
On Apr 4, 2011, at 1:27 PM, Marius Hofert wrote: Dear David, do you know how to get plotmath-like symbols in both rows? I tried s.th. like: lab - expression(paste(alpha==1, , , beta==2, sep=)) xlab - substitute(expression( atop(lab==lab., bold(foo)) ), list(lab.=lab)) xyplot(0 ~ 0, xlab =

Re: [R] lattice: how to center a subtitle?

2011-04-04 Thread Peter Ehlers
On 2011-04-04 10:27, Marius Hofert wrote: Dear David, do you know how to get plotmath-like symbols in both rows? I tried s.th. like: lab- expression(paste(alpha==1, , , beta==2, sep=)) xlab- substitute(expression( atop(lab==lab., bold(foo)) ), list(lab.=lab)) xyplot(0 ~ 0, xlab = xlab)

Re: [R] lattice: how to center a subtitle?

2011-04-04 Thread Henrique Dallazuanna
Maybe: xyplot(0 ~ 0, xlab = bquote(expression(atop(alpha==.(x)*,~beta==.(y), bold(foo) )) )) On Mon, Apr 4, 2011 at 2:58 PM, David Winsemius dwinsem...@comcast.net wrote: On Apr 4, 2011, at 1:27 PM, Marius Hofert wrote: Dear David, do you know how to get plotmath-like symbols in both rows?

[R] Granger Causality in a VAR Model

2011-04-04 Thread ivan
Dear Community, I am new to R and have a question concerning the causality () test in the vars package. I need to test whether, say, the variable y Granger causes the variable x, given z as a control variable. I estimated the VAR model as follows: model-VAR(cbind(x,y,z),p=2) Then I did the

Re: [R] lattice: how to center a subtitle?

2011-04-04 Thread Marius Hofert
Dear all, many thanks, that helped a lot! Cheers, Marius On 2011-04-04, at 19:58 , David Winsemius wrote: On Apr 4, 2011, at 1:27 PM, Marius Hofert wrote: Dear David, do you know how to get plotmath-like symbols in both rows? I tried s.th. like: lab - expression(paste(alpha==1, ,

[R] automating regression or correlations for many variables

2011-04-04 Thread geral
Dear All, I have a large data frame with 10 rows and 82 columns. I want to apply the same function to all of the columns with a single command. e.g. zl - lm (snp$a_109909 ~ snp$lat) will fit a linear model to the values in lat and a_109909. What I want to do is fit linear models for the values

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-04-04 Thread jouba
Thanks you for your response For lavaan package can i have more information about this example you have applied in the section 7 the meanings of The variables (c1,c2,c3,c4, i ,s ,x1,x2) I think i have need more information to learn more about how able to apply growth model in my data

Re: [R] merging 2 frames while keeping all the entries from the reference frame

2011-04-04 Thread Gabor Grothendieck
On Mon, Apr 4, 2011 at 1:09 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! I have my data frame mydata (below) and data frame reference - that contains all the dates I would like to be present in the final data frame. I am trying to merge them so that the the result

Re: [R] merging 2 frames while keeping all the entries from the reference frame

2011-04-04 Thread Henrique Dallazuanna
Try this: merge(mydata, cbind(reference, group = rep(unique(mydata$group), each = nrow(reference))), all = TRUE) On Mon, Apr 4, 2011 at 2:24 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: To clarify just in case, here is the result I am trying to get: mydate  group   values

Re: [R] merging data list in to single data frame

2011-04-04 Thread Dennis Murphy
Hi: Here's an alternative using ldply() from the plyr package. The idea is to read the data frames into a list, name them accordingly and then call ldply(). # Read in the test data frames (you want to use list.files() instead to input the data per Uwe's guidelines) df1 -

Re: [R] automating regression or correlations for many variables

2011-04-04 Thread Dennis Murphy
Hi: Here's a small example: df - data.frame(y1 = rnorm(10), y2 = rnorm(10), y3 = rnorm(10), lat = rnorm(10)) m - lm(cbind(y1, y2, y3) ~ lat, data = df) summary(m) snip...provides summaries for each response The LHS of the model formula needs to be a matrix. In your case, something like m -

Re: [R] zoo:rollapply by multiple grouping factors

2011-04-04 Thread Gabor Grothendieck
On Mon, Apr 4, 2011 at 3:40 PM, Mark Novak mnov...@ucsc.edu wrote: Thank you very much Gabor!  It looks like that's gonna work wonderfully.  I didn't even know 'ave' existed. For others out there:  I only needed to add a comma:   dat[,c(Site, Plot, Sp)] Actually, if dd is a data frame dd[,

Re: [R] Linear Model with curve fitting parameter?

2011-04-04 Thread Steven McKinney
-Original Message- From: stephen sefick [mailto:ssef...@gmail.com] Sent: April-03-11 5:35 PM To: Steven McKinney Cc: R help Subject: Re: [R] Linear Model with curve fitting parameter? Steven: You are exactly right sorry I was confused.

Re: [R] zoo:rollapply by multiple grouping factors

2011-04-04 Thread Mark Novak
Thank you very much Gabor! It looks like that's gonna work wonderfully. I didn't even know 'ave' existed. For others out there: I only needed to add a comma: dat[,c(Site, Plot, Sp)] Small follow up Q: Is there any reason to use 'aggregate' vs. 'ave' in general? -mark On 4/3/11

[R] General binary search?

2011-04-04 Thread Stavros Macrakis
Is there a generic binary search routine in a standard library which a) works for character vectors b) runs in O(log(N)) time? I'm aware of findInterval(x,vec), but it is restricted to numeric vectors. I'm also aware of various hashing solutions (e.g. new.env(hash=TRUE) and fastmatch),

Re: [R] merging data list in to single data frame

2011-04-04 Thread Umesh Rosyara
Thank you Dennis for the solution. It is a step ahead..However I need to read all 200 files as dataframes one-by-one. Can we automate this process. I used the following step to read all file at once however the data_list ended as list. filelist = list.files(pattern = K*cd.txt) # the file

Re: [R] automating regression or correlations for many variables

2011-04-04 Thread geral
Thanks! I must confess I am just a beginner, but I followed your suggestion and did 'm - lm(as.matrix(snp[, -1]) ~ lat, data = snp) ' and it worked perfectly. I would like to understand what is being done here. as.matrix I understand makes my data frame be a matrix, but I don't understand the

Re: [R] General binary search?

2011-04-04 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stavros Macrakis Sent: Monday, April 04, 2011 1:15 PM To: r-help Subject: [R] General binary search? Is there a generic binary search routine in a standard library which

Re: [R] moving mean and moving variance functions

2011-04-04 Thread skfgla...@gmail.com
Thanks, I had recently seen reference to caTools but had forgotten about it. Much appreciated. friedman.st...@gmail.com 517-648-6290 -Original message- From: Gabor Grothendieck ggrothendi...@gmail.com To: Steve Friedman skfgla...@gmail.com Cc: r-help@r-project.org Sent: Mon, Apr 4,

[R] how to handle no lines in input with pipe()

2011-04-04 Thread Andrew Yee
This has to do with using pipe() and grep and read.csv() I have a .csv file that I grep using pipe() and read.csv() as follows: read.csv(pipe('grep foo bar.csv')) However, is there a way to have this command run when for example, there is no foo text in the bar.csv file? I get an error message

  1   2   >