Re: [R] Changing the text in the strips of lattice plots and y axis

2007-11-14 Thread Deepayan Sarkar
On Nov 14, 2007 9:06 PM, Judith Flores <[EMAIL PROTECTED]> wrote: > Dear R-helpers, > >I am sorry for asking something I know has been > asked before, I have tried different combinations in > the strip function without success... > > > I am using version 2.5.1 and work on a PC. > >I hav

Re: [R] Generating these matrices going backwards

2007-11-14 Thread francogrex
Hi, thanks but the way you are doing it is to assign the values of N in the x matrix, knowing from the example I have given where they are supposed to be. While the assumption is, you ONLY have values of N and R and do NOT know where they would be placed in the x and y matrix a-priori, but their p

Re: [R] differing scales for lattice plot panels

2007-11-14 Thread Frede Aakmann Tøgersen
See the scales argument of xyplot: e.g. densityplot(~values | groups, pch=".", scales = list(y = "free")). Best regards Frede Aakmann Tøgersen Scientist UNIVERSITY OF AARHUS Faculty of Agricultural Sciences Dept. of Genetics and Biotechnology Blichers Allé 20, P.O. BOX 50 DK-8830 Tjele Phone

[R] what is the "right" way to obtain frequencies of vector values?

2007-11-14 Thread Vlad Skvortsov
Hi! Let's say I have vector x with positive integer values ranging from 1 to N. I need to obtain another vector y of size N where y[i] contains the number of times value i occurs in x. It is in a sense similar to hist() (with appropriate number of breaks) or table() with numeric "factors". Cur

[R] generate combination set

2007-11-14 Thread aiminy
I have a set data={A,B,C,D,E,F,G} I want to choose 2 letter from 8 letters, i.e. generate the combination set for choose 2 letters from 8 letters. I want to get the liking: combination set={AB,AC,AD,} Does anyone konw how to do in R. thanks, Aimin ___

Re: [R] Moving to a Mac environment - quick question

2007-11-14 Thread Prof Brian Ripley
On Wed, 14 Nov 2007, David Kaplan wrote: > > Hi all, > I'm moving to a Mac platform and have installed R and all seems fine. > My question concerns moving my R objects over. On my pc, which file > contains my R objects and once I copy that, where do I copy it within the > Mac? It is

[R] kalman filter estimation

2007-11-14 Thread adschai
Hi, Following convention below: y(t) = Ax(t)+Bu(t)+eps(t) # observation eq x(t) = Cx(t-1)+Du(t)+eta(t) # state eq I modified the following routine (which I copied from: http://www.stat.pitt.edu/stoffer/tsa2/Rcode/Kall.R) to accommodate u(t), an exogenous input to the system. for (i in 2:N){

Re: [R] reading tables from url

2007-11-14 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Chris. Indeed, I cannot connect to that URL either. So I did a bit of digging and experimentation to find out whether one needed to pass additional hidden options from the form or whether the problem was more to do with how we connect. It turns

[R] Moving to a Mac environment - quick question

2007-11-14 Thread David Kaplan
Hi all, I'm moving to a Mac platform and have installed R and all seems fine. My question concerns moving my R objects over. On my pc, which file contains my R objects and once I copy that, where do I copy it within the Mac? I hope that was clear. Thanks in advance, Davi

Re: [R] geotiff calculations

2007-11-14 Thread Dylan Beaudette
On Wednesday 14 November 2007, Monica Pisica wrote: > Laura, > > As far as i know RGDAL and maybe proj4 will help you with geotiff, but it > may be tricky if you want to preserve the geotiff projection. Your safest > bet is to use a GIS software and ESRI ArcGIS can do everything you want > without

Re: [R] adding in missing values in a sequence

2007-11-14 Thread Marc Schwartz
On Thu, 2007-11-15 at 09:41 +1100, Andrew Hoskins wrote: > Hi, > > I have a data frame with two columns of data, one an indexing column > and the other a data column. My issue is, this data frame is > incomplete and there are missing lines. I want to know how I can > find and add data into

Re: [R] Quantile Regression Question

2007-11-14 Thread roger koenker
Package questions to package maintainers please. "non-positive fis" is not an error, it is a warning -- if the number of negative fis is large relative to the sample size then there is some reason to doubt the plausibility of the specification of the model specified by the rq formula.

