Re: [R] boxplot

2010-09-28 Thread Joshua Wiley
Dear Felipe, Assuming you are not interested in the exact formulae that are used to calculate each of these, from top to bottom it is: minimum, lower quartile, median, upper quartile, maximum If there are dots, these usually indicate outliers. Please read ?boxplot for more details on what R wi

Re: [R] ramdom sampling from a dataset

2010-09-28 Thread Dennis Murphy
Try this: x <- c(2,5,9,4,5,6,7,8) u <- replicate(20, sample(x, replace = TRUE)) t(u) The first argument of replicate() is the number of times to iterate the process. I believe you'll find that it does indeed do random sampling; each row represents a nonparametric bootstrap sample of x. There are

Re: [R] String split and concatenation

2010-09-28 Thread Bill.Venables
dump("x", file = "x.R") file.show("x.R") will get you most of the way. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Steven Kang Sent: Wednesday, 29 September 2010 3:11 PM To: r-help@r-project.org Subject: [R] String split and c

Re: [R] String split and concatenation

2010-09-28 Thread Ista Zahn
Hi Steven, This should do it: paste('"', unlist(strsplit(x, split="")), c(rep('",', length(x)-1), ""), sep="") -Ista On Wed, Sep 29, 2010 at 1:11 AM, Steven Kang wrote: > Hi R users, > > > I desire to transform the following vector consisting of repeated characters > > x <- rep(letters, 3) > in

[R] String split and concatenation

