Re: [R] ANCOVA with defined error terms

2009-08-26 Thread hpdutra
Could someone or Richard explain to me what he meant by This also shows a singular Error(). We look at the data and see that plot is identical to the three-way veget:fruit:block interaction. It seems to me that I just needed to recoded the plots, in order to get rid of the Error message. If

[R] Thank you David : Re : Odp: Re : Odp: Re : table function

2009-08-26 Thread Inchallah Yarab
Thank you very very much David De : David Winsemius dwinsem...@comcast.net À : David Winsemius dwinsem...@comcast.net Envoyé le : Mardi, 25 Août 2009, 23h32mn 53s Objet : Re: [R] Re : Odp: Re : Odp: Re : table function On Aug 25, 2009, at 9:23 AM, David

[R] Select top three values from data frame

2009-08-26 Thread Noah Silverman
Hi, I'm trying to find an easy way to do this. I want to select the top three values of a specific column in a subset of rows in a data.frame. I'll demonstrate. ABC x21 x41 x32 y15 y26 y38 I want the top 3 values of B from the

Re: [R] ptproc package

2009-08-26 Thread Uwe Ligges
If you have read the posting guide and then tell us the website, the version, the R version, your OS, and so on, we might finally be able to help. Uwe Ligges oyelola.adegb...@student.uhasselt.be wrote: Dear All, Please can anyone assist on installing 'ptproc', I downloaded it on the

Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-26 Thread Simon Wood
I am trying to understand the relationships between: y~s(x1)+s(x2)+s(x3)+s(x4) and y~s(x1,x2,x3,x4) Does the latter contain the former? what about the smoothers of all interaction terms? The first says that you want a model E(y) = f_1(x_1) + f_2(x_2) + f_3(x_3) + f_4(x_4) (1)

[R] Odp: Select top three values from data frame

2009-08-26 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 26.08.2009 10:36:22: Hi, I'm trying to find an easy way to do this. I want to select the top three values of a specific column in a subset of rows in a data.frame. I'll demonstrate. ABC x21 x41 x32 y1

Re: [R] Select top three values from data frame

2009-08-26 Thread Mohamed Lajnef
Noah Silverman a écrit : Hi, I'm trying to find an easy way to do this. I want to select the top three values of a specific column in a subset of rows in a data.frame. I'll demonstrate. Hi, did you try this? data[data$A=='x' data$C2,]$B # data = your data frame ABC x21

[R] Odp: draw n-1 lines with n X and n Y

2009-08-26 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 25.08.2009 18:15:25: I want to draw lines using a matrix with the X-axe on the first column, and the the Y-axe on the second column. These lines have to link the n points of a graph, so they are n-1, but the resout using these two commands:

Re: [R] Select top three values from data frame

2009-08-26 Thread Ottorino-Luca Pantani
df.mydata[df.mydata$A==X AND df.mydata$C 2, ] will do the job ? 8rino Noah Silverman ha scritto: Hi, I'm trying to find an easy way to do this. I want to select the top three values of a specific column in a subset of rows in a data.frame. I'll demonstrate. ABC x21 x

Re: [R] Select top three values from data frame

2009-08-26 Thread Noah Silverman
I only have a few values in my example, but the real data set might have 20-100 rows with A=X. So how do I pick just the three highest ones? -N On 8/26/09 2:46 AM, Ottorino-Luca Pantani wrote: df.mydata[df.mydata$A==X AND df.mydata$C 2, ] will do the job ? 8rino Noah Silverman ha

[R] Issues with factors with duplicate (empty) levels

2009-08-26 Thread Frederik Elwert
Hello! I imported a DJI survey[1] from an SPSS file. When looking at some of the variables, I noticed problems with the `table` function and similar. It seems to be caused by duplicate levels which are generated from the value labels. Not all values have labels, so those who don’t get an empty

Re: [R] Select top three values from data frame

2009-08-26 Thread Noah Silverman
Colin, Unless I missed something, the head function doesn't sort. So if I have 1000 values that match, head just gives me the first three, not the HIGHEST three. [df.mydata$A==X df.mydata$C 2, On 8/26/09 3:01 AM, Colin Millar wrote: Hi, This should work - head is quite a usefull

Re: [R] Select top three values from data frame