[R] Quantile Regression Question

2007-11-14 Thread Arti Mann
Hi, Could you please explain what is non-positive fis error? I have been trying to use quantile regression (rq) procedure and I keep ending up with this error. I haven't been able to find an explanation for the same. Best Regards, Arti Arti Mann Ph.D. Student Department of Information Systems

[R] adding in missing values in a sequence

2007-11-14 Thread Andrew Hoskins
Hi, I have a data frame with two columns of data, one an indexing column and the other a data column. My issue is, this data frame is incomplete and there are missing lines. I want to know how I can find and add data into these missing lines. See example below ## Example data data <- dat

Re: [R] Log random number

2007-11-14 Thread Julian Burgos
Hi Tobias, You'll have to explain what you mean with "log transformed values". If your question is if it is possible to generate random numbers from a normal distribution (using rnorm()) and then getting their logarithm, then you can do that with the obvious caveat that the logarithm is not d

Re: [R] Help with Bartlett's test on linear model

2007-11-14 Thread Ben Bolker
Stephanie Bernard wrote: > > Hi all, > I would like to test the homoegeneity of variances between several > linear model for some analysis of covariance. It seems that the > Bartlett's test is a good test to use but I am having problem using with > linear model and I cannot find any examples

Re: [R] calc dist AB for B at levels of A

2007-11-14 Thread Emmanuel Charpentier
Melanie Ann Harsch a écrit : > I have a question that I have been trying to figure out and I imagine > there is a very simple answer to it. > > I am trying to use the distAB function in the clim.pact package > I have a dataframe with 4 columns in which A is ref pt and B is site > 1. longitude of

Re: [R] adding in missing values in a sequence

2007-11-14 Thread Andrew Hoskins
That seems to have solved it. Thanks Mark. On 15/11/2007, at 9:57 AM, Marc Schwartz wrote: > > On Thu, 2007-11-15 at 09:41 +1100, Andrew Hoskins wrote: >> Hi, >> >> I have a data frame with two columns of data, one an indexing column >> and the other a data column. My issue is, this data frame i

[R] Question about AGNES by Rousseeuw et al. in the package "cluster": How many clusters?

2007-11-14 Thread AUDE MARIE PLONTZ
Dear all, I am no stat wiz and I am just trying to use the AGNES algorithm at my very modest level of statistical of understanding. I have difficulties understanding the ouput from AGNES. My question is: how to interpret the output, especially how do you I know which cluster solution is the best?

Re: [R] label plotting on nmds diagram

2007-11-14 Thread Dave Roberts
Using nmds from package labdsv will work, but you are confusing some elements with ordiplot from package vegan. The plot function in labdsv does not produce a new object, it simply plots the requested ordination. There is an accompanying command "plotid" that puts labels on the ordonation.

Re: [R] Help with Bartlett's test on linear model

2007-11-14 Thread Emmanuel Charpentier
Stephanie Bernard a écrit : > Hi all, > I would like to test the homoegeneity of variances between several > linear model for some analysis of covariance. It seems that the > Bartlett's test is a good test to use but I am having problem using with > linear model and I cannot find any examples on th

Re: [R] adding in missing values in a sequence

2007-11-14 Thread Achim Zeileis
On Thu, 15 Nov 2007, Andrew Hoskins wrote: > Hi, > > I have a data frame with two columns of data, one an indexing column > and the other a data column. My issue is, this data frame is > incomplete and there are missing lines. I want to know how I can > find and add data into these missing lines.

[R] Help with Bartlett's test on linear model

2007-11-14 Thread Stephanie Bernard
Hi all, I would like to test the homoegeneity of variances between several linear model for some analysis of covariance. It seems that the Bartlett's test is a good test to use but I am having problem using with linear model and I cannot find any examples on the internet. There are some exampl

[R] graphics in cocorresp package

2007-11-14 Thread Elisa Santi
I'm using cocorresp package with predictive co-correspondence analysis model. i would need to visulize inside the graphic (plot function) the sample site numbers (is it possible to consider this a "label"?). is there any function to do this? thanks for your help. Elisa Dr. Elisa Santi D

[R] Integrating a two variable function