2010-09-28 Thread Steven Kang
Hi R users, I desire to transform the following vector consisting of repeated characters x <- rep(letters, 3) into this exact format (i.e a single string containing each characters in quotation mark separated by comma between each; al ). ("a", "b", "c", "d", "a", "b", "c", "d",

[R] boxplot

2010-09-28 Thread Luis Felipe Parra
Hello, does somebody know in a boxplot, what does each element in the boxplot represent? 1. lines at the extremes of the dotted lines? 2. Extremes of the boxes 3. Black line in the middle of the box? 4. notches? Thank you Felipe Parra [[alternative HTML version deleted]] __

Re: [R] break function execution

2010-09-28 Thread raje...@cse.iitm.ac.in
I'm on windows xp. I use R 2.11.1 GUI - Original Message - From: Greg Snow To: raje...@cse.iitm.ac.in, r-help Sent: Wed, 29 Sep 2010 00:48:51 +0530 (IST) Subject: RE: [R] break function execution Ctrl-C works on some platforms, it would help us to help you if we knew which OS you are u

Re: [R] repeat a function

2010-09-28 Thread Michael Bedward
Hi Michael testdat <- replicate( 50, growth[ sample(nrow(growth), 8, rep=TRUE) ] ) testdat will then be a matrix of 8 x 50 = 400 rows where each lot of 8 is a sample. Alternatively you can do... testdat <- replicate( 50, growth[ sample(nrow(growth), 8, rep=TRUE) ], simplify=FALSE ) Now testdat

[R] repeat a function

2010-09-28 Thread Michael Larkin
I have R randomly sampling my array made up of 2 columns of data. Here is my code randomly sampling 5 different rows from my dataset to create a new dataset of 8 rows of data: testdat<-growth[sample(5,8,replace=T),] Now I want to tell R to repeat this function 50 times and give me the

Re: [R] efficient equivalent to read.csv / write.csv

2010-09-28 Thread Gabor Grothendieck
On Tue, Sep 28, 2010 at 5:02 PM, statquant2 wrote: > > Hello all, > the test I provided was just to pinpoint that for loading once a big csv A file that can be read in under 2 seconds is not big. > file with read.csv was quicker than read.csv.sql... I have already > "optimized" my calls to read.

Re: [R] constrained optimization -which package?

2010-09-28 Thread Paul Smith
On Tue, Sep 28, 2010 at 9:47 PM, Leonardo Monasterio wrote: > In the function bellow I  want to find the maximum value of v, > subject to the constrain that the sum of x is equal to 1. >  I want to maximize: > v<-t(x)%*%distance%*%x > > Subject to: > sum(x)=1 > > Where: > "x" is a vector n X 1 > "

[R] short captions for xtable?

2010-09-28 Thread cuz
Hi, For my dissertation, I have used xtable profusely. I'm also a fan of extended captions in the text. However, these captions are unwieldy in the List of Tables, so I'd like to use the short caption option available with regular \caption usage. Is this possible? Thanks, Cuz -- View this messa

[R] Transforming/appending data (words in IMDB)

2010-09-28 Thread aeneas24
Hi everyone, I am doing an analysis of reviews in IMDB and am running into trouble getting my data into the right shape for analysis. Key question: I want to know for each word in the IMDB, whether it is over- or under-represented in a particular category (Rating x Genre). I was figuring o

Re: [R] efficient equivalent to read.csv / write.csv

2010-09-28 Thread statquant2
Hello all, the test I provided was just to pinpoint that for loading once a big csv file with read.csv was quicker than read.csv.sql... I have already "optimized" my calls to read.csv for my particular problem, but is a simple call to read.csv was quicker than read.csv.sql I doubt that specifying

[R] ramdom sampling from a dataset

2010-09-28 Thread Michael Larkin
I am trying to get R to pick random integers from my dataset (i.e. bootstrapping) with replacement. However, my attempts at this have been unsuccessful. Here is a basic example of what I am doing: I have a data vector of 8 integers (data= 2,5,9,4,5,6,7,8). I used the sample function and it wo

Re: [R] Object Browser

2010-09-28 Thread Vitally S.
wxffxw writes: > So, is there any thing like the combination of eclipse and Jgr? > If not, I am interested to develope something to fulfill this simple but > very important function. But right now I have no idea where to start. Any > suggestions? If you are interested in developing such a browse

Re: [R] constrained optimization -which package?

2010-09-28 Thread Ravi Varadhan
Please read the help page carefully, the very first line that describes the function says, "Minimise a function subject to linear inequality constraints". OP has a problem with equality constraints: sum(x) = 1. Furthermore, if you want to solve a QP problem then it is better to use a dedicate

Re: [R] next step in randomly sampling

2010-09-28 Thread Jonathan Christensen
Mike, Try growth[sample(1:length(growth)),] to permute the rows. Jonathan On Tue, Sep 28, 2010 at 8:38 PM, Michael Larkin wrote: > Thanks to the people on this list I was able to fix my code for randomly > sampling. Thanks. > > > > Now, I am moving on to the next step and I ran into another

[R] get response from a glm

2010-09-28 Thread xinxin xx
Hi everyone: ¡¡I am new to R and I have a really basic question. I have already got a generalized linear model from some dataset, say y=b0 + b1X1 + b2X2. Then I want to get the value of y provided, say, X1=1, X2=2. And the confidence Intervals of this y. I know I can just calculat

[R] next step in randomly sampling

2010-09-28 Thread Michael Larkin
Thanks to the people on this list I was able to fix my code for randomly sampling. Thanks. Now, I am moving on to the next step and I ran into another snag. I have a large dataset but I am starting with a small made-up dataset until I figure it out. I have two columns of data (age and leng

Re: [R] quantile() and "factors not allowed"

2010-09-28 Thread Steve
The underlying data contained values that resulted in Factor instead of number fields during the read.csv. Problem fixed! I also introduced a typo while copying the error into my message, and as for the poor variable naming, I'll be more careful. Thanks x3! Corrected structure: > str(CPU) 'dat

Re: [R] need help with ramdomly sampling some data

2010-09-28 Thread Michael Larkin
I got it to work. I didn't have the data listed as a vector (c in front of the data). I copied Peter's code and it worked perfectly. Thanks! Mike From: Jonathan Christensen [mailto:dzhona...@gmail.com] Sent: Tuesday, September 28, 2010 9:31 PM To: Michael Larkin Cc: r-help@r-projec

Re: [R] drawing samples based on a matching variable

2010-09-28 Thread Michael Bedward
On 29 September 2010 09:47, Remko Duursma wrote: > > > How about: > > y[y[,2] %in% x.samp[,2],] > > gives you the subset of y where values in the second column are restricted > to your sample from x. > > You can then sample from this matrix, if you need to... Just saw this reply tangled up in anot

Re: [R] drawing samples based on a matching variable

2010-09-28 Thread Michael Bedward
Hello LB, It's one of those problems that's basic but tricky :) I don't have an elegant one-liner for it but here's a function that would do it... function(xs, y) { # sample matrix y such that col 2 of the sample matches # col 2 of matrix xs used <- logical(nrow(y)) yi <- integer(nrow(xs))

[R] R Extensions getDLLVersion

2010-09-28 Thread Kyle Covington
Hi, I'm just learning to write R extensions in C and to embed R in C. I was trying to get through the example in the help page on calling the .dll directly ( http://cran.r-project.org/doc/manuals/R-exts.html#Calling-R_002edll-directly ). When I compile I consistently get the error that getDLLVer

Re: [R] need help with ramdomly sampling some data

2010-09-28 Thread Jonathan Christensen
Mike, It works for me: > data <- 1:8 > sample(data,replace=TRUE) [1] 6 4 5 2 5 8 7 2 Please provide a reproducible example, if possible, and the output of sessionInfo(). Jonathan On Tue, Sep 28, 2010 at 7:22 PM, Michael Larkin wrote: > I am trying to get R to randomly select values from my d

Re: [R] need help with ramdomly sampling some data

2010-09-28 Thread Peter Langfelder
On Tue, Sep 28, 2010 at 6:22 PM, Michael Larkin wrote: > I am trying to get R to randomly select values from my dataset (i.e. > bootstrapping) with replacement.  However, my attempts at this have been > unsuccessful.  Here is a basic example of what I am doing: > > I have a data vector of 8 values

[R] need help with ramdomly sampling some data

2010-09-28 Thread Michael Larkin
I am trying to get R to randomly select values from my dataset (i.e. bootstrapping) with replacement. However, my attempts at this have been unsuccessful. Here is a basic example of what I am doing: I have a data vector of 8 values (i.e. data= 2,5,9,4,5,6,7,8). I used the sample function and

Re: [R] quantile() and "factors not allowed"

2010-09-28 Thread Joshua Wiley
Hi Steve, The basic problem (as the error suggests) is that data of class "factor" is not allowed in quantile.default. So one of the elements of your list must be a factor. What are the results of: str(t) ? As a side note, since t() is a function, using t as a variable name can be a bit confu

Re: [R] stacked area chart

2010-09-28 Thread Dimitri Liakhovitski
Thanks a lot, Ista! On Tue, Sep 28, 2010 at 10:00 AM, Ista Zahn wrote: > Hi Dimitri, > I'm not proficient with base graphics, but here is a ggplot solution: > > my.data.m <- melt(my.data, id="date") > my.data.m$pn <- "+" > my.data.m[my.data.m$variable %in% c("y", "z"), "pn"] <- "-" > my.data.m$va

[R] quantile() and "factors not allowed"

2010-09-28 Thread Steve
A list (t) that I'm trying to pass to quantile() is causing this error: Error in quantile.default(t, probs = c(0.9, 9.95, 0.99)) factors are not allowed I've successfully use lists before, and am having difficulty finding my mistake. Any suggestions appreciated! -Steve _

Re: [R] Regular expressions: offsets of groups

2010-09-28 Thread Michael Bedward
Ah, that's interesting - thanks Bill. That's certainly on the right track for me (Titus, you too ?) especially if the subpattern argument accepted a vector of multiple group indices. As you say, this is straightforward in C. I'd be happy to (try to) make a patch for the R sources if there was some

[R] move colorkey

2010-09-28 Thread Marlin Keith Cox
When using a wireframe, I need to move the colorkey from the "right" position (default0 towards the plot. I have also needed to adjust the height and used the code colorkey=list(T,space='right',height=.5) I have looked at documents (within levelplot) but cannot find a way to move the colorkey ot

Re: [R] efficient equivalent to read.csv / write.csv

2010-09-28 Thread Gabor Grothendieck
On Tue, Sep 28, 2010 at 1:24 PM, statquant2 wrote: > > Hi, after testing > R) system.time(read.csv("myfile.csv")) >   user  system elapsed >  1.126   0.038   1.177 > > R) system.time(read.csv.sql("myfile.csv")) >   user  system elapsed >  1.405   0.025   1.439 > Warning messages: > 1: closing unus

[R] Problems creating an xts object

2010-09-28 Thread Luis Felipe Parra
Hello I am trying to create an xts object from a data frame that has numeric and string variables. when I create the object all my variables are converted to string, this is my original data frame: > head(DatosF) FECHA CIERRE HORA DE CIERRE SESION/RUEDA PLAZO (De regreso para SIML, Repos e INTB)

Re: [R] constrained optimization -which package?

2010-09-28 Thread Peng, C
constrOptim() can do linear and quadratic programming problems! See the following example from the help document. ## Solves linear and quadratic programming problems ## but needs a feasible starting value # # from example(solve.QP) in 'quadprog' # no derivative

Re: [R] fixing the dispersion parameter in glm

2010-09-28 Thread Remko Duursma
How about: y[y[,2] %in% x.samp[,2],] gives you the subset of y where values in the second column are restricted to your sample from x. You can then sample from this matrix, if you need to... greetings, Remko -- View this message in context: http://r.789695.n4.nabble.com/drawing-samples-bas

Re: [R] A problem with plotting a long expression in ylab ?

2010-09-28 Thread Paul Murrell
Hi It is a bug. A fix has been committed. Thanks for the report! Paul On 29/09/2010 10:15 a.m., Ben Bolker wrote: Barry Rowlingson lancaster.ac.uk> writes: My point is that in regular text, ylab plots it where it then goes outside the borders. With the use of expressions - the text just

Re: [R] plotting multiple animal tracks against Date/Time

2010-09-28 Thread Gabor Grothendieck
On Tue, Sep 28, 2010 at 9:30 AM, Struve, Juliane wrote: > > Hi, > > in this self-contained example the file the same error message appears as > when I read in my original results files. > > library (zoo) > library(chron) > #generate example data > Fish_ID=1646 >  Date <- "01/01/2004 00:01:00" >  

[R] fixing the dispersion parameter in glm

2010-09-28 Thread Huso, Manuela
I would like to fit a glm with Poisson distribution and log link with a known dispersion parameter. I do not want to estimate the dispersion parameter. I know what it is, so I simply want to fix it at a constant for this and other models to follow. My simple, no covariate model is: Tall.glm<

Re: [R] constrained optimization -which package?

2010-09-28 Thread Ravi Varadhan
No. That would not work for equality constraints. This is quadratic programming problem. Check out `quadprog' or any other quad programming packages in R. If you have more general, nonlinearly constrained optimization you can use any one of the 3 following packages: 1. `spg' function in "BB"

Re: [R] ask for a question with cch function

2010-09-28 Thread Bill.Venables
It would help if you were to tell up which package you are talking about. I take it this is the survival package and this is the proportioanl hazards fitting function for case-cohort data. You would have seen earlier in the code that method <- match.arg(method) so at that stage 'method'

[R] drawing samples based on a matching variable

2010-09-28 Thread L Brown
Hi, everyone. I have what I hope will be a simple coding question. It seems this is a common job, but so far I've had trouble finding the answer in searches. I have two matrices (x and y) with a different number of observations in each. I need to draw a random sample without replacement of observa

[R] Time invariant coefficients in a time varying coefficients model using dlm package

2010-09-28 Thread Christian Schoder
Dear R-users, I am trying to estimate a state space model of the form (1) b_t = G * b_t-1 + w_tw_t ~ N(0,W) (2) y_t= A' * x_t + H' * b_t + v_t v_t ~ N(0,V) (Hamilton 1984: 372) In particular my estimation in state space form looks like (3) a3_t = 1 * a3_t-1 + w_t w_t

Re: [R] A problem with plotting a long expression in ylab ?

2010-09-28 Thread Ben Bolker
Barry Rowlingson lancaster.ac.uk> writes: > > My point is that in regular text, ylab plots it where it then goes outside > > the borders. > > With the use of expressions - the text just doesn't show up. > > Originally I thought it was because of my miss-use of expressions, until I > > figured it

Re: [R] Problem with unlist

2010-09-28 Thread Susan Gruber
I suspect the problem is that table() is not displaying the correct length. Try table(n, useNA="ifany") --Susan >Message: 75 >Date: Mon, 27 Sep 2010 11:41:24 -0700 >From: Henrik Bengtsson >To: Ben Bolker >Cc: r-help >Subject: Re: [R] Problem with unlist >Message-ID: > >Content-Type

[R] constrained optimization -which package?

2010-09-28 Thread Leonardo Monasterio
Dear R users, In the function bellow I want to find the maximum value of v, subject to the constrain that the sum of x is equal to 1. I want to maximize: v<-t(x)%*%distance%*%x Subject to: sum(x)=1 Where: "x" is a vector n X 1 "distance" is a matrix n*n and it is given. (In practice, the numbe

Re: [R] Howto view function's source code of an installed package

2010-09-28 Thread Prof Brian Ripley
On Tue, 28 Sep 2010, Mark Miller wrote: I justed wanted to provide a description of how I was able to view source code of a function. First download the Program R package containing the function. Specifically, download the file that ends in "tar.gz". This is a compressed file. Expand the c

Re: [R] efficient equivalent to read.csv / write.csv

2010-09-28 Thread David Scott
On 29/09/2010 6:24 a.m., statquant2 wrote: Hi, after testing R) system.time(read.csv("myfile.csv")) user system elapsed 1.126 0.038 1.177 R) system.time(read.csv.sql("myfile.csv")) user system elapsed 1.405 0.025 1.439 Warning messages: 1: closing unused connection 4 ()

