Re: [R] testing for temperature differences between years and sites?

2012-02-01 Thread Jim Lemon
On 01/31/2012 11:34 PM, swertie wrote: Hello! I have a dataset with monthly temperatures for 4 different years and I would like to test if they are significantly different between the years. As I collected the data for different sites I wondered if there were some possibility to perform the

[R] Help on the progam of CGE models

2012-02-01 Thread Ayanendu Sanyal
Is Computable General Equilibrium modelling(CGE modelling) possible in R Please help as the software which does it is very costly especially for the developing countries scholars like me Thanking You Ayanendu Sanyal Institute for Social and Economic Change Nagarbhavi Bangalore India PIN

Re: [R] Generate data - function

2012-02-01 Thread Petr Savicky
On Tue, Jan 31, 2012 at 01:59:13PM -0500, Val wrote: Hi petr, Can the required density be understood as a piecewise linear function going through 4 or 5 given points? That is my problem. The function should be nonlinear. However, we can break it down to the first 3 or 4 points could be

Re: [R] Different type of legend?

2012-02-01 Thread Jim Lemon
On 02/01/2012 04:31 AM, Kevin Burton wrote: There must be a trick because I am not seeing a legend: ... Hi Kevin, Try calling it like this: color.legend(-0.4,0.35,0.37,0.4,rect.col=colors, legend=1:11,align=rb) I just looked at the plot limits, par(usr), and worked out where to put it. I

Re: [R] Problem with xtable- rescaling a table

