[R] fgev_error_matrix_singular

2011-01-16 Thread Jinrui Xu
Hello everyone, I am using fgev from evd package to fitting my data with general extreme value distribution. The command I used is simple: y - fgev(x). The error is observed information matrix is singular; How can I solve these problem. I tried all methods in optim and it did not work. I

[R] Displaying ylab in mfrow

2011-01-16 Thread Kumar Mainali
Dear R users, I cannot display ylab with the following code while trying to stack 7 rows of 3 histograms each. Thanks in advance! par(mfrow=c(7,3)) par(mar=c(2,2,2,2)) par(oma=c(5,5,0,0)) with (newdata - subset(table, Month1 == 1), hist(newdata$CarapWid, breaks=5*(0:80), col=gray80, main=All

[R] bootstrap data frame

2011-01-16 Thread Lori
Is it possible to simultaneously bootstrap the mean of multiple vectors (columns) in a dataframe producing a  matrix where each row provides the mean for each vector for a given bootstrap sample?  Thank you for any assistance possible. KAM [[alternative HTML version

[R] Questions about nonparametric bootstrap

2011-01-16 Thread ying_chen wang
Dear friends: Any of you know how to do nonparametric bootstrapping on the smoothed frequency (2nd column in the table) ? For example, after smoothing is done, I have the following data in the table. Smoothed=smoothed frequency. I found some options with no clear examples. Options include

[R] how to add a derived column to a data frame?

2011-01-16 Thread r-help
I have a data frame with 10 columns: A:J and I want to have the output as a data frame with 11 columns, the value of 11th column is£º for each row, if any column can be divided by 13, then the 11th column has a values of 1, otherwise, it has a value of 0. How to do that? input is

Re: [R] Random Effects Meta Regression

2011-01-16 Thread s306
Thank you Mike - that has worked brilliantly. I have one further question that I was hoping someone on the forum may be able to help with. For most of my meta regressions I am interested in the impact of a one unit increase in the explanatory variable, however for one I want to estimate the

[R] data prep question

2011-01-16 Thread Matthew Strother
I have a data set with several thousand observations across time, grouped by subject (example format below) ID TIMEOBS 001 220023 001 240011 001 320010 001 450022 003

[R] Time and xts

2011-01-16 Thread rnick
Hi all, I have run into a problem and some help would be highly appreciated. I have a .csv with the following columns: DateTimeOpenHighLow Close 1/2/200517:05 1.3546 1.3553 1.3546 1.35495 1/2/200517:10 1.3553 1.3556 1.3549 1.35525 1/2/2005

Re: [R] how to add a derived column to a data frame?

2011-01-16 Thread Petr Savicky
On Sun, Jan 16, 2011 at 03:01:49PM +0800, r-help wrote: I have a data frame with 10 columns: A:J and I want to have the output as a data frame with 11 columns, the value of 11th column is?? for each row, if any column can be divided by 13, then the 11th column has a values of 1,

Re: [R] Time and xts

2011-01-16 Thread robert denham
Assuming your csv file looks like: Date,Time,Open,High,Low,Close 1/2/2005,17:05,1.3546,1.3553,1.3546,1.35495 1/2/2005,17:10,1.3553,1.3556,1.3549,1.35525 1/2/2005,17:15,1.3556,1.3556,1.35515,1.3553 1/2/2005,17:25,1.355,1.3556,1.355,1.3555 You could do something like: aa -

[R] \examples{} in Rd file

2011-01-16 Thread Adelchi Azzalini
[Hope this is the right list where to send...] An attempt to update package 'mnormt' involves the addition of a small new function called 'pd.solve'. When I come to the package checking stage, an error occurs in parsing pd.solve.Rd. The full transcript of the outcome is copied below (it

Re: [R] Displaying ylab in mfrow

2011-01-16 Thread Peter Ehlers
On 2011-01-15 18:54, Kumar Mainali wrote: Dear R users, I cannot display ylab with the following code while trying to stack 7 rows of 3 histograms each. Thanks in advance! par(mfrow=c(7,3)) par(mar=c(2,2,2,2)) par(oma=c(5,5,0,0)) with (newdata- subset(table, Month1 == 1),

Re: [R] \examples{} in Rd file

2011-01-16 Thread Peter Ehlers
Adelchi, Since % is the LaTeX comment character, you may want to try escaping it. Peter Ehlers On 2011-01-16 02:35, Adelchi Azzalini wrote: [Hope this is the right list where to send...] An attempt to update package 'mnormt' involves the addition of a small new function called 'pd.solve'.

Re: [R] data prep question

2011-01-16 Thread Bill.Venables
Here is one way Here is one way: con - textConnection( + ID TIMEOBS + 001 220023 + 001 240011 + 001 320010 + 001 450022 + 003 3900 45 + 003 5605

[R] problem installing rgdal

2011-01-16 Thread alessandro.sarre...@inwind.it
Dear R experts, I'm trying to install rgdal in my R 2.11.1 (Ubuntu 10.10). I have as an ouput the following messages. It seems that there are problems with libgdal1.7.0 or sqlite3... Could someboby help me? Thanks a lot! Ale install.packages() Warning in install.packages() : argument 'lib' is

[R] rootogram for normal distributions

2011-01-16 Thread Hugo Mildenberger
Using R-2.12.1 and latticeExtra-0.6-14, I would like to understand why a rootogram displaying samples from the Poisson distribution looks like I expected it, whereas a rootogram using the normal distribution does not: library(latticeExtra) rootogram(~rpois(1000, lambda = 50), dfun = function(x)

Re: [R] how to add a derived column to a data frame?

2011-01-16 Thread Petr Savicky
On Sun, Jan 16, 2011 at 03:01:49PM +0800, r-help wrote: I have a data frame with 10 columns: A:J and I want to have the output as a data frame with 11 columns, the value of 11th column is?? for each row, if any column can be divided by 13, then the 11th column has a values of 1,

[R] Help in Coxme

2011-01-16 Thread Nelson Martins
I am a relative newbie to survival analysis and R in general, but would like to use the coxme package to analyse some data I currently have. The data is relative to survival times of drosophila melanogaster populations to infection with pathogens, and has the variables: Time, Status, Treatment (4

Re: [R] \examples{} in Rd file

2011-01-16 Thread Prof Brian Ripley
On Sun, 16 Jan 2011, Peter Ehlers wrote: Adelchi, Since % is the LaTeX comment character, you may want to try escaping it. As package 'base' does at https://svn.r-project.org/R/trunk/src/library/base/man/matmult.Rd Peter Ehlers On 2011-01-16 02:35, Adelchi Azzalini wrote: [Hope this is

Re: [R] Time and xts

2011-01-16 Thread Gabor Grothendieck
On Sat, Jan 15, 2011 at 11:20 PM, rnick nikos.rachma...@gmail.com wrote: Hi all, I have run into a problem and some help would be highly appreciated. I have a .csv with the following columns: Date    Time    Open    High    Low     Close 1/2/2005        17:05   1.3546  1.3553  1.3546  

Re: [R] problem installing rgdal

2011-01-16 Thread Prof Brian Ripley
On Sun, 16 Jan 2011, alessandro.sarre...@inwind.it wrote: Dear R experts, I'm trying to install rgdal in my R 2.11.1 (Ubuntu 10.10). I have as an ouput the following messages. It seems that there are problems with libgdal1.7.0 or sqlite3... Could someboby help me? You would do better to ask

[R] Hausman Test

2011-01-16 Thread Holger Steinmetz
Hi, can anybody tell me how the Hausman test for endogenty works? I have a simulated model with three correlated predictors (X1-X3). I also have an instrument W for X1 Now I want to test for endogeneity of X1 (i.e., when I omit X2 and X3 from the equation). My current approach:

Re: [R] fgev_error_matrix_singular

2011-01-16 Thread Uwe Ligges
See ?try in order to get the automated process going and for ignoring or separately post-processing stuff where the method does not work. Uwe Ligges On 15.01.2011 21:48, Jinrui Xu wrote: Hello everyone, I am using fgev from evd package to fitting my data with general extreme value

[R] transform a df with a condition

2011-01-16 Thread Patrick Hausmann
Dear all, for each A == 3 in 'df' I would like to change the variables B and K. My result should be the whole df and not the subset (A==3)... df - data.frame(A = c(1,1,3,2,2,3,3), B = c(2,1,1,2,7,8,7), K = c(a.1, d.2, f.3, a.1, k.4, f.9,

Re: [R] transform a df with a condition

2011-01-16 Thread Patrick Hausmann
Arrg, sorry - of course I don't want *new* variables. So this is my correct example: df - data.frame(A = c(1,1,3,2,2,3,3), B = c(2,1,1,2,7,8,7), K = c(a.1, d.2, f.3, a.1, k.4, f.9, f.5)) x1 - within(df[df$A ==3, ], { B - 5

Re: [R] rootogram for normal distributions

2011-01-16 Thread Achim Zeileis
On Sun, 16 Jan 2011, Hugo Mildenberger wrote: Using R-2.12.1 and latticeExtra-0.6-14, I would like to understand why a rootogram displaying samples from the Poisson distribution looks like I expected it, whereas a rootogram using the normal distribution does not: library(latticeExtra)

Re: [R] Hausman Test

2011-01-16 Thread Achim Zeileis
On Sun, 16 Jan 2011, Holger Steinmetz wrote: Hi, can anybody tell me how the Hausman test for endogenty works? I have a simulated model with three correlated predictors (X1-X3). I also have an instrument W for X1 Now I want to test for endogeneity of X1 (i.e., when I omit X2 and X3 from the

Re: [R] rootogram for normal distributions

2011-01-16 Thread Hadley Wickham
The normal distribution is a continuous distribution, i.e., the frequency for each observed value will essentially be 1/n and not converge to the density function. Hence, you would need to look at histogram or smoothed densities. Rootograms, on the other hand, are intended for discrete

Re: [R] transform a df with a condition

2011-01-16 Thread Henrique Dallazuanna
Try this: df[df$A == 3, c('B', 'K')] - with(df[df$A == 3, c('B', 'K')], cbind(5, gsub(f, m, K))) On Sun, Jan 16, 2011 at 12:19 PM, Patrick Hausmann patrick.hausm...@uni-bremen.de wrote: Arrg, sorry - of course I don't want *new* variables. So this is my correct example: df - data.frame(A

Re: [R] Hausman Test

2011-01-16 Thread Holger Steinmetz
Dear Achim, thank you very much. One follow up question. The Hausman-test always gives me a p-value of 1 - no matter how small the statistic is. I now generated orthogonal regressors (X1-X3) and the test gives me Hausman specification test for consistency of the 3SLS estimation

Re: [R] transform a df with a condition

2011-01-16 Thread Duncan Murdoch
On 16/01/2011 9:13 AM, Patrick Hausmann wrote: Dear all, for each A == 3 in 'df' I would like to change the variables B and K. My result should be the whole df and not the subset (A==3)... df- data.frame(A = c(1,1,3,2,2,3,3), B = c(2,1,1,2,7,8,7), K =

Re: [R] rootogram for normal distributions

2011-01-16 Thread Achim Zeileis
On Sun, 16 Jan 2011, Hadley Wickham wrote: The normal distribution is a continuous distribution, i.e., the frequency for each observed value will essentially be 1/n and not converge to the density function. Hence, you would need to look at histogram or smoothed densities. Rootograms, on the

Re: [R] data prep question

2011-01-16 Thread Gabor Grothendieck
On Sat, Jan 15, 2011 at 4:26 PM, Matthew Strother rstro...@gmail.com wrote: I have a data set with several thousand observations across time, grouped by subject (example format below) ID              TIME    OBS 001             2200    23 001             2400    11 001             3200    

Re: [R] Hausman Test

2011-01-16 Thread Arne Henningsen
Hi Holger! On 16 January 2011 15:53, Holger Steinmetz holger.steinm...@web.de wrote: One follow up question. The Hausman-test always gives me a p-value of 1 - no matter how small the statistic is. I now generated orthogonal regressors (X1-X3) and the test gives me        Hausman

Re: [R] Hausman Test

2011-01-16 Thread Achim Zeileis
On Sun, 16 Jan 2011, Holger Steinmetz wrote: Dear Achim, thank you very much. One follow up question. The Hausman-test always gives me a p-value of 1 - no matter how small the statistic is. I now generated orthogonal regressors (X1-X3) and the test gives me Hausman specification

Re: [R] Hausman Test

2011-01-16 Thread Achim Zeileis
On Sun, 16 Jan 2011, Arne Henningsen wrote: Hi Holger! On 16 January 2011 15:53, Holger Steinmetz holger.steinm...@web.de wrote: One follow up question. The Hausman-test always gives me a p-value of 1 - no matter how small the statistic is. I now generated orthogonal regressors (X1-X3) and

Re: [R] holding objects in dataframes

2011-01-16 Thread Uwe Ligges
I haven't seen an answer so far, hence I try: As far as I can see, everything is correct here, since you have an element polygons in you data.frame that is a valid vector of mode list. Nevertheless, since printing /plotting etc. on the dataframe won't give desired results now, it would be

Re: [R] Hausman Test

2011-01-16 Thread Arne Henningsen
Hi Achim! On 16 January 2011 16:37, Achim Zeileis achim.zeil...@uibk.ac.at wrote: Arne: Unless I'm missing something, hausman.systemfit() essentially does the right thing and computes the right statistic and p-value (see my other mail to Holger). Maybe some preliminary check on the input

Re: [R] Hausman Test

2011-01-16 Thread Holger Steinmetz
Thank you both very much ! This helped me a lot. Best, Holger -- View this message in context: http://r.789695.n4.nabble.com/Hausman-Test-tp3220016p3220123.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] ODD ODD ODD stuff!!

2011-01-16 Thread Freddy Gamma
Egregious, look what just happened few minutes ago while opening up my program and running the scripts A-read.table(C:\\Documents and Settings\\ + me\\Desktop\\TESI\\generale.txt,head=T) Errore: non trovo la funzione read.table #CAN'T FIND read.table FUNTION!!!??? ARE WE ok???

[R] Getting Synonyms using wordnet

2011-01-16 Thread Nick
Hi All, I am trying to use the synonyms function of wordnet. If I try for example synonyms(happy), it returns character(0). But if i start up the program wordnet, happy is part of the database. And if I try for example: synonyms(company) it returns: c(\caller\, \company\)

[R] xyplot: modify axis tick marks

2011-01-16 Thread Kang Min
Hi, I would like to plot time against rainfall data (data is at the end) using xyplot. The basic code looks like this: xyplot(rainfall~time, type=a) When I do this, the graph looks ok except that the x-axis has too many values. I would just like to display the years and not the months on the

Re: [R] ODD ODD ODD stuff!!

2011-01-16 Thread Sarah Goslee
Well, how about some information: What version of Windows are you running? What version of R are you running? How did you start R? Did you load an existing Rdata file? Are you using one of the GUIs, or piping through an editor? What happens if you start a clean session of R without any add-ons?

Re: [R] xyplot: modify axis tick marks

2011-01-16 Thread Dennis Murphy
Hi: Try this, since your data have no missing months: rainfall$Time - seq(from = as.Date('1993-01-01'), to = as.Date('2007-12-01'), by = 'month') g - ggplot(rainfall, aes(x = Time, y = rainfall)) g + geom_path() HTH, Dennis On Sun, Jan 16, 2011 at 5:01 AM, Kang Min ngokang...@gmail.com wrote:

Re: [R] Random Effects Meta Regression

2011-01-16 Thread Viechtbauer Wolfgang (STAT)
If b is the coefficient from the meta-regression model that indicates the (average) change in the outcome measure for a one-unit increase in the corresponding explanatory variable, then 5*b is the (average) change in the outcome measure for a 5-unit increase in the explanatory variable. Or

Re: [R] ODD ODD ODD stuff!!

2011-01-16 Thread Jim Holtman
Type 'search()' to see what is on the search path to see if anything is missing. Also try 'apropos('read')' to see if there are other functions containing 'read' Sent from my iPhone What is the problem you are trying to solve? On Jan 16, 2011, at 8:49, Freddy Gamma freddy.ga...@gmail.com

Re: [R] data prep question

2011-01-16 Thread rstrothe
thanks so much - that did it. I am new to this - so the help is greatly appreciated. Matthew -- View this message in context: http://r.789695.n4.nabble.com/data-prep-question-tp3219824p3220026.html Sent from the R help mailing list archive at Nabble.com.

[R] grid.table with head of two rows

2011-01-16 Thread victor
Hi all, I try to print a table with the grid.draw(tableGrob(...)) function applied to an ftable object. The output only give me a table without colnames either rownames, but with edit.grid() I can add only one of them. And this is the problem, I have a table with a two rows head, like this:

Re: [R] xyplot: modify axis tick marks

2011-01-16 Thread Gabor Grothendieck
On Sun, Jan 16, 2011 at 8:01 AM, Kang Min ngokang...@gmail.com wrote: Hi, I would like to plot time against rainfall data (data is at the end) using xyplot. The basic code looks like this: xyplot(rainfall~time, type=a) When I do this, the graph looks ok except that the x-axis has too many

Re: [R] data prep question

2011-01-16 Thread Hadley Wickham
On Sun, Jan 16, 2011 at 5:48 AM, bill.venab...@csiro.au wrote: Here is one way Here is one way: con - textConnection( + ID              TIME    OBS + 001             2200    23 + 001             2400    11 + 001             3200    10 + 001             4500    22 + 003             3900

Re: [R] xyplot: modify axis tick marks

2011-01-16 Thread Dennis Murphy
Hi: Arggh, it's too early in my morning...apologies. With the same adjustment to the data frame as given previously, this 'works': xyplot(rainfall ~ Time, data = rainfall, type = 'l') Gabor's solution is nice because it gives you more control over the date format and the zoo plot method works

Re: [R] xyplot: modify axis tick marks

2011-01-16 Thread Hugo Mildenberger
Using lattice and the rainfall$Time series as proposed below by Dennis gives also a nice result: rainfall$Time - seq(from = as.Date('1993-01-01'), to = as.Date('2007-12-01'), by = 'month') xyplot(rainfall~Time,data=rainfall,type=c(g,p,l,smooth)) On Sunday

[R] Memory issues

2011-01-16 Thread Emmanuel Bellity
Hi, I have read several threads about memory issues in R and I can't seem to find a solution to my problem. I am running a sort of LASSO regression on several subsets of a big dataset. For some subsets it works well, and for some bigger subsets it does not work, with errors of type cannot

[R] Please ask R questions on StackOverflow.com

2011-01-16 Thread Prasad Chalasani
I am not sure if this type of posting is allowed, but I'm sure many fellow R enthusiasts will agree with me on this: I want to encourage everyone with any type of R-related question, to post it on StackOverflow.com, tagged with the keyword r, for the following reasons: 1. There are many R

Re: [R] Help in Coxme

2011-01-16 Thread Nelson Martins
Thank you for the informations, especially for the cumhaz tip. I'll explain a bit more of my experimental design: I have 4 different replicate populations of drosophila, from which I take samples to infect, in 5 independent replicates (tubes) of 10 individuals each. That makes 200 individuals per

Re: [R] rootogram for normal distributions

2011-01-16 Thread Hugo Mildenberger
Thank you very much for your qualified answers, and also for the link to the Tukey paper. I appreciate Tukey's writings very much. Looking at the lattice code (below), a possible implementation might involve binning, not so? I see a problematic part here: xx - sort(unique(x)) Unique

[R] a remove question

2011-01-16 Thread Erin Hodgess
Dear R People: I have the following: ls(pattern=NY*) [1] CRAN_df CRAN_df0 CRAN_df1 CRAN_mat CRAN_sp [6] CRAN_spdf1 CRAN_spdf2 CRAN_spdf4 delauney_NY dist2_NY [11] dist3_NY Gabriel_NY NY8a_nb rel_neigh_NY scot_BNG [16] SOI_NY rm(pattern=NY*) Warning message:

Re: [R] a remove question

2011-01-16 Thread David Winsemius
On Jan 16, 2011, at 4:08 PM, Erin Hodgess wrote: Dear R People: I have the following: ls(pattern=NY*) [1] CRAN_df CRAN_df0 CRAN_df1 CRAN_mat CRAN_sp [6] CRAN_spdf1 CRAN_spdf2 CRAN_spdf4 delauney_NY dist2_NY [11] dist3_NY Gabriel_NY NY8a_nb rel_neigh_NY

Re: [R] a remove question

2011-01-16 Thread Joshua Wiley
On Sun, Jan 16, 2011 at 1:08 PM, Erin Hodgess erinm.hodg...@gmail.com wrote: Dear R People: I have the following: ls(pattern=NY*)  [1] CRAN_df      CRAN_df0     CRAN_df1     CRAN_mat     CRAN_sp  [6] CRAN_spdf1   CRAN_spdf2   CRAN_spdf4   delauney_NY  dist2_NY [11] dist3_NY     Gabriel_NY  

Re: [R] a remove question

2011-01-16 Thread David Winsemius
On Jan 16, 2011, at 4:17 PM, David Winsemius wrote: On Jan 16, 2011, at 4:08 PM, Erin Hodgess wrote: Dear R People: I have the following: ls(pattern=NY*) [1] CRAN_df CRAN_df0 CRAN_df1 CRAN_mat CRAN_sp [6] CRAN_spdf1 CRAN_spdf2 CRAN_spdf4 delauney_NY dist2_NY

Re: [R] a remove question

2011-01-16 Thread Hugo Mildenberger
How about ls(pattern=NY) #rm(list=ls(pattern=NY)) On Sunday 16 January 2011 22:08:16 Erin Hodgess wrote: Dear R People: I have the following: ls(pattern=NY*) [1] CRAN_df CRAN_df0 CRAN_df1 CRAN_mat CRAN_sp [6] CRAN_spdf1 CRAN_spdf2 CRAN_spdf4

[R] Computing and Finding

2011-01-16 Thread ufuk beyaztas
Hi dear all, i am triying to do jackknife-after bootstrap for detection of influential observation. my data and resamples are following ; e - rnorm(n=50, mean=0, sd=sqrt(0.5625)) x0 - c(rep(1,50)) x1 - rnorm(n=50,mean=2,sd=1) x2 - rnorm(n=50,mean=2,sd=1) x3 - rnorm(n=50,mean=2,sd=1) x4 -

[R] WORK AREA TO SAVE

2011-01-16 Thread Barbara . Rogo
I have lost the work of 2 days for problems to my pc. Can I get back it? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] WORK AREA TO SAVE

2011-01-16 Thread Duncan Murdoch
On 11-01-16 5:32 PM, barbara.r...@uniroma1.it wrote: I have lost the work of 2 days for problems to my pc. Can I get back it? Probably not unless you explicitly saved it to disk. R doesn't do automatic backups for you. Duncan Murdoch __

Re: [R] a remove question

2011-01-16 Thread Pete Brecknock
or rm(list=ls(pattern=^NY)) if you only want those objects that begin with NY ... HTH Pete -- View this message in context: http://r.789695.n4.nabble.com/a-remove-question-tp3220411p3220562.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Memory issues

2011-01-16 Thread Chris Howden
Hi Emmanuel, Try the following: 1) removing unnecessary programs from memory, this might give u a larger contiguous memory block for R 2) remove unnecessary data from R's memory, so many of the preceding data sets U no longer need can be removed. use the rm() command. U might need to run gc()

Re: [R] how to calculate the consistency of different clusterings

2011-01-16 Thread Michael Bedward
Hello, I've been waiting to see if anyone else would answer this. I've previously used random reallocation of objects to groups (clusters) as a monte-carlo test of the informativeness of groups, as described here:

Re: [R] ODD ODD ODD stuff!!

2011-01-16 Thread Sarah Goslee
That's possible, but without knowing exactly what you did I really can't say for certain what went wrong. I'm glad you've got it working. Sarah On Sun, Jan 16, 2011 at 8:06 PM, Freddy Gamma freddy.ga...@gmail.com wrote: Well, how about some information: What version of Windows are you

Re: [R] rootogram for normal distributions

2011-01-16 Thread Deepayan Sarkar
On Sun, Jan 16, 2011 at 11:58 AM, Hugo Mildenberger hugo.mildenber...@web.de wrote: Thank you very much for your qualified answers, and also for the link to the Tukey paper. I appreciate Tukey's writings very much. Yes, thanks to Hadley for the nice reference, I hadn't seen it before. Looking

[R] effects packages for mixed model?

2011-01-16 Thread array chip
Hi, I am wondering if there is a similar effects package for mixed models, just like what effects package does for linear, generalized linear models? Specifically I am looking for a way to calculate the SAS-co-called least squared means (LS means) in mixed models (I understand there is a

[R] Using summaryBy with weighted data

2011-01-16 Thread Solomon Messing
Dear Soren and R users: I am trying to use the summaryBy function with weights. Is this possible? An example that illustrates what I am trying to do follows: library(doBy) ## make up some data response = rnorm(100) group = c(rep(1,20), rep(2,20), rep(3,20), rep(4,20), rep(5,20))

Re: [R] Using summaryBy with weighted data

2011-01-16 Thread Joshua Wiley
Dear Solomon, On Sun, Jan 16, 2011 at 10:27 PM, Solomon Messing solomon.mess...@gmail.com wrote: Dear Soren and R users: I am trying to use the summaryBy function with weights.  Is this possible?   An example that illustrates what I am trying to do follows: library(doBy) ## make up some

[R] Equivalent to Stata egen tag

2011-01-16 Thread Denis Kazakevich
What are the R equivalents to the Stata command egen tag and egen count? egen station_week_tag = tag(station week) Thank you __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] R looks for a folder not specified

2011-01-16 Thread l.chhay
Dear R community, I have been getting this warning message after running a function sourced from an R script, and can't seem to work out why R is looking for a folder that wasn't even specified (it attaches a \NA to the specified directory, where assess_rev has not asked to do so at all. R code

[R] data frame column name change

2011-01-16 Thread eric
How do I change the name of one column in a data frame ? Suppose I have a data frame x with 5 columns. If the names were date, col1, col2, col3, col4 and I wanted to simply change the name of date, what would the command be ? I tried the following and it didn't seem to work : names(x[1]) -

Re: [R] Selecting the first occurrence of a value after an occurrence of a different value

2011-01-16 Thread surreyj
Hello, Back again, I thought the problem was solved but I realised that the only reason I was getting the correct answer was because my data set happened to only have two rfts to choose from, so it looked correct. I have been using:

Re: [R] data frame column name change

2011-01-16 Thread Jorge Ivan Velez
Hi eric, Try colnames(x) colnames(x)[1] - 'newname' colnames(x) HTH, Jorge On Sun, Jan 16, 2011 at 11:28 PM, eric wrote: How do I change the name of one column in a data frame ? Suppose I have a data frame x with 5 columns. If the names were date, col1, col2, col3, col4 and I wanted to