[R] setting the margin size in ggplot2

2012-12-22 Thread Frans Marcelissen
Is it possible to set the margin in ggplot to a fixed size? I create many plots, and I want them to look the same. Especially I want them to have the same left margin, with different labels. But P-ggplot()+geom_bar(aes(c(short label1,short label2),runif(2)))+coord_flip() creates a plot with

[R] GLM ERROR

2012-12-22 Thread farnoosh sheikhi
 Hello, I'm fitting a logistic regression as follows and I have this error In predict.lm(object, newdata, se.fit, scale = 1, type = ifelse(type ==  :   prediction from a rank-deficient fit may be misleading Codes: ##Training  fit- glm(Y.Binary.training~., family=binomial(link=logit),

Re: [R] problem with opening more than one SOCK cluster with package snow

2012-12-22 Thread Prof Brian Ripley
On 19/12/2012 18:57, Jannis wrote: Dear list, i have some problems using the snow package to create a SOCK cluster. The errors just occour irregularly but it seems to me that they occour when I try to create more than one cluster on the same machine via different R instances started via

Re: [R] Parallel code using parLapply

2012-12-22 Thread Chris Hergarten
Many thanks - this did the trick! (Well, besides deleting an erroneous comma in the third to last line;)). Best, C. From: Gabor Grothendieck ggrothendi...@gmail.com Cc: R-help@r-project.org R-help@r-project.org Sent: Saturday, December 22, 2012 6:02 AM

[R] Help on PK.fit

2012-12-22 Thread li li
Dear all, I have a Pharmokinetics data set where single dose is used for several time points on 8 subjects. I wanted to fit a two compartment model on the data set to see whether it is reasonable. This is the first time to analyze a PK data set and am not familar with various concepts in the

Re: [R] remove from column a group of elements I have in another vector

2012-12-22 Thread Sarah Goslee
Well, you could try it to see what happens... First look at: b$ansologin%in%quit then !(b$ansologin%in%quit) and finally b[!(b$ansologin%in%quit),] You could also read the help ?! ?%in% and the Intro to R manual that came with R when you installed it. Sarah On Sat, Dec 22, 2012 at 10:48 AM,

Re: [R] RGoogleTrends error in getGTrends

2012-12-22 Thread Christoph Pfeiffer
Hi Tal, did you get an answer to this? I'm having a similar problem. Christoph On Thursday, November 3, 2011 11:55:17 AM UTC+1, Tal Galili wrote: Hi all, I've just installed RGoogleTrends Version:0.2-1 (after compiling it for windows). And when running the most basic command I get the

[R] Does R have an equivalent for Matlab's cell array?

2012-12-22 Thread Matthijs Daelman
Hi I have a time series of measurements: every 10 min. a value was logged. The data look like: 20100914 08:01 3.74 20100914 08:11 3.74 20100914 08:21 3.71 20100914 08:31 4.39 20100914 08:41 3.74 This data spans several months. I would like to group the data per day. In

[R] creating a function

2012-12-22 Thread Simone Gogna
Dear R users, I’d like to create a function as: Y.t+1 = Y.t + (1\p)*summation(x(Y.t,Y.t-1,...)) + epsilon.t where x is a function of Y.t, Y.t-1 and so on, epsilon is a random error and p is a parameter. Do you think something of the following form might be appropriate?

Re: [R] remove from column a group of elements I have in another vector

2012-12-22 Thread Estefanía Gómez Galimberti
Thank you Sarah!!  My data frame is b and I have to remove from column anslogin every value from vector quit b=     ht dispsplit anslogin month_   1038       162     4627      1    475         1     4305      1    205       103     4136      1    296         1     4627      1    784         9  

Re: [R] Does R have an equivalent for Matlab's cell array?

2012-12-22 Thread Jeff Newmiller
Data frames are lists of vectors. You can have the vectors in a data frame be of mode list, if you wish. It would be more conventional to simply make the list and not put it into the data frame, since columns of mode list give write.table fits. I prefer to simply keep the first form of your

Re: [R] creating a function

2012-12-22 Thread Rui Barradas
Hello, It's a bad idea to name a function and one of it's arguments Y, use Yfun and Y. What does summation(x(Y.t, Y.t-1, ...)) mean? Is there a multiplication sign between x and (Y.t, ...)? And is epsilon a vector of errors, one for each Y.t? If so, the following might do it. Yfun -

