Re: [R] Feedback on you manual

2010-10-24 Thread Patrick Burns
Okay, I've been convinced of both the feasibility and the desirability of a pdf. However, such a thing is unlikely to appear very soon. On 23/10/2010 20:23, 刘力平 wrote: Hi, all: My opinion is, provide a PDF tutorial is important, but not one web page containing everything. From the perspectiv

Re: [R] Feedback on you manual

2010-10-24 Thread Patrick Burns
On 24/10/2010 04:35, Steve Lianoglou wrote: [ ... ] Speaking as as an older R-user to a new R-user, I can understand some of the frustrations you feel with coming up to speed with a new programming language. One piece of advice I have for you is that you should actually take the time to read

[R] gamma glm - using of weights gives error

2010-10-24 Thread Andreas Wittmann
Dear R-users, i try to use the following code to do a gamma regression glm(x1 / x2 ~ x3 + x4 + x5 + x6 + x7 + x8, family=Gamma(link="log"), weights=x2) but here i get the error Error: NA/NaN/Inf in foreign function call (arg 1) In addition: Warning message: step size truncated due to diverge

Re: [R] Feedback on you manual

2010-10-24 Thread Liviu Andronic
On Sun, Oct 24, 2010 at 10:33 AM, Patrick Burns wrote: > If you look at 'Introduction' through the eyes of > a complete novice, it is really, really scary. > Ditto. I had no programming background prior to learning R, and after half a minute glancing through the 'Intro to R' I've decided that this

Re: [R] Bayesian constrained regression method?

2010-10-24 Thread Michael Bedward
Hello Jim, Please reply to the list - you'll have a much better chance of getting useful suggestions. > OK so some addition info. I know each of the X2 is in (0,1). Is there any > method available? I don't think that's sufficient to estimate b, at least not in my experience of fitting Bayesian m

[R] Contour Plot on a non Rectangular Grid

2010-10-24 Thread Lorenzo Isella
Dear All, I would like to plot a scalar (e.g. a temperature) on a non-rectangular domain (or even better: I would simply like to be able to draw a contour plot on an arbitrary 2D domain). I wonder if there is any tool to achieve that with R. I did some online search in particular on the list a

Re: [R] Contour Plot on a non Rectangular Grid

2010-10-24 Thread Ted Harding
On 24-Oct-10 11:30:57, Lorenzo Isella wrote: > Dear All, > I would like to plot a scalar (e.g. a temperature) on a non-rectangular > domain (or even better: I would simply like to be able to draw a > contour plot on an arbitrary 2D domain). I wonder if there is any > tool to achieve that with R. I

Re: [R] Contour Plot on a non Rectangular Grid

2010-10-24 Thread Lorenzo Isella
On 10/24/2010 01:51 PM, (Ted Harding) wrote: On 24-Oct-10 11:30:57, Lorenzo Isella wrote: Dear All, I would like to plot a scalar (e.g. a temperature) on a non-rectangular domain (or even better: I would simply like to be able to draw a contour plot on an arbitrary 2D domain). I wonder if there

Re: [R] Contour Plot on a non Rectangular Grid