2007-11-14 Thread Robert Schneider
Hi, I would like to integrate over x the following function: f1 <- function(x,int) x^(p+p.int*int) * (1-x)^(q+q.int) where - p, p.int, q, q.int: fixed parameters - int is a binary variable (0 or 1), and specific to a given x, i.e. x=c(0,0.14,0.29,0.32,...,1) int=c(0,0,1,0,1,1,...,0

Re: [R] intersect character

2007-11-14 Thread Peter Alspach
Kevin How about, for example, plot(1, xlab=quote(B~intersect(A))) Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Kevin J. Thompson > Sent: Thursday, 15 November 2007 5:51 a.m. > To: R-help > Subject: [R] intersect character > >

Re: [R] graphics in cocorresp package

2007-11-14 Thread Gavin Simpson
On Wed, 2007-11-14 at 16:46 +0100, Elisa Santi wrote: > I'm using cocorresp package with predictive co-correspondence analysis > model. > i would need to visulize inside the graphic (plot function) the sample > site numbers (is it possible to consider this a "label"?). > is there any function to do

Re: [R] reading tables from url

2007-11-14 Thread Prof Brian Ripley
On Thu, 15 Nov 2007, Duncan Temple Lang wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi Chris. > > Indeed, I cannot connect to that URL either. So I did a bit of > digging and experimentation to find out whether one needed to > pass additional hidden options from the form or whet

Re: [R] Log random number

2007-11-14 Thread Ravi Varadhan
If you want to generate log-normally distributed random numbers, see: ?rlnorm Note: X is said to be log-normally distributed when log(X) is normally distributed. Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor

Re: [R] Piecewise Linear Regression

2007-11-14 Thread Vadim Ogranovich
Hi, Let me pick up this old thread. How does one extract the locations of the knots (ends of the segments) from the fit object below? Thanks, Vadim >From : roger koenker < roger_at_ysidro.econ.uiuc.edu > Date : Tue 31 May 2005 - 10:23:19 EST It is conventional to fit piecewise linear

Re: [R] Log random number

2007-11-14 Thread Wensui Liu
dont think so, unless i miss something here. please do check the range of normal random number and the domain of log function. On 11/14/07, Tobias Schlottmann <[EMAIL PROTECTED]> wrote: > > >Dear R users, > > Simply my question is that how it is possible to generate some random > numbers us

[R] calc dist AB for B at levels of A

2007-11-14 Thread Melanie Ann Harsch
I have a question that I have been trying to figure out and I imagine there is a very simple answer to it. I am trying to use the distAB function in the clim.pact package I have a dataframe with 4 columns in which A is ref pt and B is site 1. longitude of A 2. Latitude of A 3. longitude of B 4. L

[R] Generating these matrices going backwards

2007-11-14 Thread francogrex
I have generated the following: x= E1 E2 E3 D1 0 0 1 D2 1 0 3 D3 0 2 0 y= E1 E2 E3 D1 0 0 1.75 D2 1.750 1.3125 D3 0 3.5 0 Where x and y are linked by:

[R] Log random number

2007-11-14 Thread Tobias Schlottmann
Dear R users, Simply my question is that how it is possible to generate some random numbers using rnorm( ) but in log transformed values. Thank you, Tobias - [[alternative HTML version deleted]] _

[R] Error while calculating AOV

2007-11-14 Thread apsawant
Hi , I am new to R. I am trying to run a simple example script to calculate AOV. Below is the script file (aov.R) I am trying to execute: aov.R -- data1<-c(49,47,46,47,48,47,41,46,43,47,46,45,48,46,47,45,49,44,44,45,42,45,45,40 ,49,46,47,45,49,45,41,43,44,46,45,40,45,43,44,45,48,46,40,45,40,4

[R] differing scales for lattice plot panels

2007-11-14 Thread Joe Bloggs
Hi, I want to compare densities across several groups with: densityplot(~values | groups, pch=".") However one of the groups has an almost point-like distribution. This forces the y-axis scale to be so large that the other distribution curves are all flat in comparison and get lost amongst th

Re: [R] where is library file

2007-11-14 Thread Prof Brian Ripley
On Wed, 14 Nov 2007, Casey,Richard wrote: > While trying to install R on 64-bit HP Proliant and RedHat Enterprise > Linux v.4 using R-2.6.0-3.rh4.x86_64.rpm, it says: > > Failed dependencies: libg2c.so.0()(64bit) is needed by R > > Does anyone know where to get libg2c.so or the rpm to install it?

[R] Changing the text in the strips of lattice plots and y axis

2007-11-14 Thread Judith Flores
Dear R-helpers, I am sorry for asking something I know has been asked before, I have tried different combinations in the strip function without success... I am using version 2.5.1 and work on a PC. I have barcharts generated from the following formula: barchart(y1+y2+y3~x | g) I ne

Re: [R] map - mapproj : problem of states localisation

2007-11-14 Thread Ray Brownrigg
On Wed, 14 Nov 2007, Amandine Chevalier wrote: > Thank you very much for your help, > > I work about my code so as to give you the example (attached file) : > > In the first case (azequalarea projection), france from the "france" map > and from the "world" map are well superimposed, whereas in the

Re: [R] Generating these matrices going backwards

2007-11-14 Thread Chris Stubben
Maybe something like this? N<-c(1,2,1,3) ## create empty matrix x<-diag(0,3) ## fill off diagonal x[row(x)==col(x)+1]<-N[1:2] # fill 3rd column x[1:2,3]<-N[3:4] Or create a function and return both x and y mat3<-function(N) { x<-diag(0,3) # fill each element separately x[2,1]<-N[1] x[3,2]<-N

[R] where is library file

2007-11-14 Thread Casey,Richard
Hello, While trying to install R on 64-bit HP Proliant and RedHat Enterprise Linux v.4 using R-2.6.0-3.rh4.x86_64.rpm, it says: Failed dependencies: libg2c.so.0()(64bit) is needed by R Does anyone know where to get libg2c.so or the rpm to install it? --

Re: [R] How to get row numbers of a subset of rows

2007-11-14 Thread affy snp
Thank you very much, Julian. I got it. Best, Allen On Nov 14, 2007 2:38 PM, Julian Burgos <[EMAIL PROTECTED]> wrote: > One way to do this is > > range(which(B[,2]==1)) > > Julian > > > affy snp wrote: > > Hello list, > > > > I read in a txt file using > > > > > > > by specifying the row.name

Re: [R] executable script

2007-11-14 Thread Peter Alspach
Kia ora unknown requestor One option is to create a .bat file along the following lines: path_to_R\bin\R CMD BATCH yourScript.R Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of mysimbaa > Sent: Thursday, 15 November 2007 6:10 a.m.

Re: [R] How to get row numbers of a subset of rows

2007-11-14 Thread Julian Burgos
One way to do this is range(which(B[,2]==1)) Julian affy snp wrote: > Hello list, > > I read in a txt file using > > > by specifying the row.names=NULL so that the rows are numbered. > Below is an example after how the table looks like using > > > SNPChromosome Phys

Re: [R] label plotting on nmds diagram

2007-11-14 Thread Gavin Simpson
On Wed, 2007-11-14 at 15:19 -0300, Antonio Olinto wrote: > Hi Gavin, thanks for your message. > > You are right. The function nmds is from library labdsv and not from vegan. My > mistake. > > Well, that's what I did: > > library(vegan) > library(labdsv) > nms.euc <- nmds(dis.euc,4) > initial va

[R] reading tables from url

2007-11-14 Thread stubben
I'm trying to read some web tables directly into R. These are both genome sequencing projects (eukaryotes and metagenomes) from NCBI and look very similar; however, only the first one works. http://www.ncbi.nlm.nih.gov/genomes/leuks.cgi http://www.ncbi.nlm.nih.gov/genomes/lenvs.cgi I added

[R] About print a label in plot

2007-11-14 Thread affy snp
Dear list, Hello! I have a question about how to print a label in the plot. I am using the following code: 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, minimal, self-contained, reproducible code.

Re: [R] enumeration variable by groups

2007-11-14 Thread jim holtman
Here is a way to do it: > x <- scan(textConnection("1 48 1 45 2 50 2 42 1 41 2 51 1 52 1 43 2 > 52"), what=0L) Read 18 items > x <- matrix(x, ncol=2, byrow=TRUE) > colnames(x) <- c('gender', 'score') > x gender score [1,] 148 [2,] 145 [3,] 250 [4,]

Re: [R] Name collisions

2007-11-14 Thread Prof Brian Ripley
On Wed, 14 Nov 2007, Tim Fennell wrote: > I am receiving a list of name collisions when I launch R as seen below. > I'm new to R and any suggestion or help with how I can go about getting > rid of these collisions would be greatly appreciated. I don't think those messages are from R, but from you

Re: [R] label plotting on nmds diagram

2007-11-14 Thread Antonio Olinto
Hi Gavin, thanks for your message. You are right. The function nmds is from library labdsv and not from vegan. My mistake. Well, that's what I did: library(vegan) library(labdsv) nms.euc <- nmds(dis.euc,4) initial value 13.457832 iter 5 value 8.589716 iter 10 value 7.989993 iter 15 value 7

Re: [R] logistic regression model specification

2007-11-14 Thread Dylan Beaudette
On Nov 13, 2007 4:58 PM, Emmanuel Charpentier <[EMAIL PROTECTED]> wrote: > Pardon me for intruding, but I had recently to explain something > analogous to this to a distinguished physician who had hurt himself > playing with survival models and was bleeding graphs and analyses all > over the place.

[R] enumeration variable by groups

2007-11-14 Thread lamack lamack
Dear all, How can I create an enumeration variable by groups? I have: gender score 1 48 1 45 2 50 2 42 1 41 2 51 1 52 1 43 2 52 and Y would like to get: genderscoreindex 148 1 145 2 141 3

Re: [R] How to get row numbers of a subset of rows

2007-11-14 Thread affy snp
Thanks a lot, Jim and Bert. It worked pretty well. Best, Allen On Nov 14, 2007 12:11 PM, jim holtman <[EMAIL PROTECTED]> wrote: > That works for the specific value of '1', but you would have to repeat > it for other values in the column. If you had 100 different ranges in > that column, wha

[R] Name collisions

2007-11-14 Thread Tim Fennell
I am receiving a list of name collisions when I launch R as seen below. I'm new to R and any suggestion or help with how I can go about getting rid of these collisions would be greatly appreciated. % R R version 2.5.1 (2007-06-27) Copyright (C) 2007 The R Foundation for Statistical Computing I

Re: [R] logistic regression model specification

2007-11-14 Thread Dylan Beaudette
On Nov 14, 2007 5:17 AM, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > > Dylan Beaudette wrote: > > On Tuesday 13 November 2007, Peter Dalgaard wrote: > > > >> Prof Brian Ripley wrote: > >> > >>> On Tue, 13 Nov 2007, Dylan Beaudette wrote: > >>> > Hi, > > I have setup a simple logistic

[R] intersect character

2007-11-14 Thread Kevin J. Thompson
hello, can anyone help me concatenate a string containing the intersect character? i need to use it in a figure legend. thanks, kevin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] How to get row numbers of a subset of rows

2007-11-14 Thread jim holtman
That works for the specific value of '1', but you would have to repeat it for other values in the column. If you had 100 different ranges in that column, what would you do? Here is another solution using 'range' on the same data: > tapply(seq_len(nrow(x)), x$Chromosome, range) $`1` [1] 1 6 $`2`

[R] executable script

2007-11-14 Thread mysimbaa
Dear All, Apologies for this simple question and thanks in advance for any help given. I want to make from my .R script an .exe file. Is there any way to transfort my script to an autolaunch file? It means it runs the script by double clicking on it. p.s.: I'm using windows -- View this mess

Re: [R] How to get row numbers of a subset of rows

2007-11-14 Thread Bert Gunter
Am I missing something? ... Why not: range(seq(nrow(B))[B[,2]==1] ) ?? ## note: "==" not "=" Alternatively, and easily generalized (to start with a frame which is a subset of the original and any subset of rows, contiguous or not) range(as.numeric(row.names(B)[B[,2]==1])) Again, am I missing s

Re: [R] time plotting problem

2007-11-14 Thread John Kane
Thank you Jim. That does give better results. I had not realised how complicated a question I was asking. Both yours and Jim Lemon's solutions work very nicely. I am still messing up the syntax with Gabour's approach. Thanks to all for the fast and valuable help. --- jim holtman <[EMAIL PRO

Re: [R] How to get row numbers of a subset of rows

2007-11-14 Thread jim holtman
Here is a way of doing it using 'rle': > x <- read.table(textConnection(" SNPChromosome > PhysicalPosition + 1 SNP_A-1909444 1 7924293 + 2 SNP_A-2237149 1 8173763 + 3 SNP_A-4303947 1 8191853 + 4 SNP_A-2236359 1

Re: [R] time plotting problem

2007-11-14 Thread John Kane
Thank you. Almost too fancy for the target user but very nice indeed. For some reason I had not thought of using ggplot2. --- hadley wickham <[EMAIL PROTECTED]> wrote: > Here's a version using reshape and ggplot: > > mydata <- > read.table("http://ca.geocities.com/jrkrideau/R/heartdata.txt";

[R] no applicable method for "names"

2007-11-14 Thread Schiller Judith 1541 EB
hi, after installing R-2.6.0 the function "names" doesn't work anymore on my windows xp machine. for example for a simple vector i get > z <- 1:3 > names(x) Error in UseMethod("name"): no applicable method for "names" ... instead of NULL. the same is true for lists and dataframes. attr(z, "name

Re: [R] convex optimization package for R, specifically semidefinite programming

2007-11-14 Thread roger koenker
Convex optimization is a large problem domain with many interesting new developments, and MOSEK is a particularly good implementation of many of these developments. It is quite easy to get R to speak to MOSEK via R.matlab -- i've been doing this recently for some work on density estimation, but

[R] How to get row numbers of a subset of rows

2007-11-14 Thread affy snp
Hello list, I read in a txt file using 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, minimal, self-contained, reproducible code.

[R] forecasting package installation errors

2007-11-14 Thread Dan Robb
R gurus, I've exhausted my search of online help. This is my last resort. We're running R-2.1.1. I've been told by one of the R users here that we cannot upgrade to the lastest version because of some python rpy wrapper dependency that hasn't caught up to the latest version of R. The softwa

Re: [R] cronbach's alpha

2007-11-14 Thread John Kane
alpha(psychometric) ? --- raymond chiruka <[EMAIL PROTECTED]> wrote: > hie > 1...i'm trying to carryout a relibility > testusing cronbach's alpha what fuctin do i use. > > 2.. this is more of a statistical question.if > the alpha value for all the variables is negative > what doe

[R] as.data.frame.array

2007-11-14 Thread Wollkind, Steven
I've noticed what seems like inconsistent behavior from this function, but I can't figure out if this is intentional or not. If an array has only one element, the names attached to that array are not transferred to the data frame that is returned, while If the array has two or more elements the na

[R] convex optimization package for R, specifically semidefinite programming

2007-11-14 Thread Galkowski, Jan
Recently, a package for convex optimization was announced for Python, based upon the LP solver GLPK, the SDP solver in DSDP5, and the LP and QP solvers in MOSEK. I'm aware GLPK is available for R, but wondered if anyone had good packages for convex optimization along these lines for R. TIA.

Re: [R] time plotting problem

2007-11-14 Thread John Kane
Excellent, that looks very nice! I had not realised that plotrix would do that and I was definately hesitating to try and figure out how to do it myself. Any idea why all I was getting was a single date on the x-axis when just doing plot? --- Jim Lemon <[EMAIL PROTECTED]> wrote: > John Kan

Re: [R] label plotting on nmds diagram

2007-11-14 Thread Gavin Simpson
On Wed, 2007-11-14 at 11:22 -0300, Antonio Olinto wrote: > Hi, > > I'm using nmds command (library vegan) to analyze some fishing data. I doubt it - there is no nmds command. Do you mean metaMDS() ? This uses isoMDS() from package MASS with some extra features. > > I'd like to plot not only poi

Re: [R] problems with splinefun()

2007-11-14 Thread jim holtman
Exactly what values do you want "right away"? You can do: result <- spline(.) and then reference 'result$x' and 'result$y'. Can you be more specific on your request and provide an example of what you are currently doing (with data) and what you expect the results to be. On Nov 14, 2007 5:3

[R] label plotting on nmds diagram

2007-11-14 Thread Antonio Olinto
Hi, I'm using nmds command (library vegan) to analyze some fishing data. I'd like to plot not only points, but also the names of species and stations in a specified position. I used the command text(nmds$points[,1], nmds $points[,2],labels=row.names(nmds $points),pos=3,cex=0.5) But the labels a

Re: [R] test for existance of a method for given class

2007-11-14 Thread William Valdar
Thanks Brian, that helps a lot. For others interested, a few variants for testing existance of methods are below: # modified sub/grep of BDR's example hasS3method.1 <- function(f, x) { if(is.object(x)) x <- oldClass(x) m <- methods(f) pattern <- paste("^", f, ".", sep="") cl <

[R] geotiff calculations

2007-11-14 Thread Monica Pisica
Laura, As far as i know RGDAL and maybe proj4 will help you with geotiff, but it may be tricky if you want to preserve the geotiff projection. Your safest bet is to use a GIS software and ESRI ArcGIS can do everything you want without using R. To calculate differences, mean, and so on is a si

Re: [R] logistic regression model specification

2007-11-14 Thread Peter Dalgaard
Dylan Beaudette wrote: > On Tuesday 13 November 2007, Peter Dalgaard wrote: > >> Prof Brian Ripley wrote: >> >>> On Tue, 13 Nov 2007, Dylan Beaudette wrote: >>> Hi, I have setup a simple logistic regression model with the glm() function, with the follow formula: >

Re: [R] Generating log transformed random numbers

2007-11-14 Thread David Scott
If you are after the lognormal distribution, I would recommend you use the lognormal functions from R itself. Check them out with ?dlnorm David Scott On Wed, 14 Nov 2007, Scionforbai wrote: > If what you want is a lognormal distribution of n values you can use > the following transformations

[R] Projection of Shapefiles using Maptools

2007-11-14 Thread Jens Oldeland
Dear R-Users I have successfully imported my Shapefile using maptools with the following command lines, and I hoped that my object (nc) will be recognized as projected data, so I have included the CRS command: library(maptools) p4s = CRS("+proj=longlat +datum=WGS84") nc = readShapePoints("D:/P

Re: [R] combine two dataframe

2007-11-14 Thread Gabor Grothendieck
On Nov 14, 2007 4:59 AM, sun <[EMAIL PROTECTED]> wrote: > Thanks all for the answers. Both Merge and sqldf works perfectly for me. > Well, I feel sqldf run a littile bit slower. And I failed to install this > package (sqldf ) on my linux box. Have never heard of anyone not being able to install sq

Re: [R] Generating log transformed random numbers

2007-11-14 Thread Scionforbai
If what you want is a lognormal distribution of n values you can use the following transformations: lognorm1 <- M*exp((rnorm(n)*sigma)-sigma^2/2.) which gives a lognormal distribution such that: mean(lognorm1)=M ; var(lognorm1)=M^2*(exp(sigma^2)-1); Changing the sigma (standard deviation) you alw

[R] Weights argument in loess (stats)

2007-11-14 Thread Felix Lamp
Hello, I have a question concerning the weights argument of the loess function in the stats package. Do the weights correspond to multiplying the local regression equation by the weights or by the square root of the weights (like in lm). In "http://www.netlib.org/a/cloess.pdf"; page 7 it appears

Re: [R] ESRI Shapefile for EU-25

2007-11-14 Thread Millo Giovanni
Dear Albrecht, on ESRI's site you should be able to download a shapefile with details down to NUTS2 for the area you're interested in. Check http://www.esri.com/data/download/basemap/how_to_download.html out. Please also consider posting such questions on the R-sig-Geo mailing list (submissions t

Re: [R] test for existance of a method for given class

2007-11-14 Thread Prof Brian Ripley
On Wed, 14 Nov 2007, William Valdar wrote: > Dear All, > > I want to test whether a method exists for given object. For example, > whether a function "deviance" is defined for an object of the "lm" class. For an S3 generic 'f' and with an S3 object or an S3 class 'x', try hasS3method <- function

[R] Generating log transformed random numbers

2007-11-14 Thread Tobias Schlottmann
Dear R users, My question is that how it is possible to generate some random numbers using rnorm( ) function but in log transformed values. Thank you, Tobias - [[alternative HTML version deleted]]

[R] test for existance of a method for given class

2007-11-14 Thread William Valdar
Dear All, I want to test whether a method exists for given object. For example, whether a function "deviance" is defined for an object of the "lm" class. My imperfect understanding leads me to think something like hasMethod("deviance", object) hasMethod("deviance", "lm") existsMethod("dev

Re: [R] Newbie question about data preparation

2007-11-14 Thread Dieter Menne
Heidemeier Dr, Joachim uba.de> writes: > ... > For the analyses of the data I want to group one column (like the > classes in a histogram). > So I'd like to add one column with the center of each group with width=2 > for an x value in the interval of the class. > So the output should look like

[R] problems with splinefun()

2007-11-14 Thread david csongor
I am working with the function: splinefun() ... When plugging in the variables, I get the function program as if though having only entered '"splinefun". only way to get the values is by spline(xxx,yyy, n=length(xxx)/10, ties = mean)$x and spline(xxx,yyy, n=length(xxx)/10, ties = mean)$y. I'm j

[R] polygon overlap in multidimensional space

2007-11-14 Thread newRuser
Hi, I was wondering if there is any function in R that can be used to check for overlapping polygons in multidimensional space? I've used overlap.xypolygon for 2D, but what if I want to check, for example, in 5D? Any help would be greatly appreciated! Thanks, newRuser __

Re: [R] combine two dataframe

2007-11-14 Thread sun
Thanks all for the answers. Both Merge and sqldf works perfectly for me. Well, I feel sqldf run a littile bit slower. And I failed to install this package (sqldf ) on my linux box. Denver, your approach also works, but in my case, data frame A has much more rows then B, so B has to be duplicate

Re: [R] time plotting problem

2007-11-14 Thread Jim Lemon
John Kane wrote: > I clearly spoke too soon. > > With the actual data I am not getting sensible x-axis > units. The program with the actual data below. Graph > output is here: > http://ca.geocities.com/jrkrideau/R/hd.png . > > I seem to be getting only a single entry for the > x-axis of "20

[R] R Crashes on certain calls of Adapt

2007-11-14 Thread Omkar Muralidharan
I'm having trouble with adapt. I'm trying to use it in a Bayesian setting, to integrate the posterior distribution, and to find posterior means. I tried using the following script, and things went ok: data = rnorm(100,0.2,1.1) data = c(data,rnorm(10,3,1)) data = data[abs(data)<2*sd(data)] prior =

[R] Help about nnet library

2007-11-14 Thread Pierre-Henri BUSSIERE
Hello, First of all I am french, so please forgive me, if there are some big language mistakes in my sentences. I think, it is the good mail address to send my question, if not please tell me and forgive me. I am working on a project, and I use the nnet library. Our customers do not want us t

[R] 50% Off Sale, Wednesday Only

2007-11-14 Thread Kohls.com
http://e.kohls.com/a/tBHOp0BBBZVhBBiZzO2BVHiEYU4/[EMAIL PROTECTED] 50% Off Sale Wednesday Only Give a warm welcome to cooler temperatures! Stock up and save on sweaters for everyone in all the latest fashions! Shop your loc

[R] Hottelings T2-test for multivariate lingitudinal data

2007-11-14 Thread Mauricio Malfert
Dear R-users I've simulated a longitudinal multivariate normal data set from which I've simulated missing-patterns such as MCAR MAR and a simple kind of non-MAR. I've imputated the values so I now have 'complete' data sets. I'm trying to perform a T2-test as done in the multivariate case under th e

Re: [R] cronbach's alpha

2007-11-14 Thread Dimitris Rizopoulos
look also at functions cronbach.alpha() and descript(), in the 'ltm' package. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015

[R] Newbie question about data preparation

2007-11-14 Thread Heidemeier Dr, Joachim
I'm new to the R language and still struggling with compactness of R. I haven't got the right compass into the Documentation, too. So, please apologize the possibly stupidiy of my question. I have the following problem: I have two data sets combined in a data.frame x y 1.3 2.2 2.5 3.4

[R] geotiff calculations

2007-11-14 Thread Laura Poggio
Dear list, I have to compare two digital elevation models in raster format (geotiff). I then have to calculate the differences in altitude for each cell and make some statistics (basic as mean, median, std, range but also more "advanced" as RMSE) on that. I do not know very much how to proceed: 1)

[R] Odp: Getting mean in a dataframe

2007-11-14 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 13.11.2007 23:29:25: > Sorry to hijack this thread. I have a similar but slightly different > situation. Using the original poster's example, how to elegantly get > the mean of column V2 when column V1 is either A or C and F1 is 0? I do not fully understand. You