Re: [R] Does R have an equivalent for Matlab's cell array?

2012-12-22 Thread David Winsemius
On Dec 22, 2012, at 2:58 AM, Matthijs Daelman wrote: Hi I have a time series of measurements: every 10 min. a value was logged. The data look like: 20100914 08:01 3.74 20100914 08:11 3.74 20100914 08:21 3.71 20100914 08:31 4.39 20100914 08:41 3.74 This data

Re: [R] Does R have an equivalent for Matlab's cell array?

2012-12-22 Thread Rui Barradas
Hello, Something like this? dat - read.table(text= 20100914 08:01 3.74 20100914 08:11 3.74 20100914 08:21 3.71 20100914 08:31 4.39 20100914 08:41 3.74 ) dat split(dat$V3, dat$V1) This gives you a list where each element is a (1-dimensional) vector, and each of those

[R] plotting and saving diagrams automatically

2012-12-22 Thread eliza botto
[if the format of my email is changed or is difficult to understand, a text file is attached for easy understanding]Dear useRs, i was wondering that if its possible in R to automatically generate plots and get it saved at the desired location? i have data of cancer patients, from about 1000

Re: [R] Does R have an equivalent for Matlab's cell array?

2012-12-22 Thread arun
HI, May be this helps: dat1 - read.table(text= 20100914 08:01,    3.74 20100914 08:11,    3.74 20100914 08:21,    3.71 20100914 08:31,    4.39 20100914 08:41,    3.74 20100915 08:01,    3.64 20100915 08:11,    3.54 20100915 08:21,    3.61 20100915 08:31,    4.49 20100915 08:41,    3.84 ,

Re: [R] plotting and saving diagrams automatically

2012-12-22 Thread David Winsemius
On Dec 22, 2012, at 12:34 PM, eliza botto wrote: [if the format of my email is changed or is difficult to understand, a text file is attached for easy understanding]Dear useRs, i was wondering that if its possible in R to automatically generate plots and get it saved at the desired

[R] Regression Modeling Strategies 3-Day Short Course March 2013

2012-12-22 Thread Frank Harrell
*RMS Short Course 2013* Frank E. Harrell, Jr., Ph.D., Professor and Chair Department of Biostatistics, Vanderbilt University School of Medicine *March 4, 5 6, 2013* 8:00am - 4:30pm Student Life Center Board of Trust Room Vanderbilt University Nashville Tennessee USA See

[R] Character Variable in X axis scatter plot

2012-12-22 Thread John Jeffery
I am very new to R statistics. Have installed R-2.15.2 ; Rcmdr 1.9-2 ; RStudio 0.97.237 on Debian Squeeze and also windows7 I can Import from Excel File OK .Workbook - loadWorkbook(/media/4C90-B739/Oct13-Dec21Bsl.xls) JJData - readWorksheet(.Workbook, Oct13-Dec21Bsl) remove(.Workbook) have a

[R] correction needed in codes

2012-12-22 Thread eliza botto
Dear useRs,while trying to plot the yearly curves of 1000 stations and overlapping each set of curves with mean curve and then saving it automatically in a pdf file, i tried the following commands Path = C:\\R\\003.pdfpdf(file=Path) for (i in seq(1:1000) a-lapply(seq_along(tcp),

Re: [R] Character Variable in X axis scatter plot

2012-12-22 Thread David L Carlson
Function strptime() will convert the date-time character string to a POSIXct object that you can use in your plot. In general, when posting a query to r-help: 1. Do not use html, only plain text (see what happened to your data below. 2. Use dput() to convert your data to a

Re: [R] Display of data points in the Scatterplot

2012-12-22 Thread Peter Ehlers
On 2012-12-19 12:31, David Winsemius wrote: On Dec 19, 2012, at 11:28 AM, Katherine Gobin wrote: Respected R forum I am learning R and relatively quite new to R. I am generating a scatter-plot as given below. (My actual table is much larger). # Sample data frame y = c(20, 23, 17, 31,

[R] permutation test for PLS/PLSDA

2012-12-22 Thread khosoda
Hi, Is there any R package doing permutation/randomization test for PLS/PLSDA? I found some codes for MatLab, but I want to use R program. Thank you very much in advance. Kohkichi Hosoda __ R-help@r-project.org mailing list