Re: [R] Correct Localized Numbers on Plots, related to glibc!

2012-01-17 Thread Majid Einian
You need to read ?Sys.setlocale (surely part of the homework the R posting guide asked of you). I have read that. And I have used the standard way of changing locale to fa_IR.utf8 (i.e. using Sys.setlocale(category=LC_ALL,locale=fa_IR.utf8). Also

[R] MuMIn package, problem using model selection table from manually created list of models

2012-01-17 Thread Dunbar, Michael J.
The subject says it all really. Question 1. Here is some code created to illustrate my problem, can anyone spot where I'm going wrong? Question 2. The reason I'm following a manual specification of models relates to the fact that in reality I am using mgcv::gam, and I'm not aware that dredge

Re: [R] MuMIn package, problem using model selection table from manually created list of models

2012-01-17 Thread Kamil Bartoń
Dnieper 2012-01-17 10:51, Dunbar, Michael J. piste: The subject says it all really. Question 1. Here is some code created to illustrate my problem, can anyone spot where I'm going wrong? Question 2. The reason I'm following a manual specification of models relates to the fact that in

Re: [R] New PLYR issue

2012-01-17 Thread Gunnar Oehmichen
Hello everyone, I have got the same problem, with the same error message. Using R 2.14.1, plyr 1.7.1, R.Studio 0.94.110, Windows XP The plyr mailing list does not provide any help until now. require(plyr) c(sample(c(1:100), 50, replace=TRUE))-V1 c(rep( 1:5, 10))-f1 #variable to group V1

[R] Display numbers on map

2012-01-17 Thread Jeffrey Joh
I have a text file with states and numbers. I would like to display each number that corresponds to a state on a map. I am trying to use the maps package, but it doesn't show Alaska or Hawaii. Do you have suggestions on how to do this? Jeffrey

Re: [R] Averaging within a range of values

2012-01-17 Thread doggysaywhat
Thank you all for your help. It's working now. I chose to use the sqldf method and fn$ in the gsubfn package. I used fn$ so that I could put variables into the sqldf statement. This helped me to increase or decrease the window size in the Gene dataframe if I wanted to include values in the

Re: [R] meta-analysis normal quantile plot metafor

2012-01-17 Thread Michael Dewey
At 12:15 16/01/2012, Ricc wrote: Hello, I used the default parameters: - envelope: default is TRUE - level: the default is to take the value from the object (I do not understand this very well) When you specified your original model to rma.uni you either specified the level or let it default

Re: [R] Checking dates for entry errors

2012-01-17 Thread Thomas Mang
On 1/11/2012 11:07 PM, Paul Miller wrote: Hello Everyone, I have a question about how best to check dates for entry errors. Try using regular expression matching and the functions grep, strsplit, regexpr etc. If you are not familiar with regex: bit a bumpy road of getting into it but in the

Re: [R] meta-analysis normal quantile plot metafor

2012-01-17 Thread Ricc
@ Micheal: thanks I understand now. @ Wolfgang: apparently, using the DL-estimator solved my issue and leaded to a result with only a slight difference with metawin. thanks ! 2012/1/17 Michael Dewey i...@aghmed.fsnet.co.uk: At 12:15 16/01/2012, Ricc wrote: Hello, I used the default

[R] Error predict with lda and cross validation

2012-01-17 Thread Riccardo Romoli
Hi, I use the lda function from the MASS package to classify some samples according to some chemical properties. If I run lda without cross validation all is ok but, if I run lda with cross validation, the R consol say: resLDA - ldaRedOx - lda(Activity ~ TRedOx[,1:6], CV=TRUE,

[R] Mean of simulation runs given in a table

2012-01-17 Thread Irek Szczesniak
Hi, I have the simulation results of the following structure: run par measured 1 1012 2 1014 1 2020 2 2026 Where run is the simulation run number, par is the parameter of the simulation, and measured is the value measured in the simulation. This is only a simple

[R] r help

2012-01-17 Thread masarimk
df-data.frame( group=rep(c(a,b), c(7,6)), sales=c(3,4,6,5,1,30,8,4,6,9,10,27,9), turn_over=c(1.5, 2.9, 1.9,20.5, 2.3, 1.65, 0.06, 3.4, 3.5, 2.23, 0.1, 9.8,1.4) ) Hello all, In this data set ı need to replace the outliers with 1.5IQR for each group and for each variable so the final data set

[R] result numeric(0) when using variable1[which(variable2=max(variable2)]

2012-01-17 Thread Nerak
Dear all, I have a question about the knowing for which row I have the max value of one of my variables. I calculated the Rsquared for different columns and made a list to gather them. I unlisted this list to create a vector with this values. I want to know for which column I have the max value of

[R] visualization for k-mean clustering

2012-01-17 Thread mukul purva
hello, i want a visualization of the k-mean clustering.which one method will be best for visualization?? thnkx [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Scoring using cox model: probability of survival before time t

2012-01-17 Thread Aher
Dear Members, I required to score probability of survival before specified time using fitted cox model on scoring dataset. On the training sample data I am able to get the probability of a survival before time point(t), but on the scoring dataset, which will have only predictor information I am

Re: [R] How to loop on file names

2012-01-17 Thread Bretschneider SIG-R
Dear Hélène Genet, Re: Dear all, I need to do the same procedure on several files. But I don't know how to refer to the file name. Here is an example of what I am trying to do. List of files: file1(A,B,C, D1...Dn), file2(A,B,C,E1,...,En), file3(A,B,C,F1,...,Fn) Procedure I want

Re: [R] Saving WinBugs log file when using bugs()

2012-01-17 Thread Uwe Ligges
On 16.01.2012 18:00, chaps31 wrote: Hi The log file (not as .odc and as .txt file) is in R'd tempdir() after WinBUGS returns to R. Was this my statement? I actually meant to write *both* rather than not above. Best, Uwe Is there any way to save the .odc file? Ruth -- View this

Re: [R] net classification improvement?

2012-01-17 Thread Essers, Jonah
Thanks for the reply. I think more the issue is whether it can be applied to cross-sectional data. This I'm not sure. This method is heavily cited in the New England Journal of Medicine, but thus far I've only seen it used with longitudinal data. On 1/16/12 10:23 PM, Kevin E. Thorpe

[R] formula in function as text?

2012-01-17 Thread Julia Burggraaf
Hello all, It might be a simple question, but I cannot find the solution, as I do not know which subjects I should search on. So, much thanks for he/she we can help me. I am creating a function and would like to place a formula in the function, without it being executed immediately. Like saving

[R] BLAS

2012-01-17 Thread Scott Raynaud
I'm setting up an Ubuntu virtual machine that will use 4-Intel Xeon CPU x5650.  I'd like to compile R with a BLAS but the question is whcih one.  Seems like the only free ones are GotoBLAS which I'm not sure is being maintained for newer CPUs and OpenBLAS for Loongson CPUs.  I saw a favorable

[R] Plotting probability density and cumulative distribution function

2012-01-17 Thread chrisr34000
Hi! I want to plot the probability density function and the cumulative distribution function for the gamma, lognormal, exponential and Pareto distribution. I want to vary the parameters and and have a plot with 2-3 different parameters in the same figure. It should look like this (example weibull

Re: [R] Mean of simulation runs given in a table

2012-01-17 Thread Uwe Ligges
On 17.01.2012 12:31, Irek Szczesniak wrote: Hi, I have the simulation results of the following structure: run par measured 1 1012 2 1014 1 2020 2 2026 Where run is the simulation run number, par is the parameter of the simulation, and measured is the value measured

Re: [R] Error predict with lda and cross validation

2012-01-17 Thread Uwe Ligges
On 17.01.2012 14:54, Riccardo Romoli wrote: Hi, I use the lda function from the MASS package to classify some samples according to some chemical properties. If I run lda without cross validation all is ok but, if I run lda with cross validation, the R consol say: resLDA - ldaRedOx -

Re: [R] result numeric(0) when using variable1[which(variable2=max(variable2)]

2012-01-17 Thread Duncan Murdoch
On 17/01/2012 5:35 AM, Nerak wrote: Dear all, I have a question about the knowing for which row I have the max value of one of my variables. I calculated the Rsquared for different columns and made a list to gather them. I unlisted this list to create a vector with this values. I want to know

Re: [R] result numeric(0) when using variable1[which(variable2=max(variable2)]

2012-01-17 Thread Berend Hasselman
On 17-01-2012, at 11:35, Nerak wrote: Dear all, I have a question about the knowing for which row I have the max value of one of my variables. I calculated the Rsquared for different columns and made a list to gather them. I unlisted this list to create a vector with this values. I want to

Re: [R] formula in function as text?

2012-01-17 Thread Berend Hasselman
On 17-01-2012, at 13:36, Julia Burggraaf wrote: Hello all, It might be a simple question, but I cannot find the solution, as I do not know which subjects I should search on. So, much thanks for he/she we can help me. I am creating a function and would like to place a formula in the

Re: [R] formula in function as text?

2012-01-17 Thread Petr PIKAL
Hi Hello all, It might be a simple question, but I cannot find the solution, as I do not know which subjects I should search on. So, much thanks for he/she we can help me. I am creating a function and would like to place a formula in the function, without it being executed

Re: [R] Display numbers on map

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 5:37 AM, Jeffrey Joh wrote: I have a text file with states and numbers. I would like to display each number that corresponds to a state on a map. I am trying to use the maps package, but it doesn't show Alaska or Hawaii. Do you have suggestions on how to do this?

Re: [R] question: how to select a column from a dataframe in a function

2012-01-17 Thread Petr PIKAL
Hi Hi, I am creating a function and ran into the problem of selecting a column from a dataset. It seems as though the $ function (as in data$columnname) does not apply in the function. In simplified version: This works: testf2-function(data,columnnumber){print(data[,columnnumber])}

Re: [R] Checking dates for entry errors

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 8:02 AM, Thomas Mang wrote: On 1/11/2012 11:07 PM, Paul Miller wrote: Hello Everyone, I have a question about how best to check dates for entry errors. Try using regular expression matching and the functions grep, strsplit, regexpr etc. If you are not familiar with

Re: [R] BLAS

2012-01-17 Thread Peter Langfelder
On Tue, Jan 17, 2012 at 6:06 AM, Scott Raynaud scott.rayn...@yahoo.com wrote: I'm setting up an Ubuntu virtual machine that will use 4-Intel Xeon CPU x5650. I'd like to compile R with a BLAS but the question is whcih one.  Seems like the only free ones are GotoBLAS which I'm not sure is being

Re: [R] ggplot- using geom_point and geom_line at the same time

2012-01-17 Thread Hadley Wickham
On Mon, Jan 16, 2012 at 6:05 PM, Mary Kindall mary.kind...@gmail.com wrote: Thanks for reply I wanted to have legend name with spaces. Right now I am using the following code but it produce two legends. I have to use Gimp to cut the redundant legend. Your basic problem is that you're using

Re: [R] visualization for k-mean clustering

2012-01-17 Thread R. Michael Weylandt michael.weyla...@gmail.com
Will depend heavily on the structure of your data (you haven't even told use te number of dimensions or the metric in question), but I'd suggest something like a scatterplot color coded by cluster with an additional marker for cluster means. Michael Weylandt On Jan 17, 2012, at 3:48 AM,

Re: [R] Plotting probability density and cumulative distribution function

2012-01-17 Thread R. Michael Weylandt michael.weyla...@gmail.com
Perhaps I misunderstand you, but it sounds like all you need to do is change weibull to the name of another distribution Michael On Jan 17, 2012, at 8:11 AM, chrisr34000 cr...@wolke7.net wrote: Hi! I want to plot the probability density function and the cumulative distribution function

Re: [R] visualization for k-mean clustering

2012-01-17 Thread Yihui Xie
You mean the process of clustering (the algorithm)? Have you looked at kmeans.ani() in the animation package? Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Jan 17,

Re: [R] boxplot with diamond shape

2012-01-17 Thread csrabak
Em 16/1/2012 08:07, David martin escreveu: Hi, I haven't found in R a possibility to draw a boxplot with a diamond shape (means and CI). David, Perhaps, even prejudicially, as I cannot see any advantage on the diamond shape for displaying just two dimensions, I would recommend you check if

Re: [R] How to loop on file names

2012-01-17 Thread R. Michael Weylandt michael.weyla...@gmail.com
Inline: Michael On Jan 16, 2012, at 10:26 PM, Hélène Genet hge...@alaska.edu wrote: Dear all, I need to do the same procedure on several files. But I don't know how to refer to the file name. Here is an example of what I am trying to do. List of files: file1(A,B,C, D1...Dn),

[R] Reference for dataset colon (package survival)

2012-01-17 Thread Matthias Gondan
Dear R team, dear Prof. Therneau, library(survival) data(colon) ?colon gives me only a very rudimentary source (only a name). Is there a possibility to get a reference to the clinical trial these data are taken from? Many thanks in advance. With best wishes, Matthias Gondan --

[R] breakpoints and nonlinear regression

2012-01-17 Thread crimsonengineer87
Dear Forum, I have been wracking my head over this problem for the past few days. I have a dataset of (x,y). I have been able to obtain a nonlinear regression line using nls. However, we would like to do some statistical analysis. I would like to obtain a confidence interval for the curve. We

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Kenneth Frost
Hi, Julian- I'm not sure if this will be what you want but you could start by taking a look at: ?predict.nls Ken On 01/17/12, crimsonengineer87 julianjonre...@gmail.com wrote: Dear Forum, I have been wracking my head over this problem for the past few days. I have a dataset of (x,y). I

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Kenneth Frost
Sorry, that wasn't to helpful...I see that the intervals and se.fit argument are currently ignored. On 01/17/12, crimsonengineer87 julianjonre...@gmail.com wrote: Dear Forum, I have been wracking my head over this problem for the past few days. I have a dataset of (x,y). I have been able

Re: [R] boxplot with diamond shape

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 10:22 AM, csrabak wrote: Em 16/1/2012 08:07, David martin escreveu: Hi, I haven't found in R a possibility to draw a boxplot with a diamond shape (means and CI). David, Perhaps, even prejudicially, as I cannot see any advantage on the diamond shape for displaying just

[R] unable to find an inherited method for function make.db.names, for signature character, missing

2012-01-17 Thread Poul Kristensen
Hi ! I am new to R and I am using Rstudio on Linux. Have I missed some library() ? and if so does anyone have the time to write which? I am trying to create some PostqreSQL tables from comma separated files. I am a bit surpriced that character is a problem. The missing value could be NULL.

Re: [R] Reference for dataset colon (package survival)

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 10:48 AM, Matthias Gondan wrote: Dear R team, dear Prof. Therneau, library(survival) data(colon) ?colon gives me only a very rudimentary source (only a name). Is there a possibility to get a reference to the clinical trial these data are taken from? Wouldn't this seem

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread crimsonengineer87
Hi Ken, Thx for that advice. I took a brief look at it. I already have my curve by just using the curve() function using the parameters a and b given by the nls. Would se.fit and interval have computed the CI? Maybe where I'm confused is at how I can break up my curve into pieces of linear

[R] Prediciting sports team scores

2012-01-17 Thread kerry1912
I am working on predicitng the scores for a days worth of matches of team sports. I have already collected data for the teams for the season we are concentrating on. I have been fitting poisson models for football games and have worked out what model is best and which predictor variables are

[R] An unsubsettable object in a mixed model

2012-01-17 Thread Sarah Jervis
I am having problems using the /lme /command to fit mixed models. I have a data set similar to longitudinal data, except the hypothesised correlation is between observations taken from different individuals in the same family rather than from the same individual at different times. As soon as

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Bert Gunter
On Tue, Jan 17, 2012 at 8:06 AM, Kenneth Frost kfr...@wisc.edu wrote: Sorry, that wasn't to helpful...I see that the intervals and se.fit argument are currently ignored. Yes, because the fitted values are nonlinear in the parameters, which makes finding exact confidence regions impossible. I

Re: [R] Prediciting sports team scores

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 10:55 AM, kerry1912 wrote: I am working on predicitng the scores for a days worth of matches of team sports. I have already collected data for the teams for the season we are concentrating on. I have been fitting poisson models for football games and have worked out

Re: [R] Prediciting sports team scores

2012-01-17 Thread Albyn Jones
Robin Lock at St Lawrence has done this for hockey, see http://it.stlawu.edu/~chodr/faq.html As I recall, he has a poisson regression model with parameters for offense and defense, and perhaps home 'field' advantage. I confess I am skeptical that this is the right approach for football -

Re: [R] ggplot2 stacked bar - sum of values rather than count

2012-01-17 Thread J Toll
On Mon, Jan 16, 2012 at 1:13 AM, Paul p...@paulhurley.co.uk wrote: On 16/01/12 02:08, J Toll wrote: Hi, I'm trying to create a stacked bar plot using ggplot2. Rather than plotting the count of each of the 13 Bar factors on the Y axis, I would like to represent the sum of the Values

Re: [R] net classification improvement?

2012-01-17 Thread Kevin E. Thorpe
On 01/17/2012 07:16 AM, Essers, Jonah wrote: Thanks for the reply. I think more the issue is whether it can be applied to cross-sectional data. This I'm not sure. This method is heavily cited in the New England Journal of Medicine, but thus far I've only seen it used with longitudinal data. As

Re: [R] net classification improvement?

2012-01-17 Thread Essers, Jonah
Actually, I don't think I made myself clear and I wrote this late last nightSorry. More the issue is that the raw model predictions (from 0 to 1) have no inherent clinical value to them. I.e. They aren't risk of disease or risk of outcome. They are raw scores that are specific to each model

[R] Which date format to choose?

2012-01-17 Thread Jake Beaulieu
R offers a bewildering array of options when it comes to representing dates and times (e.g, as.Date, chron, strptime, zoo, etc). Can anybody recommend a document that compares the relative merit of each method? I'm not looking for help with any one method, but rather a guide that describes

Re: [R] net classification improvement?

2012-01-17 Thread Kevin E. Thorpe
On 01/17/2012 11:55 AM, Essers, Jonah wrote: Actually, I don't think I made myself clear and I wrote this late last nightSorry. More the issue is that the raw model predictions (from 0 to 1) have no inherent clinical value to them. I.e. They aren't risk of disease or risk of outcome. They

Re: [R] New PLYR issue

2012-01-17 Thread Jeff Newmiller
Replying to old messages without including context (particularly old ones) is rather bad netiquette. Thank you for at least providing a reproducible example. Now if you can figure out how to read the documentation we will really make some progress. Further responses below. On Tue, 17 Jan

[R] Using Aggregate() with FUN arguments, which require more than one input variables

2012-01-17 Thread RNoob
Dear all, I am trying to apply the aggregate() function to calculate correlations for subsets of a dataframe. My argument x is supposed to consist of 2 numerical vectors, which represent x and y for the cor() function. The following error results when calling the aggregate function: Error in

Re: [R] Which date format to choose?

2012-01-17 Thread Duncan Murdoch
On 17/01/2012 12:14 PM, Jake Beaulieu wrote: R offers a bewildering array of options when it comes to representing dates and times (e.g, as.Date, chron, strptime, zoo, etc). Can anybody recommend a document that compares the relative merit of each method? I'm not looking for help with any one

Re: [R] Which date format to choose?

2012-01-17 Thread R. Michael Weylandt
R offers a bewildering array of options when it comes to representing dates and times Yes no: read www.r-project.org/doc/Rnews/Rnews_2004-1.pdf (the help desk section) Brief summary: 3 major ways to deal with dates/times in R: i ) the Date class from the base distribution -- no time support,

[R] Separate ablines in lattice panels

2012-01-17 Thread Doran, Harold
Searched archives and found some old email threads on the topic. But mot exactly what I think I need. Suppose I have a datafile such as tmp. tmp - data.frame(var1 = c(rnorm(1000), rnorm(1000, 1, 1)), var2 = gl(2, 1000)) I'd like a plot similar to the one below, but with an abline of v=0 in the

Re: [R] New PLYR issue

2012-01-17 Thread Hadley Wickham
Note that although ddply does a lot for you, it doesn't reproduce all of your calculations on all of the data columns like summaryBy does... you have to explicitly create every calculated column in your function. Well, ddply doesn't, but colwise will. Hadley -- Assistant Professor /

Re: [R] Separate ablines in lattice panels

2012-01-17 Thread Bert Gunter
?panel.number This tells you what panel you're in and you can use that to determine which line to draw. -- Bert On Tue, Jan 17, 2012 at 9:59 AM, Doran, Harold hdo...@air.org wrote: Searched archives and found some old email threads on the topic. But mot exactly what I think I need. Suppose I

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Achim Zeileis
On Tue, 17 Jan 2012, crimsonengineer87 wrote: Dear Forum, I have been wracking my head over this problem for the past few days. I have a dataset of (x,y). I have been able to obtain a nonlinear regression line using nls. However, we would like to do some statistical analysis. I would like to

Re: [R] Using Aggregate() with FUN arguments, which require more than one input variables

2012-01-17 Thread Uwe Ligges
On 17.01.2012 18:10, RNoob wrote: Dear all, I am trying to apply the aggregate() function to calculate correlations for subsets of a dataframe. My argument x is supposed to consist of 2 numerical vectors, which represent x and y for the cor() function. The following error results when

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Achim Zeileis
On Tue, 17 Jan 2012, Bert Gunter wrote: On Tue, Jan 17, 2012 at 8:06 AM, Kenneth Frost kfr...@wisc.edu wrote: Sorry, that wasn't to helpful...I see that the intervals and se.fit argument are currently ignored. Yes, because the fitted values are nonlinear in the parameters, which makes

Re: [R] Separate ablines in lattice panels

2012-01-17 Thread Doran, Harold
Thank you, Bert. The help page doesn't have a usage example and I can't seem to find one via google. Do you, or anyone else, have sample code? -Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Tuesday, January 17, 2012 1:07 PM To: Doran, Harold Cc:

Re: [R] An unsubsettable object in a mixed model

2012-01-17 Thread Ben Bolker
Sarah Jervis sj414 at medschl.cam.ac.uk writes: I am having problems using the /lme /command to fit mixed models. I have a data set similar to longitudinal data, except the hypothesised correlation is between observations taken from different individuals in the same family rather than

[R] bayesian mixed logit

2012-01-17 Thread Carlo Fezzi (ENV)
Dear all, I am writing an R code to fit a Bayesian mixed logit (BML) via MCMC / MH algorithms following Train (2009, ch. 12). Unfortunately, after many draws the covariance matrix of the correlated random parameters tend to become a matrix with almost perfect correlation, so I think there is

Re: [R] Separate ablines in lattice panels

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 1:34 PM, Doran, Harold wrote: Thank you, Bert. The help page doesn't have a usage example and I can't seem to find one via google. Do you, or anyone else, have sample code? It did not seem particularly daring or complex when I tried this (which does appear to produce

Re: [R] Separate ablines in lattice panels

2012-01-17 Thread Doran, Harold
It does indeed produce what I'm expecting. The input to panel.number seems to require a character string, but here the function is called with no argument. I am not entirely clear _why_ it works, but it does seem to. -Original Message- From: David Winsemius

Re: [R] Separate ablines in lattice panels

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 1:52 PM, Doran, Harold wrote: It does indeed produce what I'm expecting. The input to panel.number seems to require a character string, but here the function is called with no argument. I am not entirely clear _why_ it works, but it does seem to. ?panel.numer Says

[R] pretty(range(data$z),10) Error

2012-01-17 Thread Mario Giesel
Hello, R-List, I'm getting error messages when adding geom_density2d() [package ggplot2]: Fehler in pretty(range(data$z), 10) :   NA/NaN/Inf in externem Funktionsaufruf (arg 1) Zusätzlich: Warnmeldungen: 1: Removed 1

[R] RTisean generating multivariate surrogates;

2012-01-17 Thread Burton Shank
I have a question on generating multivariate time series surrogates using the surrogates function in the RTisean library. The surrogate data matrices are always much shorter than the input matrices. FYI, I'm using R version 2.12.2 on Windows XP RTisean library v 3.0.14 Tisean algorithms v

Re: [R] Display numbers on map

2012-01-17 Thread Ray Brownrigg
David: That doesn't quite answer the question about Alaska and Hawaii. Jeffrey: help(state, maps) states This database produces a map of the states of the United States mainland ... so you have to use: map(world, USA) map(state, add=T) to get the whole lot (which I am willing to bet is not

Re: [R] Change state names to abbreviations in an irregular, list of names, abbreviations, null values, and foreign provinces

2012-01-17 Thread David Kikuchi
Thanks! Both solutions work well for the problem that I described, although I failed to mention that there are also pre-abbreviated names in the list that I'm working with, and the second solution returns NA's for these (but there are plenty of ways around this). Sample data might be:

Re: [R] unable to find an inherited method for function make.db.names, for signature character, missing

2012-01-17 Thread Uwe Ligges
I think the amount of people on this list who understand your question is roughly zero. We cannot see how the subject is related to the body of your function nor do we see any incidence that ou followed the posting guide. Uwe Ligges On 17.01.2012 17:06, Poul Kristensen wrote: Hi ! I am

Re: [R] Using Aggregate() with FUN arguments, which require more than one input variables

2012-01-17 Thread Rui Barradas
Hello, RNoob wrote Dear all, I am trying to apply the aggregate() function to calculate correlations for subsets of a dataframe. My argument x is supposed to consist of 2 numerical vectors, which represent x and y for the cor() function. The following error results when calling the

Re: [R] unable to find an inherited method for function make.db.names, for signature character, missing

2012-01-17 Thread Bert Gunter
2012/1/17 Uwe Ligges lig...@statistik.tu-dortmund.de: I think the amount of people on this list who understand your question is roughly zero. A Fortunes candidate? Cheers, Bert We cannot see how the subject is related to the body of your function nor do we see any incidence that you

[R] Using !is.na() in a HAVING clause in sqldf() XXXX

2012-01-17 Thread Dan Abner
Hi everyone, I have the following: sqldf(select Premie,count(tpounds) N,avg(tpounds) Avg_Weight, stddev_samp(tpounds) StdDev from children group by Premie having !is.na(Premie)) sqldf() does not like the !is.na(Premie) specification. How does one exclude a missing group in an aggregated

Re: [R] Using !is.na() in a HAVING clause in sqldf() XXXX

2012-01-17 Thread Joseph Magagnoli
Did you try a where statement? where Premie is not null On Tue, Jan 17, 2012 at 3:03 PM, Dan Abner dan.abne...@gmail.com wrote: Hi everyone, I have the following: sqldf(select Premie,count(tpounds) N,avg(tpounds) Avg_Weight, stddev_samp(tpounds) StdDev from children group by Premie

[R] error when extracting from a data frame

2012-01-17 Thread Suzanne.mertens
(As a noob to R, this is my first posting - yes yes, groans all around...) I'm trying to extract certain rows from a data frame. I used the following to import data from a CSV txt file. data - read.table(file=data.txt, header=TRUE) when I do this, my attempt to extract the data rows

Re: [R] Using !is.na() in a HAVING clause in sqldf() XXXX

2012-01-17 Thread Phil Spector
Dan - Try using having Premie not null instead of having !is.na(Premie) . - Phil Spector Statistical Computing Facility Department of Statistics

Re: [R] problem in import and export

2012-01-17 Thread Jean V Adams
mukul purva wrote on 01/16/2012 01:35:00 AM: hello, i hav a prob in R lang. i want to do correlation of data frame 22810(gene) rows and 1436 colums(experiment) when i covert this file in csv or xls format it reads only 1024 cloumns. n when i do correlation of data mean 22810 *22810

Re: [R] Display numbers on map

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 2:21 PM, Ray Brownrigg wrote: David: That doesn't quite answer the question about Alaska and Hawaii. Agreed. I misinterpreted the text of help(map) example to mean that HI and AK boundaries could be found in unemp. However, it was also advice to Jeffrey that

Re: [R] error when extracting from a data frame

2012-01-17 Thread Jean V Adams
Read the help file on how to extract from a data frame: ?[.data.frame Then, try adding a comma inside the brackets. data.station1 - data[data$Station==1, ] Before the comma, the data$Station==1 identifies what rows to select. After the comma, the lack of specification indicates that all columns

Re: [R] bayesian mixed logit

2012-01-17 Thread Ben Bolker
Carlo Fezzi (ENV C.Fezzi at uea.ac.uk writes: Dear all, I am writing an R code to fit a Bayesian mixed logit (BML) via MCMC / MH algorithms following Train (2009, ch. 12). Unfortunately, after many draws the covariance matrix of the correlated random parameters tend to become a matrix

Re: [R] Mean of simulation runs given in a table

2012-01-17 Thread Ireneusz Szcześniak
Thank you, Uwe, for your help! I have more measurements (m1, m2) and more parameters (par1, par2). I can calculate the means of m1 and m2 this way: aggregate(cbind(m1, m2) ~ par1 + par2, dat, mean) However, I also need to calculate the standard error of the mean, and the variance for the

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread crimsonengineer87
Thanks for the comments everyone. I was hoping to not have to find someone in the stats department ... well, we'll see. So in response to Z's comment ... I have tried breakpoints(Na ~ yield) and I did expect to get something continuous. The idea was to get two or three linear functions making up

Re: [R] error when extracting from a data frame

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 4:56 PM, Jean V Adams wrote: Read the help file on how to extract from a data frame: ?[.data.frame Then, try adding a comma inside the brackets. data.station1 - data[data$Station==1, ] Before the comma, the data$Station==1 identifies what rows to select. After the comma,

Re: [R] Mean of simulation runs given in a table

2012-01-17 Thread William Dunlap
Try using the function in the plyr package. E.g., z - data.frame( # your toy dataset run = c(1, 2, 1, 2), par = c(10, 10, 20, 20), measured = c(12, 14, 20, 26)) library(plyr) ddply(z, .(par), summarize, meanMeasured=mean(measured), sdMeasured=sd(measured)) par

[R] pscl package and hurdle model marginal effects

2012-01-17 Thread twarzin
This request is related to the following post from last year: https://stat.ethz.ch/pipermail/r-help/2011-June/279752.html After reading the thread, the idea is still not clear. I have fitted a model using HURDLE from the PSCL package. I am trying to get marginal effects / slopes by multiplying

[R] arules killed

2012-01-17 Thread Patrick McCann
Hi, I recently got a bizarre message when running arules. It just said Killed and quit. Anyone know why this might have happened? I am running R on an AWS quad xl ubuntu instance. Here is some information, including dataset size and the parameters: parameter specification: confidence minval

Re: [R] ggplot- using geom_point and geom_line at the same time

2012-01-17 Thread Mary Kindall
Thanks Hadley for your input. The following code works fine now. Thanks again con = textConnection(inputs var1 var2 var3 100 10 5 2 1000 20 10 4 5000 30 15 8 1 40 20 16 3 50 25 32) data = read.table(con, header=TRUE) data data = melt(data, id=inputs) g - ggplot(data,aes(x=inputs,

Re: [R] howto test a package without installation

2012-01-17 Thread Jonas Stein
Look at Hadley Wickham's devtools package. It is designed with this sort of thing. That said, it really is not too difficult to install as long as you have a working tool chain (which you will need to test it anyway). I cound not find it with google and found no devtools on this page

Re: [R] howto test a package without installation

2012-01-17 Thread Jonas Stein
I don't believe you can. However, you need not install it into a system-wide library directory... your personal library (e.g. /home/jonas/R/x86_64-pc-linux-gnu-library/2.14) should be sufficient. Finally i created a new testuser to install the library locally as you wrote. It works. Thank

Re: [R] howto test a package without installation

2012-01-17 Thread R. Michael Weylandt
http://cran.r-project.org/web/packages/devtools/index.html Michael On Tue, Jan 17, 2012 at 6:51 PM, Jonas Stein n...@jonasstein.de wrote: Look at Hadley Wickham's devtools package.  It is designed with this sort of thing.  That said, it really is not too difficult to install as long as you

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Rolf Turner
In respect of fitting piecewise linear regressions, have you looked at the segmented package? cheers, Rolf Turner On 18/01/12 04:30, crimsonengineer87 wrote: Dear Forum, I have been wracking my head over this problem for the past few days. I have a dataset of (x,y). I have been

[R] R package dev: how to export constant?

2012-01-17 Thread Jonas Stein
Hi, i create two constants kilo and milli in [1]. These should be available after loading library(sitools) How should i export them and what have i done wrong? (Other suggestions for improving the package are welcome too) The ready to use .tar.gz and the source can be found on github [2,3]

Re: [R] R package dev: how to export constant?

2012-01-17 Thread William Dunlap
Try adding LazyData: yes to the DESCRIPTION file. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jonas Stein Sent: Tuesday, January 17, 2012 4:41 PM To:

Re: [R] howto test a package without installation

2012-01-17 Thread Jeff Newmiller
Just install the updated library over the old one and start a new R session. Devtools can be helpful for some things, but when I last looked at it I was having more difficulty with getting documentation right than debugging code, which I can do using normal function development processes, so I

  1   2   >