2012-02-01 Thread Ista Zahn
Hi, It looks like you need scalebox inside the sidewaystable environment. If you must use scalebox, one solution is to use floating=FALSE when you call print.xtable, and insert the table environment directly in LaTeX, like this: \begin{sidewaystable}[ht] \scalebox{0.7}{

Re: [R] indexing by empty string (was RE: Error in predict.randomForest ... subscript out of bounds with NULL name in X)

2012-02-01 Thread Ista Zahn
Hi Andy, On Tuesday, January 31, 2012 08:44:13 AM Liaw, Andy wrote: I'm not exactly sure if this is a problem with indexing by name; i.e., is the following behavior by design? The problem is that names or dimnames that are empty seem to be treated differently, and one can't index by them:

Re: [R] Generate data - function

2012-02-01 Thread Petr Savicky
On Tue, Jan 31, 2012 at 01:59:13PM -0500, Val wrote: Hi petr, Can the required density be understood as a piecewise linear function going through 4 or 5 given points? That is my problem. The function should be nonlinear. However, we can break it down to the first 3 or 4 points could be

Re: [R] R extracting regression coefficients from multiple regressions using lapply command

2012-02-01 Thread Jean V Adams
Michael Wither michael.j.wit...@gmail.com wrote on 01/28/2012 03:18:29 PM: [image removed] Re: [R] R extracting regression coefficients from multiple regressions using lapply command Michael Wither to: Jean V Adams 01/28/2012 03:18 PM Hi, this code is actually great (much

[R] add 'weights' in gamm with poisson or binomial family

2012-02-01 Thread He
Dear all, I am doing unblanced longitudinal analysis (the number of individuals declines with time). I want to consider the decreasing cases with time by adding a weight which assumes a different variance function at each time. However, if i run 'm1' (shown below), the error message ' weights

Re: [R] Probit regression with limited parameter space

2012-02-01 Thread Ben Bolker
Sally Luo shali623 at gmail.com writes: Dear R helpers, I need to estimate a probit model with box constraints placed on several of the model parameters. I have the following two questions: 1) How are the standard errors calclulated in glm (family=binomial(link=probit)? I ran a

Re: [R] Optimisation

2012-02-01 Thread Steven Wolf
Yes. For a simple start try: help(optim) If you need a more complicated algorithm look into the 'neldermead' package. HTH, -Steve -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Partha Sinha Sent: Wednesday, February 01, 2012

Re: [R] Optimisation

2012-02-01 Thread S Ellison
Can optimisation (simplex etc) be done through R? Try the CRAN task view on optimisation at, for example, 'http://finzi.psych.upenn.edu/views/Optimization.html *** This email and any attachments are confidential. Any

[R] Multi-response, multi-rater kappa?

2012-02-01 Thread Luk Arbuckle
I'm looking for an extension of kappa to measure agreement among multiple raters when there can be more than one response per subject. For example, say a group of doctors assign diseases to patients. Each patient will be assigned one to many diseases, and the number of doctors assigning diseases

Re: [R] Checking for invalid dates: Code works but needs improvement

2012-02-01 Thread Paul Miller
Hi Marc, That the code I wrote initially is over engineered is certainly possible. Of course, Rui's solution is a reworking of that code. If starting from scratch, Rui likely would have done something quite different. I focused on Rui's code because it was complete and was a clear improvement

Re: [R] how to unzip files in R

2012-02-01 Thread Benno Pütz
Depending on what you want to do with that file, there may be no need to uncompress … read.table(), e.g., works fine with the compressed version. Benno On Feb 1, 2012, at 2:04 AM, Luke Miller wrote: Try the bzfile() function instead of unz(). You'll find that you're taken to the

Re: [R] Selecting contiguous, irregularly-shaped sets of values from arrays

2012-02-01 Thread Chris Campbell
Dear Bryan, You could try using spatial techniques to choose the contiguous areas of your matrices. require(spatstat) set.seed(1520) x - matrix(rnorm(25), nrow=5, ncol=5, + dimnames=list(c(A,B,C,D,E), c(v,w,x,y,z))) x vw x y z A

[R] Random Forest Package

2012-02-01 Thread Niratha
Hi, I have installed R version 2.14 in windows 7 . I want to use randomForest package. I installed Rtools and MikTex 2.9, but i am not possible to read description file and also its not possible to build package. when i give this command in windows R CMD IINSTALL --build randomForest its

Re: [R] testing for temperature differences between years and sites?

2012-02-01 Thread swertie
Thank you very much! This is the kind of plot I tried to do. For the statistical models, I am a bit confused between which factors to put as fixed or random effects. I will have a look at time series models as you suggested. swertie -- View this message in context:

[R] package sampling, function strata

2012-02-01 Thread Elena Guijarro
Dear all, I have to select 122 stratified random samples from a population of 3900 cells. I have 41 strata and I have to draw a different number of samples from them(between 2 and 8). I have tried to apply the funtion strata following the instruction in the manual: strata(dataframe,

[R] randomForest: proximity for new objects using an existing rf

2012-02-01 Thread Kilian
Dear all, using an existing random forest, I would like to calculate the proximity for a new test object, i.e. the similarity between the new object and the old training objects which were used for building the random forest. I do not want to build a new random forest based on both old and new

[R] r-help; fisher information

2012-02-01 Thread Christopher Kelvin
Hello, i have used the code below to estimate the parameters of weibull distribution and i want to obtain the fisher information by providing the the next code but i receive errors anytime i try to, what do i do? by the way is my replication correct and is it placed at the right position for

Re: [R] Random Forest Package

2012-02-01 Thread Liaw, Andy
You should be able to use the Rgui menu to install packages. Andy -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Niratha Sent: Wednesday, February 01, 2012 5:16 AM To: r-help@r-project.org Subject: [R] Random Forest

Re: [R] randomForest: proximity for new objects using an existing rf

2012-02-01 Thread Liaw, Andy
There's an alternative, but it may not be any more efficient in time or memory... You can run predict() on the training set once, setting nodes=TRUE. That will give you a n by ntree matrix of which node of which tree the data point falls in. For any new data, you would run predict() with

[R] While loop working with TRUE/FALSE?

2012-02-01 Thread Chris82
Hi R users, is there any possibilty that a while loop is working like that: z - c(0,1,2,3,4,5,6,7,8,9) r - 7 while(w == T) { for ( i in 1:10 ){ w - r == z[i] print(w) } } The loop should stop if w == TRUE best regards -- View this

Re: [R] Generate data - function

2012-02-01 Thread Val
Hi Petr, Thank you very much. It looks we are almost there. #an example, use a function approximating your graphs * f - function(x) { 0.7 - 1.25*((x - 1)^2 - 0.4)^2 } f - function(x) { 0.2 - 1.5*((x - 1)^2 - 0.1)^2 } #plot function f(x) # x - seq(0, 2, length=51) x - seq(0.01, 1.75,

Re: [R] While loop working with TRUE/FALSE?

2012-02-01 Thread R. Michael Weylandt
You are combining too many loop constructs: perhaps you just want to use for and break. Of course, in your case it's much faster to write which(r == z) or which.min(r == z) Michael On Wed, Feb 1, 2012 at 10:55 AM, Chris82 rubenba...@gmx.de wrote: Hi R users, is there any possibilty that a

Re: [R] While loop working with TRUE/FALSE?

2012-02-01 Thread Milan Bouchet-Valat
Le mercredi 01 février 2012 à 07:55 -0800, Chris82 a écrit : Hi R users, is there any possibilty that a while loop is working like that: z - c(0,1,2,3,4,5,6,7,8,9) r - 7 while(w == T) { for ( i in 1:10 ){ w - r == z[i] print(w) }

Re: [R] While loop working with TRUE/FALSE?

2012-02-01 Thread Berend Hasselman
On 01-02-2012, at 16:55, Chris82 wrote: Hi R users, is there any possibilty that a while loop is working like that: z - c(0,1,2,3,4,5,6,7,8,9) r - 7 while(w == T) { for ( i in 1:10 ){ w - r == z[i] print(w) } } The loop should

Re: [R] While loop working with TRUE/FALSE?

2012-02-01 Thread Chris82
Thanks to both. This is just a simple example. In real I have two vectors with different lengths. The code consists of two for loops for r and z. The main problem is the computational time, so I try to stop the loop if w is TRUE for the first time. First I tried to use the command stop in

Re: [R] indexing by empty string (was RE: Error in predict.randomForest ... subscript out of bounds with NULL name in X)

2012-02-01 Thread Liaw, Andy
Hi Ista, When you write a package, you have to anticipate what users will throw at the code. I can insist that users only input matriices where none of the column names are empty, but that's not what I wish to impose on the users. I can add the name if it's empty, but as a user I don't want

Re: [R] While loop working with TRUE/FALSE?

2012-02-01 Thread Jeff Newmiller
No. The while loop is only tested after the for loop has completed. Use debug to understand this if it doesn't make sense to you. --- Jeff NewmillerThe . . Go Live...

Re: [R] While loop working with TRUE/FALSE?

2012-02-01 Thread Feng Li
I guess you want something like w=F z - c(0,1,2,3,4,5,6,7,8,9) r - 7 while(w == F) { for ( i in 1:10 ){ w - r == z[i] print(w) } } But this loop will run forever. The condition for while is checked when i jumps from 10 to 1. At that moment w

[R] Lag vector of dates by vector of days

2012-02-01 Thread RNoob
Dear All, I am looking for a function to get lagged dates from an input vector of dates, whereas the lag is specified by another vector. Each date is lagged by a different number of days. (specified in vector n) Example: input - as.Date( c( 2002-01-30, 2002-02-24, 2002-03-31) ) n -

Re: [R] Lag vector of dates by vector of days

2012-02-01 Thread R. Michael Weylandt
input + n Michael On Wed, Feb 1, 2012 at 11:45 AM, RNoob a...@alpha-centauri.com wrote: Dear All, I am looking for a function to get lagged dates from an input vector of dates, whereas the lag is specified by another vector. Each date is lagged by a different number of days. (specified in

Re: [R] Lag vector of dates by vector of days

2012-02-01 Thread Jorge I Velez
Not the best way but it seems to work: do.call(c, lapply(1:length(n), function(i) input[i] + n[i])) Also, the lubridate http://cran.r-project.org/web/packages/lubridate/index.html package might be useful. HTH, Jorge.- On Wed, Feb 1, 2012 at 11:45 AM, RNoob wrote: Dear All, I am looking

[R] Windows 7 installation of .qz package from SourceForge

2012-02-01 Thread Prew, Paul
Hello, I'm trying to install the package metRology from SourceForge. I save the zip file metRology_0.9-06.tar.gz to my Windows 7 machine, and try to install the package using the RGUI: Packages Install packages from local zip files metRology_0.9-06.tar.gz. There's no .zip extension, but R

Re: [R] Windows 7 installation of .qz package from SourceForge

2012-02-01 Thread Duncan Murdoch
On 12-02-01 12:07 PM, Prew, Paul wrote: Hello, I'm trying to install the package metRology from SourceForge. I save the zip file metRology_0.9-06.tar.gz to my Windows 7 machine, and try to install the package using the RGUI: Packages Install packages from local zip files

Re: [R] Generate data - function

2012-02-01 Thread Petr Savicky
On Wed, Feb 01, 2012 at 11:01:21AM -0500, Val wrote: Hi Petr, Thank you very much. It looks we are almost there. #an example, use a function approximating your graphs * f - function(x) { 0.7 - 1.25*((x - 1)^2 - 0.4)^2 } f - function(x) { 0.2 - 1.5*((x - 1)^2 - 0.1)^2 } #plot

Re: [R] While loop working with TRUE/FALSE?

2012-02-01 Thread Berend Hasselman
On 01-02-2012, at 17:32, Chris82 wrote: Thanks to both. This is just a simple example. In real I have two vectors with different lengths. The code consists of two for loops for r and z. The main problem is the computational time, so I try to stop the loop if w is TRUE for the first

[R] Simulation confidence interval

2012-02-01 Thread Scott Raynaud
The follwing is a code snippet from a power simulation program that I'm using:   estbeta-fixef(fitmodel)  sdebeta-sqrt(diag(vcov(fitmodel)))   for(l in 1:betasize)   {     cibeta-estbeta[l]-sgnbeta[l]*z1score*sdebeta[l]     if(beta[l]*cibeta0)  powaprox[[l]]-powaprox[[l]]+1  

[R] problem working directory WinBUGS using R

2012-02-01 Thread Pauline Pantoja
Hi, I am trying to use WinBUGS using R, but i am having some problems using bugs function: out - bugs(data = win.data, inits = inits, parameters.to.save = params, model.file = model.txt, n.thin = nt, n.chains = nc, n.burnin = nb, n.iter = ni, debug = TRUE, DIC = TRUE, working.directory =

Re: [R] how to unzip files in R

2012-02-01 Thread ql16717
Hi Henrik, That is exactly what I was looking for. I worked great. Many thanks. By the way it doesn't seem to be able to do batch mode. I guess I will have to iterate through. But thats ok. John On 1/31/12, Henrik Bengtsson h...@biostat.ucsf.edu wrote: I may be wrong, but I don't think unz()

Re: [R] Problem with xtable- rescaling a table

2012-02-01 Thread Aurélien PHILIPPOT
Thanks Ista. Your suggestion works. When I make the option floating=F, the caption no longer appears in the Tex code generated by xtable. If I had \caption {Title} in the code, it does not seem to work. \documentclass[11pt]{report} \usepackage{rotating} %\usepackage[counterclockwise]{rotating}

Re: [R] Generate data - function

2012-02-01 Thread Val
Hi Petr, Thank you very much . I will let you know my progress! Do you think that sampling from the traingular distribution will also be good enough? Will it provides similar results? Val On Wed, Feb 1, 2012 at 12:48 PM, Petr Savicky savi...@cs.cas.cz wrote: On Wed, Feb 01, 2012 at

[R] Function to compute multi-response, multi-rater kappa?

2012-02-01 Thread Luk Arbuckle
I'm looking for a function in R that extends kappa to multiple raters when there is more than one response per subject. For example, say a group of doctors have to assign diseases to patients. Each patient will be assigned one to many diseases, and the number of doctors assigning diseases to any

Re: [R] package sampling, function strata

2012-02-01 Thread Thomas Lumley
On Wed, Feb 1, 2012 at 11:18 PM, Elena Guijarro elena.guija...@vi.ieo.es wrote: Dear all, I have to select 122 stratified random samples from a population of  3900 cells. I have 41 strata and I  have to draw a different number of samples from them(between 2 and 8). I have tried to apply the

[R] ADVERT: two courses in R programming

2012-02-01 Thread Thomas Lumley
Ken Rice and I will give a course on advanced R programming in two locations this summer. 1. In Edinburgh, June 13-15 (the week before the International Conference in Quantitative Genetics). See http://www.eisg2012.org.uk/ 2. In Seattle, July 23-25, as part of the Summer Institute in Statistical

Re: [R] problem working directory WinBUGS using R

2012-02-01 Thread Uwe Ligges
On 01.02.2012 18:43, Pauline Pantoja wrote: Hi, I am trying to use WinBUGS using R, but i am having some problems using bugs function: out- bugs(data = win.data, inits = inits, parameters.to.save = params, model.file = model.txt, n.thin = nt, n.chains = nc, n.burnin = nb, n.iter = ni,

[R] AutoRegression with Subset of Lags/Coefficients

2012-02-01 Thread David Esp
Hi, In order to produce an autoregression where only certain lags are allowed, specified in advance (e.g. c(1,2,5) ), I have found it necessary to look beyond the standard [ar] function, thankfully discovering the [FitAR] package, wherein the [FitARp] function provided exactly that capability.

[R] how can i calculate the mean of my data which is only bigger than 75?

2012-02-01 Thread Yakamu Yakamu
hi, I have a dataset with more than 15000 data and would like to calculate the mean for only those that is bigger than and equal to 75 for all variables (x,y,z1,z2,u,v,w z1 and z2). my dataset is (for example) as follows : x y z1 z2 u v w1 w2 95 83 57 50 59 39 90 48 100 92 83 82 93 92 50 50 39

[R] ggplot2(0.9.0): could not find function ==

2012-02-01 Thread J Toll
Hi, I have a question related to the newest version of ggplot2 (0.9.0). I just updated this morning and from CRAN it looks like the Mac version is the only one at 0.9.0 as of right now. http://cran.r-project.org/web/packages/ggplot2/index.html Anyway, I was in the midst of a project where I

Re: [R] Function to compute multi-response, multi-rater kappa?

2012-02-01 Thread Luk Arbuckle
I'm very sorry for double posting! My r-help setting Receive your own posts to the list? is set to Yes, and Mail delivery is Enabled. Yet I did not get a copy of my post (this message is a reply from my sent mail). I only learned of the double posting when I found it copied in an r-help

Re: [R] how can i calculate the mean of my data which is only bigger than 75?

2012-02-01 Thread R. Michael Weylandt
I'm not entirely sure what you mean, but it's likely one of these: apply(data, 2, function(x) mean(x[x75])) mean(data[ apply(data,1, function(x) all(x 75), ]) mean(data[data75]) Three questions to give more concrete help: i) Is your data set stored as a matrix or a data.frame ii) What are you

Re: [R] Function to compute multi-response, multi-rater kappa?

2012-02-01 Thread David Winsemius
On Feb 1, 2012, at 3:13 PM, Luk Arbuckle wrote: I'm very sorry for double posting! My r-help setting Receive your own posts to the list? is set to Yes, and Mail delivery is Enabled. Yet I did not get a copy of my post (this message is a reply from my sent mail). I only learned of the

[R] Post-hoc test on ANCOVA

2012-02-01 Thread Mark Na
Dear R-helpers, I have an ANCOVA with a significant effect of the factor, which has three levels. I wish to determine which of the levels are different from each other but, because my model was fitted with lm(), I cannot use TukeyHSD. For some reason, I get different results (no significant

Re: [R] Function to compute multi-response, multi-rater kappa?

2012-02-01 Thread Luk Arbuckle
Thanks David, but those are not multi-response versions of the kappa. Extensions to multiple raters are common and well known. I am hoping someone familiar with multiple response extensions of kappa might see my post and be able to help. As I said, my search on cran has failed. I tried all the

Re: [R] Function to compute multi-response, multi-rater kappa?

2012-02-01 Thread David Winsemius
Searching on multiple raters attributes at the same site brings up http://finzi.psych.upenn.edu/R/library/smacof/doc/smacof.pdf (by Jan De Leeuw) Which has as one example multiple raters scoring different breads. On Feb 1, 2012, at 4:41 PM, Luk Arbuckle wrote: Thanks David, but

Re: [R] Post-hoc test on ANCOVA

2012-02-01 Thread David Winsemius
On Feb 1, 2012, at 4:34 PM, Mark Na wrote: Dear R-helpers, I have an ANCOVA with a significant effect of the factor, which has three levels. I wish to determine which of the levels are different from each other but, because my model was fitted with lm(), I cannot use TukeyHSD. For some

[R] Combining month and year into a single variable

2012-02-01 Thread Sam Albers
Hello all, ## I am trying to convert some year and month data into a single variable that has a date format so I can plot a proper x axis. ## I've made a few tries at this and search around but I haven't found anything. I am looking for something of the format %Y-%m ## A data.frame df -

[R] R-squared, how can I do to put this in a vector?

2012-02-01 Thread Botrel
I'm needing to remove the R-squared , and put this in a vector. It's the same that I do with the Beta or alfa in a linear regression: beta - vector() ## beta for (i in 1:ncol(ret)){ beta[i] - summary(lm((ret[,i] - ret.selic.ibov[,1]) ~ rmrf[,1] + max[,1]))*$coef[[2]]* } So, I need

[R] X11 error while plotting in R on OSX

2012-02-01 Thread Yasir Suhail
I installed R 2.14.1 on a OSX 10.7.2 computer using MacPorts. If I fire up R on a terminal, this very simple session gives me errors. I attach sessionInfo() details as well. In addition to the warnings, I also do not get any plots on the X11 window after the warnings. So one cannot just ignore the

Re: [R] R-squared, how can I do to put this in a vector?

2012-02-01 Thread R. Michael Weylandt
?summary.lm suggests that you can use $r.squared or $adj.r.squared. (Look under value) Two style notes: preallocate your beta vector (don't grow it dynamically like you are doing now) and it's generally a little safer to use summary()[[r.squared]] than the dollar sign notation. (Though it

Re: [R] Combining month and year into a single variable

2012-02-01 Thread Gabor Grothendieck
On Wed, Feb 1, 2012 at 5:26 PM, Sam Albers tonightstheni...@gmail.com wrote: Hello all, ## I am trying to convert some year and month data into a single variable that has a date format so I can plot a proper x axis. ## I've made a few tries at this and search around but I haven't found

Re: [R] problem in fitting model in NLS function

2012-02-01 Thread Rolf Turner
I am no expert on nls() but since I haven't seen any replies to your post, I'll chip in: (1) I am mystified as to why nls() is giving that error about a singular (???) gradient. (2) That being said, I think your parameterisation of the objective function is a bit flaky. I would use

[R] knncat broken on R 2.14?

2012-02-01 Thread Nick Matzke
Hi, Until recently I was using the knncat classifier function of knncat on an old computer (2.12, Mac OS X 10.4), and everything worked great. However, now that I have updated to R 2.14.1 (on Mac OS X 10.7), knncat seems broken. Problems: 1. It seems to output verbose output by default,

[R] Problem with range()

2012-02-01 Thread Colin Wahl
Hello, I'm using range do define boundaries for a linear model, so the line I graph is only graphed for the range of data. There are NAs in the data, but I dont remember this being a problem before. I typed na.action=na.omit anyway, which has usually solved any NA issues in the past. Any idea why

Re: [R] mgcv bam() with grouped binomial data

2012-02-01 Thread Casey Olives
Hi Simon, Thanks for your response. I am now running mgcv 1.7-13 on R-2.14. Having fixed this error, I now encounter the following when fitting this model Error in qr.qty(qrx, yn) : 'qr' and 'y' must have the same number of rows Calls: bam - bgam.fit - qr.update - qr.qty - qr.qty

[R] Problem with GMT+/- time zones

2012-02-01 Thread Andrew Digby
I'm struggling with time zone version when expressed as hours offset from GMT. Can anyone confirm that the behaviour below is incorrect? It seems that the GMT offsets are backwards: format(as.POSIXct(2011-05-23 17:23:00, tz=Europe/London),tz=America/New_York,usetz=T) [1] 2011-05-23 12:23:00

Re: [R] Problem with range()

2012-02-01 Thread Sarah Goslee
Hi Colin, You should always check the help for your function: ?range says: range(..., na.rm = FALSE) Arguments: ...: any ‘numeric’ or character objects. na.rm: logical, indicating if ‘NA’'s should be omitted. So for example: x - c(1, 2, NA, 3) range(x) [1] NA NA range(x,

Re: [R] Problem with range()

2012-02-01 Thread William Dunlap
range() is not affected by by options(na.action). Use the argument na.rm=TRUE. For plotting purposes finite=TRUE is nice, as it skips +-Inf as well. range(c(NA, 1, 2, Inf)) [1] NA NA range(c(NA, 1, 2, Inf), na.rm=TRUE) [1] 1 Inf range(c(NA, 1, 2, Inf), finite=TRUE) [1] 1 2

[R] Stuck with levels while reassigning dataframe colnames?

2012-02-01 Thread jjap
Dear users, I am importing a csv file whose first row is a single value that I need to capture in a variable. infile-file.choose() in-read.csv( infile, header=FALSE) single.value-as.character(in[1,1]) # fine Now I need to take rows 3 and on as the data df-in[3:dim(in)[1],] But row 2

Re: [R] Function to compute multi-response, multi-rater kappa?

2012-02-01 Thread Luk Arbuckle
Although interesting, Dave, this doesn't fit my problem. I want to measure the percentage agreement corrected for chance using an extension of kappa. The example data presented in the paper you linked to is considering an ordinal measure (ranked preference), whereas I'm looking to measure

Re: [R] ggplot2(0.9.0): could not find function ==

2012-02-01 Thread Hadley Wickham
Hi James, There were a few problems with the 0.9.0 version, which is why it was pulled from CRAN. I'd recommend re-installing 0.8.9: install.packages(ggplot2, type = source) Hadley On Wed, Feb 1, 2012 at 2:10 PM, J Toll jct...@gmail.com wrote: Hi, I have a question related to the newest

Re: [R] Stuck with levels while reassigning dataframe colnames?

2012-02-01 Thread David Winsemius
On Feb 1, 2012, at 10:21 PM, jjap wrote: Dear users, I am importing a csv file whose first row is a single value that I need to capture in a variable. infile-file.choose() in-read.csv( infile, header=FALSE) single.value-as.character(in[1,1]) # fine Now I need to take rows 3 and on as

Re: [R] ggplot2(0.9.0): could not find function ==

2012-02-01 Thread J Toll
On Wed, Feb 1, 2012 at 9:48 PM, Hadley Wickham had...@rice.edu wrote: Hi James, There were a few problems with the 0.9.0 version, which is why it was pulled from CRAN.  I'd recommend re-installing 0.8.9: install.packages(ggplot2, type = source) Hadley Hadley, Thanks for your reply. I

[R] sqldf for Very Large Tab Delimited Files

2012-02-01 Thread HC
Hi All, I have a very (very) large tab-delimited text file without headers. There are only 8 columns and millions of rows. I want to make numerous pieces of this file by sub-setting it for individual stations. Station is given as in the first column. I am trying to learn and use sqldf package for

[R] shifted bar chart / battleship curve

2012-02-01 Thread Maltese, Adam Vincent
What I want to do is create a horizontal bar chart matrix for a set of data that have a common set of variables (e.g., % of As, % of Bs, etc.) listed on the Y-axis and groups (e.g., Classes) on the X-axis. The key here is that the bars for each individual class plot are centered rather than

Re: [R] gee: suppress printout

2012-02-01 Thread Ginata86
I am using the method to sink the output. However, it can only suppress 'user's initial regression estimate ' and still display the following sentence ' Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27' I am just wondering is there any way that we can also suppress this one? Because I

[R] How to get intersection of multiple vectors?

2012-02-01 Thread 孟欣
v1-c(a,b,c,d) v2-c(a,b,e) v3-c(a,f,g) I want to get the intersection of v1,v2,v3,ie a How can I do then? What I know is only for 2 vectors via intersect function,but don't know how to deal with multiple vectors. Many thanks [[alternative HTML version deleted]]

Re: [R] Problem with GMT+/- time zones

2012-02-01 Thread Jeff Newmiller
Should has nothing to do with it. That is the way the Olsen tz database works. See en.wikipedia.org/wiki/Tz_database. --- Jeff NewmillerThe . . Go Live...