[R] confirming behavior of "by"

2010-09-28 Thread Daryl Morris
Hi, I'm using "by" to summarize by multiple groups, and want to extract the returned into a pretty dataframe. I'm trying to find a simple way to name the rows of the data frame. I'd like it to be something like index1.val1.index2.val2 where the index1 and index2 are the names of the indice

[R] ask for a question with cch function

2010-09-28 Thread Qian Xiyuan
Dear all, I am reading the cch function source code. But I can not understand the following codes. Please help me. What's the fitter here? fitter <- get(method) out <- fitter(tenter = tenter, texit = texit, cc = cc, id = id, X = X, ntot = nn, robust = robust) [[alternative HTML version

Re: [R] break function execution

2010-09-28 Thread Peter Langfelder
On Tue, Sep 28, 2010 at 12:18 PM, Greg Snow wrote: > Ctrl-C works on some platforms, it would help us to help you if we knew which > OS you are using, which version of R you are using, and in some cases whether > you are using the GUI or Terminal version of R. >> Hi, >> >> I have an R function

Re: [R] Howto view function's source code of an installed package

2010-09-28 Thread Sicotte, Hugues
The instructions below are for examining files from a source code file. For package binaries, the R code may be in a binary file (.rdb).. Then the following will help. The first thing to try is to Download and install the package and type library(packagename) Type the function name (without the

Re: [R] Combining two variables in text

2010-09-28 Thread Greg Snow
Also ?sprintf for another approach. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Johannes Huesing > Sent:

Re: [R] break function execution

2010-09-28 Thread Greg Snow
Ctrl-C works on some platforms, it would help us to help you if we knew which OS you are using, which version of R you are using, and in some cases whether you are using the GUI or Terminal version of R. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@

Re: [R] Howto view function's source code of an installed package

2010-09-28 Thread Mark Miller
I justed wanted to provide a description of how I was able to view source code of a function. First download the Program R package containing the function. Specifically, download the file that ends in "tar.gz". This is a compressed file. Expand the compressed file using, for example, "WinZip"

Re: [R] efficient equivalent to read.csv / write.csv

2010-09-28 Thread Henrik Bengtsson
To speed things up, you certainly want to give R more clues about your data files by being more explicit by many of the arguments (cf. help(read.table), especially specifying argument 'colClasses' makes a big difference. /Henrik On Tue, Sep 28, 2010 at 10:24 AM, statquant2 wrote: > > Hi, after t

Re: [R] constrained optimization -which package?

2010-09-28 Thread Peng, C
?constrOptim -- View this message in context: http://r.789695.n4.nabble.com/constrained-optimization-which-package-tp2717677p2717719.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz

Re: [R] Best package for time series analysis with wavelets???

2010-09-28 Thread Ben Bolker
gaussllego gmail.com> writes: > I would also like to know if there's a trully reliable,recommended wavelet's > library in R(In the sense that if,for example, there's some library that's > often used in scientific projects or mentioned in articles). I don't know, but I would suggest that you t

[R] constrained optimization -which package?

2010-09-28 Thread Leonardo Monasterio
Dear R users, I want to find the maximum value of v, subject to the constrain that the sum of x is equal to 1. So, I want to maximize: v<-t(x)%*%distance%*%x Subject to: sum(x)=1 Where: "x" is a vector n X 1 "distance" is a matrix n*n and it is given. (In practive, the number of n can go up to

Re: [R] efficient equivalent to read.csv / write.csv

2010-09-28 Thread statquant2
Hi, after testing R) system.time(read.csv("myfile.csv")) user system elapsed 1.126 0.038 1.177 R) system.time(read.csv.sql("myfile.csv")) user system elapsed 1.405 0.025 1.439 Warning messages: 1: closing unused connection 4 () 2: closing unused connection 3 () It seems that

Re: [R] Best package for time series analysis with wavelets???

2010-09-28 Thread gaussllego
Hi djmuseR! Hi everybody! Thanks for your answer djmuseR (I've just discovered the sos library and it's really useful,xD)... I would also like to know if there's a trully reliable,recommended wavelet's library in R(In the sense that if,for example, there's some library that's often used in scien

Re: [R] Opening a .R file with R (Windows)

2010-09-28 Thread Bert Gunter
Well, try following the correct conventions ... 1. Double click on an .Rdata file, which is produced by saving from R, and it will open. 2. Drag and drop a .R or any text file into an open R window and it will source the contents. This is probably documented somewhere .. maybe in the RW FAQ. --

Re: [R] Opening a .R file with R (Windows)

2010-09-28 Thread Joshua Wiley
Hi Kye, I have never gotten .R files to work quite like other types (e.g., double-clicking a .PDF) in Windows. AFAIK there is no simple way to do it, because you do not edit scripts directly in R (I am happy to be corrected if someone knows better). For general use, I would just open R first and

[R] Opening a .R file with R (Windows)

2010-09-28 Thread Kye Gilder
I am new to using R. I installed R on my computer (Windows) and everything things appears to be just fine. However, I have a simple script RTest.R that does a few simple calculations. When I double-click the RTest.R icon, I get an Information dialong box which says, "ARGUMENT 'C:\Documents and S

Re: [R] Splitting data in to multiple boxplots

2010-09-28 Thread Joshua Wiley
Hi, There is a very handy feature of boxplot() that will handle this easily. You can write formulae of the form: scores ~ groups For your sample data: # read in data dat <- read.table(textConnection(" id cat value 1 a12 2 a23 3 a14 4 b2 5 b3 6 c9 7 c8

[R] Splitting data in to multiple boxplots

2010-09-28 Thread deadlyspider
Hi, I have a data set in the following format: id cat value 1 a12 2 a23 3 a14 4 b2 5 b3 6 c9 7 c8 8 c10 9 d30 I would like to set up boxplots for each category. The actual category names are long and many so I would like this to be split

Re: [R] Regular expressions: offsets of groups

2010-09-28 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Michael Bedward > Sent: Tuesday, September 28, 2010 12:46 AM > To: Titus von der Malsburg > Cc: r-help@r-project.org > Subject: Re: [R] Regular expressions: offsets of groups >

[R] Offre illimitée Iphone 4 : Accesoires Off erts

2010-09-28 Thread ACTA SOLUTIONS COMMERCIALES
Si ce message ne s'affiche pas correctement, [1]visualisez la version en ligne [2]Remplissez ce formulaire pour ne plus recevoir notre newsletter. A réception, celui-ci sera pris en compte. References Visible links 1. http://ase.e

[R] the arima()-function and AICc

2010-09-28 Thread Benedikt Gehr
Hi I'm trying to fit arima models with the arima() function and I have two questions. ## ##1. ## ## I have n observations for my time series. Now, no matter what arima(p,d,q)- model I fit, I always get n residuals. How is that possible? For example: If I try this out myself on an AR(

Re: [R] Standard error of forecast

2010-09-28 Thread Ista Zahn
Hi, predict(model_fit, se.fit=TRUE) see ?predict.lm for details. -Ista On Tue, Sep 28, 2010 at 12:16 PM, Brima wrote: > > Hi all, > > This is very basic but for a starter nothing is. I have a simple linear > regression I am using to predict some values and I need the standard error > of the pr

Re: [R] Table with different digit number

2010-09-28 Thread Henrique Dallazuanna
Try this: df[1,] <- as.character(df[1,]) On Tue, Sep 28, 2010 at 8:48 AM, Nicola Sturaro Sommacal (Quantide srl) < mailingl...@sturaro.net> wrote: > Hi! > > I have a table representing both absolute and relative frequency, for > example (code to get example data under the signature): > >

Re: [R] Table with different digit number

2010-09-28 Thread Gabriela Cendoya
Try round(df,2) for two decimal digits Gabriela 2010/9/28, Nicola Sturaro Sommacal (Quantide srl) : > Hi! > > I have a table representing both absolute and relative frequency, for > example (code to get example data under the signature): > >ItalyGermany > absolute100

Re: [R] plotting multiple animal tracks against Date/Time

2010-09-28 Thread Struve, Juliane
Hi, in this self-contained example the file the same error message appears as when I read in my original results files. library (zoo) library(chron) #generate example data Fish_ID=1646 Date <- "01/01/2004 00:01:00" Date <- as.POSIXct(strptime(Date,format="%m/%d/%Y %H:%M:%S")) R2sqrt <-100 #p

[R] Table with different digit number

2010-09-28 Thread Nicola Sturaro Sommacal (Quantide srl)
Hi! I have a table representing both absolute and relative frequency, for example (code to get example data under the signature): ItalyGermany absolute100 105 relative 40.51 41.18 How can I print a different number of decimal digits? I try to tr

Re: [R] bwplot superpose panel.points from another dataframe

2010-09-28 Thread Christophe Bouffioux
BINGO we have the solution thanks a lot both, Deepayan and Dennis, for your help Christophe On Tue, Sep 28, 2010 at 2:10 PM, Deepayan Sarkar wrote: > On Tue, Sep 28, 2010 at 12:59 PM, Christophe Bouffioux > wrote: > > Thanks for your help Peter > > but the red marks on boxplot do not correspon

[R] Standard error of forecast

2010-09-28 Thread Brima
Hi all, This is very basic but for a starter nothing is. I have a simple linear regression I am using to predict some values and I need the standard error of the prediction (forecast). Whats the easiest/bestway of getting this error? Best regards -- View this message in context: http://r.78969

Re: [R] time series

2010-09-28 Thread Giovanni Petris
Unless you tell us what model or what forecasting technique you want to use, it seems to me that this is more a question about Statistics than about using R. Best, Giovanni Petris On Mon, 2010-09-27 at 23:02 +0100, Dr. Alireza Zolfaghari wrote: > Hi list, > I have a set of data which I want to

Re: [R] stacked area chart

2010-09-28 Thread Ista Zahn
Hi Dimitri, I'm not proficient with base graphics, but here is a ggplot solution: my.data.m <- melt(my.data, id="date") my.data.m$pn <- "+" my.data.m[my.data.m$variable %in% c("y", "z"), "pn"] <- "-" my.data.m$variable <- factor(my.data.m$variable, levels=c("a", "x", "y", "z")) my.data.m$Date <- a

Re: [R] 95% confidence intercal with glm

2010-09-28 Thread Ben Bolker
zozio32 gmail.com> writes: > > > Hi > > I had to use a glm instead of my basic lm on some data due to unconstant > variance. > > now, when I plot the model over the data, how can I easily get the 95% > confidence interval that sormally coming from: > > > yv <- predict(modelVar,list

Re: [R] cochran Q test

2010-09-28 Thread Kohleth Chia
Thanks for all the suggestions. It seems that I still have to write my own code after all. But I am really surprised that no one has done it in a proper package yet. KC ^_^ On 28/09/2010, at 9:18 PM, Dennis Murphy wrote: > Hi: > > Try here: > > https://stat.ethz.ch/pipermail/r-he

Re: [R] Best package for time series analysis with wavelets???

2010-09-28 Thread Dennis Murphy
Hi: You might find this useful: http://finzi.psych.upenn.edu/R/library/wavelets/html/ecg.html You could also try package wmtsa, the Insightful Wavelet Methods for Time Series Analysis package. But there's more :) The results of this search also appear to dig up some useful packages and functions

Re: [R] Compare two 3d plots

2010-09-28 Thread Ab Hu
I'll check that book out and/or get help from the authors. But i was still hoping there is some basic way to compare these 3d plots using R. By the way, I figured out i can draw these plots using command "image" and get a gradient heat map or topography map with gradients. Is there a function in

Re: [R] bwplot superpose panel.points from another dataframe

2010-09-28 Thread Deepayan Sarkar
On Tue, Sep 28, 2010 at 12:59 PM, Christophe Bouffioux wrote: > Thanks for your help Peter > but the red marks on boxplot do not correspond to ex2 dataframe > actually, it reproduce on each panel the same marks > that is to say the 3 first lines of ex2 > So this is not correct You are probably lo

Re: [R] Odp: Object Browser

2010-09-28 Thread Douglas Bates
On Mon, Sep 27, 2010 at 3:04 AM, Petr PIKAL wrote: > Hi > I noticed that nobody answered your question yet so here is my try. > > If you want to see what objects are in your environment you can use ls() > but its output is only names of objects. Here is a function I use a long > time for checking

Re: [R] bwplot superpose panel.points from another dataframe

2010-09-28 Thread Dennis Murphy
Hi: I did this in ggplot2, which seemed easier than the approach you tried in lattice's bwplot() - as far as I can tell, you want to plot the unique value of v1b as a red dot in each boxplot. To that end, ex <- data.frame(v1 = log(abs(rt(180, 3)) + 1), v2 = rep(c("2007", "2006", "

Re: [R] Regular expressions: offsets of groups

2010-09-28 Thread Gabor Grothendieck
On Tue, Sep 28, 2010 at 6:52 AM, Titus von der Malsburg wrote: > On Tue, Sep 28, 2010 at 9:46 AM, Michael Bedward > wrote: >> What Titus wants to do is akin to retrieving capturing groups from a >> Matcher object in Java. > > Precisely.  Here's the description: > >  http://download.oracle.com/jav

[R] Using mlogit package to generate a binary mixed logit model

2010-09-28 Thread Michael Morton
Hi, I am trying to generate a binary mixed logit model which contains only individual specific data (no alternative specific data). Each observation is contained within one line (data shape = "wide"). For example: Individual ID Dependent variableIndependent variable 1 ..In

Re: [R] Combining two variables in text

2010-09-28 Thread Johannes Huesing
trb1 [Tue, Sep 28, 2010 at 12:12:01PM CEST]: [...] > Also, how can I combine several variables in text > i.e. suppose I have > a <- "one" > b <- "two" > then what expression can I place in > title(main=...) > in terms of a and b to give an output title of > "one, two" > i.e. a then b separated

Re: [R] Regular expressions: offsets of groups

2010-09-28 Thread Titus von der Malsburg
On Tue, Sep 28, 2010 at 9:46 AM, Michael Bedward wrote: > What Titus wants to do is akin to retrieving capturing groups from a > Matcher object in Java. Precisely. Here's the description: http://download.oracle.com/javase/1.4.2/docs/api/java/util/regex/Matcher.html#start(int) Gabor's lookbe

[R] Use R in Visual Basic Environment

2010-09-28 Thread Soumen Pal
I need your kind help regarding the following: I wish to know is there any way to use R in Visual Basic environment. I want to develop a VB application where R can be embedded (R will work as a back end statistical engine). If available, please provide me some source of study materials/articles av

[R] Best package for time series analysis with wavelets???

2010-09-28 Thread gaussllego
Hi!! I'm looking for a package in R for time series analysis using wavelets( I'm interested on extractingt information from electrocardiograms with the aim of study the heart rate variability) so i want to know which package is the best for me. I've thinking about using some of those(you can reco

Re: [R] cochran Q test

2010-09-28 Thread Dennis Murphy
Hi: Try here: https://stat.ethz.ch/pipermail/r-help/2006-September/113156.html HTH, Dennis On Mon, Sep 27, 2010 at 7:27 PM, Kohleth Chia wrote: > Dear all, > > I am trying to look for a built in function that performs the cochran Q > test. > that is, cochranq.test(X) > where X is a contingenc

Re: [R] A problem with plotting a long expression in ylab ?

2010-09-28 Thread Barry Rowlingson
On Tue, Sep 28, 2010 at 10:35 AM, Tal Galili wrote: > My point is that in regular text, ylab plots it where it then goes outside > the borders. > With the use of expressions - the text just doesn't show up. > Originally I thought it was because of my miss-use of expressions, until I > figured it

Re: [R] subtraction based on two groups in a dataframe

2010-09-28 Thread Dennis Murphy
Hi: Perhaps this might be useful: tst <- read.table(textConnection(" +plate.id well.id Group HYB rlt1 + 1 P1 A1 Control SKOV3hyb 0.190 + 2 P1 A2 Control SKOV3hyb 0.210 + 3 P1 A3 Control SKOV3hyb 0.205 + 4 P1 A4 Control SKOV3hyb 0.206

[R] break function execution

2010-09-28 Thread raje...@cse.iitm.ac.in
Hi, I have an R function that executes for a little over a minute. When the function starts running, the R interface freezes and doesnt change until the function exits cleanly. Is there someway I can force the function to exit without messing up the interface?(An equivalent of Ctrl-C) Additio

Re: [R] bwplot superpose panel.points from another dataframe

2010-09-28 Thread Christophe Bouffioux
Thanks for your help Peter but the red marks on boxplot do not correspond to ex2 dataframe actually, it reproduce on each panel the same marks that is to say the 3 first lines of ex2 So this is not correct Christophe On Mon, Sep 27, 2010 at 6:18 PM, Peter Ehlers wrote: > On 2010-09-27 4:54, Ch

Re: [R] Combining two variables in text

2010-09-28 Thread Dimitris Rizopoulos
try this: a <- "one" b <- "two" paste(a, b, sep = ", ") I hope it helps. Best, Dimitris On 9/28/2010 12:12 PM, trb1 wrote: Hi all, how can I manually create a data.frame or similar object to display in a textplot, that omits column and row numbers/headings? Also, how can I combine sever

Re: [R] Combining two variables in text

2010-09-28 Thread trb1
In the date.frame/ text plot, would it be possible to change the font size of one of the lines? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Combining-two-variables-in-text-tp2716916p2716931.html Sent from the R help mailing list archive at Nabble.com. _

[R] Combining two variables in text

2010-09-28 Thread trb1
Hi all, how can I manually create a data.frame or similar object to display in a textplot, that omits column and row numbers/headings? Also, how can I combine several variables in text i.e. suppose I have a <- "one" b <- "two" then what expression can I place in title(main=...) in terms of a

  1   2   >