2010-10-24 Thread Uwe Ligges
On 24.10.2010 14:14, Lorenzo Isella wrote: On 10/24/2010 01:51 PM, (Ted Harding) wrote: On 24-Oct-10 11:30:57, Lorenzo Isella wrote: Dear All, I would like to plot a scalar (e.g. a temperature) on a non-rectangular domain (or even better: I would simply like to be able to draw a contour plot

Re: [R] Contour Plot on a non Rectangular Grid

2010-10-24 Thread David Winsemius
On Oct 24, 2010, at 4:30 AM, Lorenzo Isella wrote: Dear All, I would like to plot a scalar (e.g. a temperature) on a non- rectangular domain (or even better: I would simply like to be able to draw a contour plot on an arbitrary 2D domain). I wonder if there is any tool to achieve that with

Re: [R] Contour Plot on a non Rectangular Grid

2010-10-24 Thread Lorenzo Isella
On 10/24/2010 02:55 PM, David Winsemius wrote: On Oct 24, 2010, at 4:30 AM, Lorenzo Isella wrote: Dear All, I would like to plot a scalar (e.g. a temperature) on a non-rectangular domain (or even better: I would simply like to be able to draw a contour plot on an arbitrary 2D domain). I wonder

Re: [R] Contour Plot on a non Rectangular Grid

2010-10-24 Thread David Winsemius
On Oct 24, 2010, at 6:12 AM, Lorenzo Isella wrote: As to the domain of the function, at least in case (1), that should arise from the collected data points in (x,y) if the sampling is dense enough. And that is precisely what you get from the perimeter function. The earlier Design packag

Re: [R] Long model formulae

2010-10-24 Thread James Hirschorn
> > Here is a dodge I often use. This is a mock-up example. Very instructive (and helpful) ... > > ___ > > bar <- data.frame(matrix(rnorm(1001), nrow = 1)) > names(bar)[1] <- "y" ## say > head(bar[,1:5]) > > nbar <- names(bar) > form <- as.formula(paste(nbar[1], "~", paste(nbar[-1],

[R] Turning ppp into im in spatstat

2010-10-24 Thread Sebastian Schutte
Dear all, I'm working with two point patterns (ppp) in spatstat. I turned one of them into a spatial covariate (im) object. After that, I used this im object to fit a Poisson model for the second point pattern, using the covariate layer from the first one. In R, the whole thing looks somewhat lik

Re: [R] Random Forest AUC

2010-10-24 Thread Liaw, Andy
The OOB error estimates in RF is one really nifty feature that alleviate the need for additional cross-validation or resampling. I've done some empirical comparison between OOB estimates and 10-fold CV estimates, and they are basically the same. Andy > -Original Message- > From: r-help

Re: [R] Conditional looping over a set of variables in R

2010-10-24 Thread Peter Ehlers
This won't be as quick as Bill's elegant solution, but it's a one-liner: apply(d, 1, function(x), match(1, x)) See ?match. -Peter Ehlers On 2010-10-22 10:36, David Herzberg wrote: Bill, thanks so much for this. I'll get a chance to test it later today, and will post the outcome. David S

[R] best predictive model for mixed catagorical/continuous variables

2010-10-24 Thread jamessc
Would anybody be able to advise on which package would offer the best approach for producing a model able to predict the probability of species occupation based upon a range of variables, some of them catagorical (eg. ten soil types where the numbers assigned are not related to any qualitative/qua

[R] covariance matrix

2010-10-24 Thread Marcelo Lima
Hi all, I generated a covariance matrix and visualized as a 2D contour plot (x,y, covariance matrix), I would like to extract from the matrix the values ( in x and y) that auto-correlate which I will plot as an normal (x,y(being the values that auto-corelate to a certain x and y values in my origi

Re: [R] Contour Plot on a non Rectangular Grid

2010-10-24 Thread Lorenzo Isella
Hi, And thanks for helping. I am anyway a bit puzzled, since case (1) is not only a matter of interpolation. Probably the point I did not make clear (my fault) is that case (1) in my original email does not refer to an irregular grid on a rectangular domain; the set of (x,y) coordinate could sta

[R] cvs fpr R

2010-10-24 Thread Alaios
Hello everyone. These days I am writing some code for a small project. I have started having problems with different versions of the files I keep (in case I need to move to older files). I need some easy cvs platform ( I do not know if cvs is the general name or a specific program) that is easy

Re: [R] preferred x-delimited data format for R?

2010-10-24 Thread Liviu Andronic
On Wed, Oct 20, 2010 at 5:30 PM, Nutter, Benjamin wrote: > I run into that problem frequently. I can usually circumvent it by using > the >  quote = "\"" > Argument.  The default is quote = "\"'"  which uses the double and > single quote as quoting symbols.  If you change it to "\"" it will read >

[R] Subsetting a dataframe

2010-10-24 Thread ANJAN PURKAYASTHA
Hi, I have a dataframe with 43 columns and a 1000 rows. Each entry in the dataframe can be either P or A. here is a small chunk: c1c2 ...c43 r100 P A ... P r101 A A ... A r102 P P ... P How does one subset this data frame to select those rows t

Re: [R] Subsetting a dataframe

2010-10-24 Thread Jorge Ivan Velez
Hi Anjan, Please consider the following example: > x <- c(2, rep(1, 10)) > all(x == 1) [1] FALSE > d <- replicate(10, sample(x, replace = TRUE)) > d [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]111111211 1 [2,]11121

Re: [R] cvs fpr R

2010-10-24 Thread Steve Lianoglou
Hi, On Sun, Oct 24, 2010 at 1:15 PM, Alaios wrote: > Hello everyone. > These days I am writing some code for a small project. I have started having > problems with different versions of the files I keep (in case I need to move > to > older files). > I need some easy cvs platform ( I do not know

Re: [R] Subsetting a dataframe

2010-10-24 Thread ANJAN PURKAYASTHA
Thanks all for your help. Anjan On Sun, Oct 24, 2010 at 1:38 PM, Jorge Ivan Velez wrote: > Hi Anjan, > > Please consider the following example: > > > x <- c(2, rep(1, 10)) > > all(x == 1) > [1] FALSE > > d <- replicate(10, sample(x, replace = TRUE)) > > d > [,1] [,2] [,3] [,4] [,5] [,6] [,

Re: [R] Conditional looping over a set of variables in R

2010-10-24 Thread Peter Ehlers
Whoops, got an extra comma in there somehow; should be: apply(d, 1, function(x) match(1, x)) -Peter Ehlers On 2010-10-24 08:17, Peter Ehlers wrote: This won't be as quick as Bill's elegant solution, but it's a one-liner: apply(d, 1, function(x), match(1, x)) See ?match. -Peter Eh

[R] more errors (behavior)

2010-10-24 Thread ivo welch
quick programming question. I am not making enough errors in my programs, so I want to trigger a few more. ;-) [1] undefined variable behavior: > d=data.frame( x=rnorm(1:10), y=rnorm(1:10)) > z Error: object 'z' not found > d$z NULL is this consistent? I thought that z is the same as .GlobalE

Re: [R] more errors (behavior)

2010-10-24 Thread Ted Harding
On 24-Oct-10 19:55:12, ivo welch wrote: > quick programming question. I am not making enough errors in my > programs, so I want to trigger a few more. ;-) > > [1] undefined variable behavior: > >> d=data.frame( x=rnorm(1:10), y=rnorm(1:10)) >> z > Error: object 'z' not found >> d$z NULL > > is

[R] call for paper-nov/dec 2010

2010-10-24 Thread Editor Chief
Dear Sir/Madam *CALL FOR PAPER – DECEMBER ISSUE* Greetings from INTERNATIONAL JOURNAL OF COMPUTER TECHNOLOGY AND APPLICATIONS (IJCTA) IJCTA is an international, peer-reviewed online journal entitled to publish original research articles in the fields of Computer science and Information technolog

[R] 140 packages in R Commander!!

2010-10-24 Thread Ajay Ohri
Dear List I just downloaded and installed R 2.12.0 and then installed R Commander . First it got RCmdr and Car, and then suggested for other packages for utilizing the full functionality- I clicked yes! I got 140 packages installed!!! Cran Mirror was UCLA... Here is the list. Is this intention

[R] How to simulate from an estimated density

2010-10-24 Thread wangguojie2006
Hi, dear fellows, I was wondering how can I simulate from an estimated density function? I used my training data set and already have estimated density values at some fixed points. I plan to simulate some data from such estimated density and compare them to my validation data set. Anyone can help

[R] Importing CSV File

2010-10-24 Thread Jason Kwok
I'm trying to import a CSV file into R and when it gets imported, the entries get numbered down the left side. How do I get rid of that? Thanks, Jason *> read.csv(file="C:\\Program Files\\R\\Test Data\\sales.csv",head=TRUE) Month Sales 1January 422 2 February 151 3 March

Re: [R] Importing CSV File

2010-10-24 Thread Erik Iverson
On 10/24/2010 04:57 PM, Jason Kwok wrote: I'm trying to import a CSV file into R and when it gets imported, the entries get numbered down the left side. How do I get rid of that? When you imported the CSV file into R, an object of class data.frame was created, and since you did not assign it t

Re: [R] Importing CSV File

2010-10-24 Thread Jason Kwok
Thanks for the response Erik. In this case, I would like to keep the row name as the month. How would I do that? Thanks, Jason On Sun, Oct 24, 2010 at 6:20 PM, Erik Iverson wrote: > On 10/24/2010 04:57 PM, Jason Kwok wrote: > >> I'm trying to import a CSV file into R and when it gets importe

Re: [R] How to simulate from an estimated density

2010-10-24 Thread sachinthaka . abeywardana
You usually simulate a distribution by: 1. building the cumulative distribution (use cumsum). 2. Simulating a random number (from uniform distribution, use runif (number_of_simulations_needed)). 3. Get the closest number to the number simulated from the cumulative distribution. 4. The corresponding

Re: [R] Importing CSV File

2010-10-24 Thread Bill.Venables
sales <- read.csv(file="C:/Program Files/R/Test Data/sales.csv", header=TRUE, row.names = "Month") ^^^ -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of

Re: [R] Importing CSV File

2010-10-24 Thread Liviu Andronic
On Mon, Oct 25, 2010 at 12:26 AM, Jason Kwok wrote: > Thanks for the response Erik. > > In this case, I would like to keep the row name as the month.  How would I > do that? > You can do this in Rcmdr. First Data > Import > From text file (or select your data.frame as active data set), then Data >

Re: [R] Conditional looping over a set of variables in R

2010-10-24 Thread Gabor Grothendieck
On Sun, Oct 24, 2010 at 2:54 PM, Peter Ehlers wrote: > Whoops, got an extra comma in there somehow; should be: > >  apply(d, 1, function(x) match(1, x)) > A slight variation on this would be: apply(d, 1, match, x = 1) -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel:

Re: [R] 140 packages in R Commander!!

2010-10-24 Thread John Fox
Dear Ajay, This is a consequence of installing the dependencies (including "suggested" packages, etc.) of the Rcmdr package, their dependencies, and so on recursively. The alternative would be for the Rcmdr package to specify its direct dependencies via "depends" rather than "suggests," but then t

Re: [R] Contour Plot on a non Rectangular Grid

2010-10-24 Thread David Winsemius
On Oct 24, 2010, at 9:30 AM, Lorenzo Isella wrote: Hi, And thanks for helping. I am anyway a bit puzzled, since case (1) is not only a matter of interpolation. Probably the point I did not make clear (my fault) is that case (1) in my original email does not refer to an irregular grid o

Re: [R] Help: Maximum likelihood estimation

2010-10-24 Thread Ravi Varadhan
Can you provide a reproducible code? Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu ---

[R] Unable to allocate arrays of size > 2GB in 64 bit Windows 7 R

2010-10-24 Thread Bhattacharyya, Siddhartha
I seem Unable to allocate arrays of size > around 2GB in 64 bit Windows 7 R. There is a lot of main memory available. The memory.limit is set to the max memory available, and there is more than 10GB of that available when R returns an 'unable to allocate memory' error. Is this a limitation of R e

[R] re-vertical conversion of data entries

2010-10-24 Thread Penny Adversario
Dear R user, Can you please help me. How do I convert part of a cluster analysis output under the heading “Clustering vector” as shown below, showing the clusters to which each respondent belongs to:      [1] 1 1 2 2 1 2 1 2 1 1 2 2 1 2 2 2 2 1 1 1 1 2 2 1 2 2 1 2 2 2 2 2 2 2 2 1 2  

[R] Question on passing the subset argument to an lm wrapper

2010-10-24 Thread Erik Iverson
Hello, How would you go about handling the following situation? This is on R 2.12.0 on Ubuntu 32-bit. I have a wrapper function to lm. I want to pass in a subset argument. First, I just thought I'd use "...". ## make example reproducible set.seed(123) df1 <- data.frame(age = rnorm(100, 50, 10

[R] R-Fortran question (multiple subroutines)

2010-10-24 Thread Remko Duursma
Dear R-helpers, apologies if this is somewhere in a manual, I have not been able to find anything relevant. I run Windows Vista. I have some Fortran code in a subroutine, and have no problem calling this from R with .Fortran, compiling the code either with 'R CMD SHLIB' or independently with gfo

[R] Text wrapping in R

2010-10-24 Thread Johannes Huesing
I am about to give an introduction to R to some clinical data managers used to SAS. There is already a lot of material in printed form and on the web that paves the way. What I haven't found so far are text wrapping capabilities in setting tables in raw text as in SAS PROC REPORT. At the moment i

Re: [R] Text wrapping in R

2010-10-24 Thread Uwe Ziegenhagen
2010/10/25 Johannes Huesing > I am about to give an introduction to R to some clinical data managers > used to SAS. There is already a lot of material in printed form and > on the web that paves the way. What I haven't found so far are text > wrapping capabilities in setting tables in raw text as

Re: [R] Text wrapping in R

2010-10-24 Thread Jeffrey Spies
I would demonstrate one of the many LaTeX table functions. Off hand, packages xtable, hmisc, and quantreg all have functions that convert R objects to LaTeX tables. If they're unwilling to work in LaTeX, you can use something like LaTeXiT or Laeqed to create PDFs or PNGs of the tables for inserti

Re: [R] Importing CSV File

2010-10-24 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 25.10.2010 00:47:22: > sales <- read.csv(file="C:/Program Files/R/Test Data/sales.csv", > header=TRUE, row.names = "Month") > ^^^ > > > -Original Message- > From: r-help-boun...@r-pro

[R] Random Integer Number in Uniform Distribution

2010-10-24 Thread Gundala Viswanath
Is there a way to do it? At best what I can achieve is non integer: > runif(10, min=1, max=100) [1] 51.959151 56.654146 63.630251 3.172794 4.073018 11.977437 86.601869 [8] 75.788618 11.734361 6.770962 -G.V. __ R-help@r-project.org mailing list ht

Re: [R] Random Integer Number in Uniform Distribution

2010-10-24 Thread Nick Sabbe
Check ?sample. Nick Sabbe -- ping: nick.sa...@ugent.be link: http://biomath.ugent.be wink: A1.056, Coupure Links 653, 9000 Gent ring: 09/264.59.36 -- Do Not Disapprove -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gundala Vis

[R] structural equation modeling in sem, error, The model has negative degrees of freedom = -3, and The model is almost surely misspecified...

2010-10-24 Thread Alex Anderson
Hi all, I am attempting to learn my way through the sem package by constructing a simple structural model for some of my data on bird diversity, abundance, and primary productivity. I have constructed a covariance matrix between these variables as per the following: >S_matrix = matrix(c( >+

[R] if statement and truncated distribution

2010-10-24 Thread Sally Luo
Hi R helpers, I am trying to use the if statement to generate a truncated random variable as follows: if (y[i]==0) { v[i] ~ rnorm(1,0,1) | (-inf ,0) } if (y[i]==1) { v[i] ~ rnorm(1,0,1) | (0, inf) } I guess I cannot use " | ( , ) " to restrict the range of a variable in R. Could you let me kno