2009-08-26 Thread Mohamed Lajnef
Noah Silverman a écrit : I only have a few values in my example, but the real data set might have 20-100 rows with A=X. So how do I pick just the three highest ones? -N Hi, and now? df.mydata$B[order(df.mydata[df.mydata$A==X AND df.mydata$C 2,

Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-26 Thread Simon Wood
This will not work... 2) y~s(x1, ,x36) Estimating a 36 dimensional functions reasonably well would require a tremendous quantity of data, but in any case the 36 dimensional TPS smoothnes measure will involve such high order derivatives that it will no longer be practically useful: in fact

Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-26 Thread Corrado
Dear Simon, thanks for your answer. I am running the model with both s and te smoothing, to compare. A few questions on your email: 1) Isotropic smoothness: my variables are centred and scaled. I assumed an isotropic smoother (that is, a smoother that treats all the variables in the same

Re: [R] Select top three values from data frame

2009-08-26 Thread Ottorino-Luca Pantani
Noah Silverman ha scritto: I only have a few values in my example, but the real data set might have 20-100 rows with A=X. So how do I pick just the three highest ones? -N On 8/26/09 2:46 AM, Ottorino-Luca Pantani wrote: df.mydata[df.mydata$A==X AND df.mydata$C 2, ] will do the job ?

Re: [R] simple graph question: manipulating variable names

2009-08-26 Thread Jim Lemon
Donald Braman wrote: This is a simple problem that has stumped me: I'm trying to loop through a few dozen variable names in graphs. I've tried various approaches like this: attach(mydata) ivs - c(oneiv, anotheriv, yetanotheriv) dvs - c(onedv, anotherdv, yetanotherdv) for (iv in ivs) { for (dv

[R] how to set crontab for updating the repositories?

2009-08-26 Thread Sukhbir Rattan
Hi, I have downloaded around 60GB package repositories of bioconductor to use it locally and to set up mirror at my university site. I have installed the mirror with rsync command and able to access also. Now I have to set a cron job for its daily updating from bioconductor website. How should

Re: [R] Select top three values from data frame

2009-08-26 Thread Colin Millar
Or perhaps use a temporary vector might be neater? tmp - with(df.mydata, B[A==X C 2]) df.mydata[order(tmp) %in% 1:3,] # gives df with highest three values of B or head(df.mydata[order(tmp),],3) # gives first 3 rows of df sorted by B Colin. -Original Message- From:

[R] Re : error matrix, cross table,

2009-08-26 Thread Inchallah Yarab
Hi see ?table i hope that helps!! inchallah De : dalposso gustavodalpo...@hotmail.com À : r-help@r-project.org Envoyé le : Mercredi, 26 Août 2009, 1h20mn 31s Objet : [R] error matrix, cross table, how to create a cross table to quantify the classes of two

[R] changing the Date format.

2009-08-26 Thread rajclinasia
Hi everyone, i have a data frame called 'sample'. in that 'sample' data frame variable called 'starts' is there like this starts 37987 37988 37989 37990 37991 now i want change that variable into '-mm-dd' format. can any body help in this aspect. Thanks in Advance. -- View this message

Re: [R] changing the Date format.

2009-08-26 Thread Patrick Connolly
On Wed, 26-Aug-2009 at 03:48AM -0700, rajclinasia wrote: | | Hi everyone, | | i have a data frame called 'sample'. in that 'sample' data frame variable | called 'starts' is there like this | | starts | 37987 | 37988 | 37989 | 37990 | 37991 | | now i want change that variable into

Re: [R] Select top three values from data frame

2009-08-26 Thread Colin Millar
Hi, This should work - head is quite a usefull summary function head(df.mydata[df.mydata$A==X df.mydata$C 2, ],3) Colin. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Noah Silverman Sent: 26 August 2009 10:54 To:

[R] GLMs

2009-08-26 Thread Letizia Campioni
Hi, I am starting to work with R. I need to performe a General linear model and a Generalized mixed model, what are the package I have to use for? what is the difference between them? thanks letizia _

Re: [R] Filtering matrices

2009-08-26 Thread Peter Alspach
Tena koe Ben -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of bwgoudey Sent: Wednesday, 26 August 2009 2:55 p.m. To: r-help@r-project.org Subject: Re: [R] Filtering matrices r-rcorr(d[[1]]) #d is matrix containing

Re: [R] Help in plotting a legend

2009-08-26 Thread Jim Lemon
Ashutosh Nandeshwar wrote: Hello, List, I am a new user of the R project, and I need some help in plotting a legend. I am using the PBSmapping library to plot map of Ohio and heat color it with the count of employees in each county. As a guide, I am using Data Mashups in R. I am able to

[R] faulty formatting of toLatex(sessionInfo())

2009-08-26 Thread Liviu Andronic
Dear all I am writing an Sweave document and have encountered formatting issues with the locale part of toLatex(sessionInfo()). The fact that there is no spaces between the various locale variables means that LaTeX cannot easily find an appropriate place to break the lines, and some will get

Re: [R] Number of CPU's

2009-08-26 Thread Henrique Dallazuanna
For windows you can do: Sys.getenv(NUMBER_OF_PROCESSORS) On Mon, Aug 24, 2009 at 3:16 PM, Håvard Rue havard@math.ntnu.no wrote: Any way to get access to the number of CPU's, optionally their type, from within R? In linux I can just read /proc/cpuinfo but for win/mac ? Thanks!

Re: [R] faulty formatting of toLatex(sessionInfo())

2009-08-26 Thread G. Jay Kerns
Dear Liviu, On Wed, Aug 26, 2009 at 7:35 AM, Liviu Androniclandronim...@gmail.com wrote: Dear all I am writing an Sweave document and have encountered formatting issues with the locale part of toLatex(sessionInfo()). The fact that there is no spaces between the various locale variables means

Re: [R] how to set crontab for updating the repositories?

2009-08-26 Thread Paul Hiemstra
Sukhbir Rattan wrote: Hi, I have downloaded around 60GB package repositories of bioconductor to use it locally and to set up mirror at my university site. I have installed the mirror with rsync command and able to access also. Now I have to set a cron job for its daily updating from

[R] attach package

2009-08-26 Thread Jeremy MAZET
Hello, Is there a solution to attach a package without run the hook function .onAttach() Thanks Jérémy Mazet [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Within factor random factor

2009-08-26 Thread 細田弘吉
Hi, I am quite new to R and trying to analyze the following data. I have 28 controls and 25 patients. I measured X values of 4 different locations (A,B,C,D) in the brain image of each subject. And X ranges from 0 to 1. I think control or patient is a between subject factor and location is a

[R] counting subgroup sums within a data frame

2009-08-26 Thread Shaun Grannis
Hi, I'm sure there's an easy approach to this issue, I'm just not seeing it. I have a data frame of the following form: Date classsubclass count 8/1/2009AX 1 8/1/2009BX 2 8/1/2009AY 9 8/1/2009BY 3

[R] teaching R

2009-08-26 Thread Michael Nestrud
Hello all, I am going to be running a small statistics workshop using R sometime in November. I am restricted to R because of the specific libraries I will be using - a good thing in my book - however the attendees are unfamiliar with R. I plan on giving as little R information as possible -

Re: [R] Appending strings at the beginning of a text file

2009-08-26 Thread Henrique Dallazuanna
It works with paste, but I forgotten the close(fConn) after the writeLines. On Tue, Aug 25, 2009 at 2:48 PM, Paul Smith phh...@gmail.com wrote: Thanks, Henrique. I think you mean the following: fConn - file('test.txt', 'r+') Lines - readLines(fConn) writeLines(c(Text at beginning of

Re: [R] counting subgroup sums within a data frame

2009-08-26 Thread Henrique Dallazuanna
Try this: with(d, tapply(count, list(Date, class), sum)) On Wed, Aug 26, 2009 at 10:07 AM, Shaun Grannis sgran...@regenstrief.orgwrote: Hi, I'm sure there's an easy approach to this issue, I'm just not seeing it. I have a data frame of the following form: Date classsubclass

Re: [R] teaching R

2009-08-26 Thread Barry Rowlingson
On Wed, Aug 26, 2009 at 2:08 PM, Michael Nestrudm...@ataraxis.org wrote: Hello all, I am going to be running a small statistics workshop using R sometime in November.  I am restricted to R because of the specific libraries I will be using - a good thing in my book - however the attendees are

Re: [R] counting subgroup sums within a data frame

2009-08-26 Thread Shaun Grannis
Wow. That was fast -- and spot on! Thanks so much. Best Regards, Shaun On Aug 26, 2009, at 9:11 AM, Henrique Dallazuanna wrote: Try this: with(d, tapply(count, list(Date, class), sum)) On Wed, Aug 26, 2009 at 10:07 AM, Shaun Grannis sgran...@regenstrief.org wrote: Hi, I'm sure

Re: [R] Appending strings at the beginning of a text file

2009-08-26 Thread Paul Smith
Henrique, With paste(), it works only if the file has only one line; otherwise, Text at beginning of file is repeated after each line of the file. Paul On Wed, Aug 26, 2009 at 2:03 PM, Henrique Dallazuannawww...@gmail.com wrote: It works with paste, but I forgotten the close(fConn) after

Re: [R] counting subgroup sums within a data frame

2009-08-26 Thread ONKELINX, Thierry
Have a look at the reshape package. Assuming that your data is in a data.frame called dataset. cast(Date ~ ., data = dataset, value = count, fun = sum) cast(Date ~ class, data = dataset, value = count, fun = sum) cast(Date + class ~ ., data = dataset, value = count, fun = sum) Or the plyr

Re: [R] Filtering matrices

2009-08-26 Thread Steve Lianoglou
Hi, On Aug 25, 2009, at 10:54 PM, bwgoudey wrote: r-rcorr(d[[1]]) #d is matrix containing observation r[[1]] #r values age sex BMI age 1.000 -0.30010322 -0.13702263 sex -0.3001032 1. 0.06300528 BMI -0.1370226 0.06300528 1. r[[2]] #Number

Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-26 Thread Corrado
Dear Simon, thanks again. Concerning the whole 36 variables well, I have run a principal components analysis, and I am only using part of them (I am running a test with the pc which cover the 95% of variance and then the 99%). :) so I will possibly end up with s(x1,,x8). I

Re: [R] teaching R

2009-08-26 Thread Liviu Andronic
Hello On 8/26/09, Michael Nestrud m...@ataraxis.org wrote: Any advice / what works / what doesn't work is appreciated for those that have tried this before me. It could prove helpful to forward similar questions to r-sig-teaching. Also, there was a recent discussion on the topic [1]. Liviu

Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-26 Thread Gavin Simpson
On Tue, 2009-08-25 at 10:00 +0100, Corrado wrote: Dear Gavin / Rlings, thanks for your kind answer and sorry for posting to the dev mailing list. Concerning the specific of your answer: I am working with 6 to 36 covariates, and they are all centred and scaled. I represented the problem

[R] Statistical question about logistic regression simulation

2009-08-26 Thread Denis Aydin
Hi R help list I'm simulating logistic regression data with a specified odds ratio (beta) and have a problem/unexpected behaviour that occurs. The datasets includes a lognormal exposure and diseased and healthy subjects. Here is my loop: ors - vector() for(i in 1:200){ # First, I

[R] lme: how to nest a random factor in a fixed factor?

2009-08-26 Thread Robert Buitenwerf
Dear all, I have an experimental setup in which a random variable is nested within a fixed variable; however I have troubles specifying the correct LMM with lme. I have searched the lists but haven't been able to find an example like my setup, which I unfortunately need to get this stuff

Re: [R] teaching R

2009-08-26 Thread Robert W. Baer, Ph.D.
Hello all, I am going to be running a small statistics workshop using R sometime in November. I am restricted to R because of the specific libraries I will be using - a good thing in my book - however the attendees are unfamiliar with R. I plan on giving as little R information as possible -

[R] Grid lines in cloud plot for lattice

2009-08-26 Thread Chris Jones
Hi all, I was wondering if there was a way to draw out grid lines in the cloud plots for lattice. I hunted all throughout the panel.cloud and panel. 3dscatter help pages and couldn't find anything to help me move forward with this. Do I have to get deeper into the drawing commands, or is

[R] Installing rJava RJDBC bad interpreter: Permission denied

2009-08-26 Thread Matias Silva
Trying to install the above two packages via the install.packages(package_name) command and the R CMD INSTALL file.tar.gz. I receive the following error either way sh: ./configure: /bin/sh: bad interpreter: Permission denied. I have tried to chmod and chown permissions and also ran dos2unix in

[R] mann whitney u

2009-08-26 Thread Mcdonald, Grant
Dear Sir, I am comparing two samples using wilcox.test in R. Literature appears to describe mann whitney u test as the most appropriate test to use on my data. is the wilcox.test function equivalent to mann-whitney u? Is there a way to gain the U-value as apposed to the W-value in R? Thank

[R] increasing significant digits in smooth.spline function

2009-08-26 Thread Sergii, Ivakhno
Hello All I have a very long vector of unique predictor values and 6 significant digits setting for the smooth.spline rounds them off. Is there any way of increasing the significant digits withour recompiling a lot if code (simple editing and tham sourcing of smooth.spline.r function does not

[R] Batch replacement, by factor, of values in a data frame

2009-08-26 Thread Gavin Simpson
Dear List, I'm wondering if there is a better/cleaner/more efficient way of replacing 0 values in a variable with the minimum of the non-missing and non-zero values of that same variable, but doing it within the levels of a factor? Consider the dummy example data presented at the end of my

Re: [R] attach package

2009-08-26 Thread Duncan Murdoch
On 8/26/2009 8:17 AM, Jeremy MAZET wrote: Hello, Is there a solution to attach a package without run the hook function .onAttach() You could modify the source code to remove the hook, but why you'd want to do this, I don't know. Presumably the author of the package had a reason to put the

Re: [R] Statistical question about logistic regression simulation

2009-08-26 Thread Ravi Varadhan
Your exposure variable has very large values, so all your probabilities are 1. You also get a bunch of NaN's because the `expit' (inverse logit) function to calculate the probabilities cannot be evaluated. You need to use values of exposure that will yield some 0's and 1's so that the binomial

Re: [R] glmmPQL model selection

2009-08-26 Thread stephenb
Sorry for the late reply. Just use the first 90% of your data to fit and then predict the last 10% and see which one is better. If the random effects are not good it will become very obvious. If the concern is with fixed effects then just use gls which puts the random effects in the error and

Re: [R] lme: how to nest a random factor in a fixed factor?

2009-08-26 Thread ONKELINX, Thierry
Dear Robert, Since you have only 4 sites, a random effect is not so good. You would need at least 6 sites for a good estimate of the variance. You have enough data to treat site as a fixed effects. It only costs 2 extra degrees of freedom. Therefore I would model this like: lm(response ~

Re: [R] faulty formatting of toLatex(sessionInfo())

2009-08-26 Thread Liviu Andronic
On 8/26/09, Frank E Harrell Jr f.harr...@vanderbilt.edu wrote: G. Jay Kerns wrote: There was a closely related discussion last April: https://stat.ethz.ch/pipermail/r-devel/2009-April/053094.html and IIRC this was fixed for R version 2.10. If you still have trouble just do s -

Re: [R] mann whitney u

2009-08-26 Thread David Winsemius
On Aug 26, 2009, at 7:18 AM, Mcdonald, Grant wrote: Dear Sir, I am comparing two samples using wilcox.test in R. Literature appears to describe mann whitney u test as the most appropriate test to use on my data. is the wilcox.test function equivalent to mann-whitney u? When used in

Re: [R] Help regarding frequency distribution Graphs

2009-08-26 Thread David Winsemius
On Aug 26, 2009, at 7:32 AM, anupam sinha wrote: Hi all, I am trying to construct a frequency distribution graph i.e. suppose there is a variable *k* and it takes a range of values. What I want to do is to plot *P(k) *(probability/frequency of finding a specific value of *k*)

Re: [R] Installing rJava RJDBC bad interpreter: Permission denied

2009-08-26 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Matias Silva Sent: Wednesday, August 26, 2009 7:37 AM To: r-help@r-project.org Subject: [R] Installing rJava RJDBC bad interpreter: Permission denied Trying to install the

Re: [R] increasing significant digits in smooth.spline function

2009-08-26 Thread David Winsemius
On Aug 26, 2009, at 9:26 AM, Sergii, Ivakhno wrote: Hello All I have a very long vector of unique predictor values and 6 significant digits setting for the smooth.spline rounds them off. Is there any way of increasing the significant digits withour recompiling a lot if code (simple editing

Re: [R] Statistical question about logistic regression simulatio

2009-08-26 Thread Ted Harding
On 26-Aug-09 14:17:40, Denis Aydin wrote: Hi R help list I'm simulating logistic regression data with a specified odds ratio (beta) and have a problem/unexpected behaviour that occurs. The datasets includes a lognormal exposure and diseased and healthy subjects. Here is my loop: ors

Re: [R] mann whitney u

2009-08-26 Thread Stefan Grosse
On Wed, 26 Aug 2009 12:18:53 +0100 Mcdonald, Grant grant.mcdonal...@imperial.ac.uk wrote: MG is the wilcox.test function equivalent to mann-whitney u? Is there Yes, the test is the same. It is also called wilcoxon mann whitney test because the authors created the test independently. MG a way

Re: [R] glmmPQL and variance structure

2009-08-26 Thread stephenb
this is very late, but I saw this now as I am dealing with it now: I think varPower should not be needed here. The family should be one of the quasi families eg quasibinomial and that will automatically allow variance/dispersion to become a function of the fit. This is a feature of glm

Re: [R] Batch replacement, by factor, of values in a data frame

2009-08-26 Thread Phil Spector
The ave function is very handy for things like this: mins = ave(D$Var,D$Site,FUN=function(x)min(x[x0],na.rm=TRUE)) D$Var = ifelse(is.na(D$Var) | D$Var == 0,mins,D$Var) should do the required replacements. - Phil Spector

Re: [R] Select top three values from data frame

2009-08-26 Thread Don MacQueen
Do you want just the values (i.e., a vector), or do you also want the corresponding rows of the data frame? What if there is a tie, or do you know in advance that within any particular subset the values of B are unique? What if the subset that meets the constraints has fewer than 3 unique

Re: [R] Help regarding frequency distribution Graphs

2009-08-26 Thread milton ruser
Google R gallery :-) On Wed, Aug 26, 2009 at 7:32 AM, anupam sinha anupam.cont...@gmail.comwrote: Hi all, I am trying to construct a frequency distribution graph i.e. suppose there is a variable *k* and it takes a range of values. What I want to do is to plot *P(k)

Re: [R] GLMs

2009-08-26 Thread Steve Lianoglou
Hi, On Aug 26, 2009, at 6:53 AM, Letizia Campioni wrote: Hi, I am starting to work with R. I need to performe a General linear model and a Generalized mixed model, what are the package I have to use for? R RSiteSearch(general linear model) R RSiteSearch(Generalized mixed model) Will

Re: [R] Problem with RHEL 5 repo and the latest R RPMs

2009-08-26 Thread Hugh Brown
Martyn Plummer wrote: It turns out that the default checksum for createrepo, the command that creates repository metadata, has changed from sha1 to sha256, whereas Enterprise Linux 5 still requires sha1. I have modified the scripts to use the older checksum for EL4 and EL5. Sorry for the

[R] Scripting - sort of

2009-08-26 Thread Charles Annis, P.E.
Dear R-ians: I'm running R2.9.2 on a 6 year old Windows XP DELL with 2 Gig RAM and a 3MHz Pentium 4 chip. I've written a package using the User Menus Under Windows commands (winMenuAdd, etc). It works very well. I have 6 test cases and running any one of them requires many

[R] tweedie and lmer

2009-08-26 Thread Mohammad AlMarzouq
Hello all, I have count data with about 36% of observations being zeros. I found in some of the examples of the r-help mail archives that a tweedie family of distributions could be used to fit a model with random effects. Upon installing the tweedie package and attempting to fit the

Re: [R] Scripting - sort of

2009-08-26 Thread Gabor Grothendieck
autoit and autohotkey are two free Windows utilities based on the basic language that can be used for GUI scripting. On Wed, Aug 26, 2009 at 12:22 PM, Charles Annis, P.E.charles.an...@statisticalengineering.com wrote: Dear R-ians: I'm running R2.9.2 on a 6 year old Windows XP DELL with 2 Gig

Re: [R] Applying do.call to a data.frame using function arguments

2009-08-26 Thread miller_2555
miller_2555 wrote: I'm trying to convert a data.frame to a series of strings (row-wise). There was a very good discussion awhile back (2002) entitled [R] string concatenate across rows of a matrix?? where Tony Plate recommended the following two alternatives (x2 is an R object of type data

[R] access to source code of a website ..?

2009-08-26 Thread Martin Batholdy
hi, is it possible to read the source code of a website within R? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

Re: [R] Applying do.call to a data.frame using function arguments

2009-08-26 Thread hadley wickham
On Wed, Aug 26, 2009 at 11:31 AM, miller_2555nabble.30.miller_2...@spamgourmet.com wrote: miller_2555 wrote: I'm trying to convert a data.frame to a series of strings (row-wise). There was a very good discussion awhile back (2002) entitled [R] string concatenate across rows of a matrix??

Re: [R] GLMs

2009-08-26 Thread Ben Bolker
Letizia Campioni wrote: Hi, I am starting to work with R. I need to performe a General linear model and a Generalized mixed model, what are the package I have to use for? what is the difference between them? General linear models (called GLM mostly by SAS users) are

[R] changing equal values on matrix by same random number

2009-08-26 Thread milton ruser
Dear all, I have about 30,000 matrix (512x512), with values from 1 to N. Each value on a matrix represent a habitat patch on my matrix (i.e. my landscape). Non-habitat are stored as ZERO. No I need to change each 1-to-N values for the same random number. Just supose my matrix is:

Re: [R] changing equal values on matrix by same random number

2009-08-26 Thread David Huffer
You want to replace all 1s each with the same random nuumber from the uniform distribution, then all 2s each with the same random nuumber from the uniform distribution, and so forth? Are the arguments (i.e., the min and max of the distribution) to each call to runif identical? -- David  

Re: [R] changing equal values on matrix by same random number

2009-08-26 Thread David Winsemius
On Aug 26, 2009, at 12:53 PM, milton ruser wrote: Dear all, I have about 30,000 matrix (512x512), with values from 1 to N. Each value on a matrix represent a habitat patch on my matrix (i.e. my landscape). Non-habitat are stored as ZERO. No I need to change each 1-to-N values for the same

Re: [R] changing equal values on matrix by same random number

2009-08-26 Thread milton ruser
Hi David, Thanks for the reply. This is what I need: mymat[mymat==1] - runif(1,min=0.4,max=0.7) mymat [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 0.457316100200000 3 0 [2,] 0.457316100202000 0

Re: [R] access to source code of a website ..?

2009-08-26 Thread Duncan Murdoch
On 8/26/2009 12:44 PM, Martin Batholdy wrote: hi, is it possible to read the source code of a website within R? url(http://example.com;) creates a connection that you can do what you like with. For example, readLines(url(http://www.r-project.org;)) Duncan Murdoch

Re: [R] Applying do.call to a data.frame using function arguments (nabble: message 8 of 20)

2009-08-26 Thread nabble . 30 . miller_2555
On Wed, Aug 26, 2009 at 12:47 PM, hadley wickham - I think you're missing some quotes: cat(do.call(paste,c(x2,sep=','))[1], \n) Thanks - the strings are actually substrings of larger strings (specifically, SQL statements), which will wrap with the leading and trailing quotes (though I should

Re: [R] changing equal values on matrix by same random number

2009-08-26 Thread David Huffer
You could try either of the two examples below. They both assume that min and max are invariant: mymat - matrix ( c ( 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 2 , 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 2 , 2 , 2 , 0 , 0 , 0 , 0 , 3 , 3 , 0 , 0 , 0 , 0 , 0 , 0 ,

[R] rJava error for large XML object return in StatET plugin

2009-08-26 Thread Harsh
Hi R List, I get this error using StatET R plugin in Eclipse. sessionInfo() R version 2.9.0 (2009-04-17) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 I am

Re: [R] Batch replacement, by factor, of values in a data frame

2009-08-26 Thread Gavin Simpson
On Wed, 2009-08-26 at 08:06 -0700, Phil Spector wrote: The ave function is very handy for things like this: mins = ave(D$Var,D$Site,FUN=function(x)min(x[x0],na.rm=TRUE)) D$Var = ifelse(is.na(D$Var) | D$Var == 0,mins,D$Var) should do the required replacements. Thanks Phil, that's great. I

Re: [R] changing equal values on matrix by same random number

2009-08-26 Thread milton ruser
Hi David, Now is perfect!! Thanks a lot milton On Wed, Aug 26, 2009 at 1:30 PM, David Huffer david.huf...@csosa.govwrote: You could try either of the two examples below. They both assume that min and max are invariant: mymat - matrix ( c ( 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,

Re: [R] rJava error for large XML object return in StatET plugin

2009-08-26 Thread Steve Lianoglou
Hi, On Aug 26, 2009, at 1:31 PM, Harsh wrote: Hi R List, I get this error using StatET R plugin in Eclipse. You might have more luck asking the StatET user mailing list: https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/statet-user -steve -- Steve Lianoglou Graduate Student:

[R] specify a model in differential equations (nlme)

2009-08-26 Thread Jun Shen
Dear all, I wonder if there is a way to specify a model in differential equations for nlme(). Or in other packages? Appreciate any comment. Thanks. Jun Shen [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] ggplot2: geom_smooth and legend

2009-08-26 Thread hadley wickham
Hi Benoit, You could turn the standard errors off with se = F. Then they'll be removed from the legend as well. Hadley On Tue, Aug 18, 2009 at 7:43 AM, Benoit Boulinguiezbenoit.boulingu...@ensc-rennes.fr wrote: Sorry I forgot the code that goes with **CODE desorb_plot-ggplot() +      

Re: [R] changing equal values on matrix by same random number

2009-08-26 Thread milton ruser
Hi David all, It is me again. When I try with a sample matrix (10x10) it appears to be good. But when I apply to a real 512x512 landscape, with values ranging from 1 to 10,000 It is still time expensive (please, see below): mymat - matrix ( c ( 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0

Re: [R] specify a model in differential equations (nlme)

2009-08-26 Thread Bert Gunter
For nlme, no. However, take a look at the CRAN Task View for pharmokinetics and packages recommended there, especially nlmeODE . You might also try R's search capabilities: RSiteSearch(differential equations) ?RSiteSearch of other non-R search engines Bert Gunter Genentech Nonclinical

[R] Trying to make Nas 0

2009-08-26 Thread Dumblauskas, Jerry
I have an lm object called mro A summary gives summary(mro) Call: lm(formula = REGRESSIONSTRING, data = wData) Residuals: Min 1Q Median 3Q Max -8.18077 -1.06867 -0.09387 1.03153 11.20201 Coefficients: (1 not defined because of singularities)

[R] Managing output

2009-08-26 Thread Noah Silverman
Hi, Is there a way to build up a vector, item by item. In perl, we can push an item onto an array. How can we can do this in R? I have a loop that generates values as it goes. I want to end up with a vector of all the loop results. In perl it woud be: for(item in list){ result -

Re: [R] Managing output

2009-08-26 Thread Erik Iverson
How about ?append, but R is vectorized, so why not just result_list - 2*item^2 , or for more complicated tasks, the apply/sapply/lapply/mapply family of functions? In general, the for loop construct can be avoided so you don't have to think about messy indexing. What exactly are you trying to

Re: [R] Managing output

2009-08-26 Thread Noah Silverman
The actually process is REALLY complicate, I just gave a simple example for the list. I have a lot of steps to process the data before I get a final score. (nested loops, conditional statements, etc.) Right now, I'm just printing the scores to the screen. I'd like to accumulate them in

Re: [R] changing equal values on matrix by same random number

2009-08-26 Thread William Dunlap
Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of milton ruser Sent: Wednesday, August 26, 2009 9:54 AM To: r-help@r-project.org Subject: [R] changing

Re: [R] Managing output

2009-08-26 Thread Duncan Murdoch
On 26/08/2009 3:20 PM, Noah Silverman wrote: Hi, Is there a way to build up a vector, item by item. In perl, we can push an item onto an array. How can we can do this in R? I have a loop that generates values as it goes. I want to end up with a vector of all the loop results. In perl it

[R] contourLines() documentation

2009-08-26 Thread Derek Lacoursiere
Hello, I have searched for documentation on the function contourLines's algorithm but cannot find a thing. I am about to submit a paper to a journal but cannot yet do so because I need to provide some reference for this function. Does anyone know what algorithm is used for this function?

Re: [R] Managing output

2009-08-26 Thread Rolf Turner
On 27/08/2009, at 8:00 AM, Duncan Murdoch wrote: On 26/08/2009 3:20 PM, Noah Silverman wrote: Hi, Is there a way to build up a vector, item by item. In perl, we can push an item onto an array. How can we can do this in R? I have a loop that generates values as it goes. I want to end up

[R] Plotting to stdout

2009-08-26 Thread Oliver Bandel
Hello, is there a way to write the result of a plot to stdout? I mean even a binary thingy like a png-file, written to stdout?! I tried with the file-argument of png() and jpeg(), but did not get working results. Ciao, Oliver __

  1   2   >