Re: [R] How to do more advanced cross tabulation in R?

2008-01-23 Thread Domenico Vistocco
You could have a look at the reshape package. Ciao, domenico tom soyer wrote: > Hi, > > I am trying to reproduce some functionalities of Excel pivot table in R, > sadly, I couldn't figure out how to do it. I am wondering if this is even > possible in R. Does anyone know? > > Here is an example: >

Re: [R] install ncdf package on a 64-bit machine

2008-01-23 Thread Prof Brian Ripley
On Wed, 23 Jan 2008, Katharine Mullen wrote: > I am running 64-bit Ubuntu 7.10 and unfortunately remember seeing that > error message but not how I got it to go away. > > I would first try compiling netcdf-3.6.2 from source, without changing the > default directories for installation. You need to

Re: [R] GUIs under 'unix' (was a Q about R in unix)

2008-01-23 Thread Prof Brian Ripley
Well, a more appropriate subject would help (see the posting guide), as would a more precise description of the server OS. Look at the R GUIs link on http://www.r-project.org/other-projects.html. I'd look at JGR if you can get it to work - 'unix' is non-specific and it is often hard enough to g

[R] Problem with estimation of distribution parameters

2008-01-23 Thread Oliver Herbst
Hi, I tried to calculate the MLE estimation of a parameter of a gamma distribution of a data set, which is called "amount".. I did it with the command: fitdistr(amount,"gamma") and got the error message: Error in optim(x = c(363.36, 551.15, 603.91, 170.99, 225.21, 218.01, 1816.82, :

[R] Problem with geom_line

2008-01-23 Thread Pilar Loren
Hi!, I need help, I have a problem with geom_line function because I have this error: > df LENGTH LAT 091639 10.002 42.26282 091640 30.808 42.26834 091641 21.591 42.31689 091642 22.030 41.53246 091643 22.744 42.01954 091644 12.702 42.67751 091645 39.728 42.06479 091647 63.057 41.25283

Re: [R] ODE's in R

2008-01-23 Thread Markku Karhunen
Thank you all. We must think about implementing these packages. In the meantime, I should clarify my question: Is there any evidence that doing the dumb for loop discretisation is any more dangerous in R, than in any other language? Apparently not? Best, Markku Karhunen > have you looked at ls

[R] Package Building and Name Space

2008-01-23 Thread Johannes Graumann
Hello, I just don't get this and would appreciate if someone could write a line or two: I'm trying to build this package and it stops installing after I add the following to the NAMESPACES file: >importFrom(gsubfn,strapply) The error during the package test is: Error in MyPackage::MyFunction :

Re: [R] Stationarity of a Time Series

2008-01-23 Thread David Jones
Prof Brian Ripley wrote: > On Tue, 22 Jan 2008, Pfaff, Bernhard Dr. wrote: > >> Hello Stephen, >> >> stationarity tests as well as unit root tests have been implemented >> in a couple of packages. For instance, as already mentioned: >> tseries, but >> also uroot, fUnitRoots and urca. See the ann

[R] MDSplot randomForests symbols instead colors

2008-01-23 Thread Diana Perdiguero
I would like to publish a MDS plot from a randomForests analysis, but I only know how to get it in colors (6 different classes) and I need it with symbols. Do you know how to do it? Thank you very much in advance Best diana -- View this message in context: http://www.nabble.com/MDSplot-randomFo

Re: [R] Need suggestions about GUI

2008-01-23 Thread ronggui
There is a problem with font<- . g<-gtext(con=T) enter some text, and select a chunk of text. font(g) <- c("color"="red") Now I would like to change the color back into "black". But font(g) <- c("color"="black") does not work. Thanks 2008/1/22, j verzani <[EMAIL PROTECTED]>: > ronggui gmail.

Re: [R] Lattice on FreeBSD

2008-01-23 Thread agoralczyk
Hello Gabor and list As you can see in the following example package survival installs without problem, but package lattice cannot be found at the repositories (and I tried different repositories): > install.packages('survival') --- Please select a CRAN mirror for use in this session --- CRAN mir

[R] Two-way non-parametric ANOVA?

2008-01-23 Thread Diana Perdiguero
We need a two-way non-parametric ANOVA in order to analysis properly some ecological data, do you know any reference in R? or how to do it? Thank you very much All the best diana -- View this message in context: http://www.nabble.com/Two-way-non-parametric-ANOVA--tp15039308p15039308.html Sent f

Re: [R] Problem with geom_line

2008-01-23 Thread hadley wickham
On Jan 23, 2008 3:29 AM, Pilar Loren <[EMAIL PROTECTED]> wrote: > Hi!, I need help, I have a problem with geom_line function because I have > this error: > > > df >LENGTH LAT > 091639 10.002 42.26282 > 091640 30.808 42.26834 > 091641 21.591 42.31689 > 091642 22.030 41.53246 > 091643 22

Re: [R] Efficient way for multiplying vectors with a only certain number of rows in a matrix

2008-01-23 Thread Ralph79
Just in case somebody is interested: I found out an efficient way for doing the calculations mentioned below. The code is: n.obs = 800 n.rowsperobs = 300 n.param = 23 Designmat = matrix(rnorm(n.obs*n.rowsperobs*n.param),ncol=n.param) Betamat = t(matrix(rnorm(n.obs*n.param),nrow=n.param)) res=r

[R] from a normal bivariate distribution to the marginal one

2008-01-23 Thread Elisabetta Petracci
Hello, I'm quite new with R and so I would like to know if there is a command to calculate an integral. In particular I simulated a bivariate normal distribution using these simple lines: rbivnorm <- function(n, # sample size mux, # expected value of x

Re: [R] MDSplot randomForests symbols instead colors

2008-01-23 Thread Gavin Simpson
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO On Wed, 2008-01-23 at 02:56 -0800, Diana Perdiguero wrote: > I would like to publish a MDS plot from a randomForests analysis, but I only > know how to get it in colors (6 different classes) and I need it with > symbols. Do you know how to do it? > Than

Re: [R] Two-way non-parametric ANOVA?

2008-01-23 Thread Gavin Simpson
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO On Wed, 2008-01-23 at 02:59 -0800, Diana Perdiguero wrote: > We need a two-way non-parametric ANOVA in order to analysis properly some > ecological data, do you know any reference in R? or how to do it? > Thank you very much > All the best > > diana D

[R] Problems with XP32-"3GB-patch"?/ Worth upgrading to Vista X64?

2008-01-23 Thread Ralph79
Dear R-Users, as I will start a huge simulation in a few weeks, I am about to buy a new and fast PC. I have noticed, that the RAM has been the limiting factor in many of my calculations up to now (I had 2 GB in my "old" system, but Windows still used quite a lot of virtual memory), hence my new c

[R] Lingvopedia as "Language solutions company "

2008-01-23 Thread services
Dear Sir/Madam, Greetings! We take the opportunity to introduce Lingvopedia as "Language solutions company" offering" End to End" Language consultancy. www.lingvopedia.com is an alliance promoted by Rahul Malik who has a vision to make a significant positive difference in the overall needs o

Re: [R] Problems with XP32-"3GB-patch"?/ Worth upgrading to Vista X64?

2008-01-23 Thread Prof Brian Ripley
On Wed, 23 Jan 2008, Ralph79 wrote: > > Dear R-Users, > > as I will start a huge simulation in a few weeks, I am about to buy a new > and fast PC. I have noticed, that the RAM has been the limiting factor in > many of my calculations up to now (I had 2 GB in my "old" system, but > Windows still us

[R] survey: estimating a covariance matrix

2008-01-23 Thread Daniel Oberski
Hello Does anybody happen to know if it is possible to use the survey package to estimate a covariance matrix from a complex survey? I have design weights and clusters (no strata), and want to get a covariance matrix with preferably the effective sample size or else an estimate of the variance-co

Re: [R] Lattice on FreeBSD

2008-01-23 Thread Gabor Csardi
Which R version do you use? You chose mirror #21, that is Germany (Muenchen) to me. The same to you? Btw. Muenchen works for me. Maybe you have an old version of R, survival works with >=2.0.0, but lattice only with >=2.5.0. (The current version is 2.6.1.) I've no other idea what could've gone

Re: [R] Two-way non-parametric ANOVA?

2008-01-23 Thread Matthias Gondan
Hi Diana, Look at Edgar Brunner's Homepage http://www.ams.med.uni-goettingen.de/en/sta/e.brunner.html and here: http://www.ams.med.uni-goettingen.de/en/sof/index.html Unfortunately, the R script for a 2x2 design with two groups and two timepoints (f1.ld.f1.r) seems to be broken. Uncommenting t

Re: [R] Two-way non-parametric ANOVA?

2008-01-23 Thread Frank E Harrell Jr
Gavin Simpson wrote: > hits=-2.6 tests=BAYES_00 > X-USF-Spam-Flag: NO > > On Wed, 2008-01-23 at 02:59 -0800, Diana Perdiguero wrote: >> We need a two-way non-parametric ANOVA in order to analysis properly some >> ecological data, do you know any reference in R? or how to do it? >> Thank you very m

Re: [R] encodings (was Reading .csv file under linux)

2008-01-23 Thread Prof Brian Ripley
As a real-life example, package fdim is marked as being in latin2. However, ?fdim looks more plausible to me in latin1: I'm more confident about this as the original authors are Spanish which language is never (?) written in latin2, and I checked with a Spanish reader. On Tue, 22 Jan 2008, Prof

Re: [R] MLE for censored distributions in R

2008-01-23 Thread Terry Therneau
> Hi just wondering if there is a package that can get the maximum likelihood > or method of moments estimator for distributions with censored data? The > distributions I'm interested in are: Exponential, pareto, beta, gamma and > lognormal. Look at the survreg function in the survival library.

[R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Kevin E. Thorpe
Hello. I am posting this on behalf of a student in my class. I have been introducing them to R. I suspect that the problem I need help with is not so much an R issue, but a MAC config issue, but I don't have enough MAC experience to know what to do. Anyway, on to the problem. We are using Fran

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Gabor Grothendieck
I don't use Mac but a workaround to this type of problem was discussed just recently here: https://stat.ethz.ch/pipermail/r-help/2008-January/151524.html On Jan 23, 2008 9:22 AM, Kevin E. Thorpe <[EMAIL PROTECTED]> wrote: > Hello. > > I am posting this on behalf of a student in my class. I have

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Kevin E. Thorpe
Gabor Grothendieck wrote: > I don't use Mac but a workaround to this type of > problem was discussed just recently here: > > https://stat.ethz.ch/pipermail/r-help/2008-January/151524.html > Thanks, I actually remember reading that thread. However, I'm not sure it's exactly the same problem in t

Re: [R] survey: estimating a covariance matrix

2008-01-23 Thread David Winsemius
"Daniel Oberski" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hello > > Does anybody happen to know if it is possible to use the survey > package to estimate a covariance matrix from a complex survey? > > I have design weights and clusters (no strata), and want to get a > covariance m

Re: [R] from a normal bivariate distribution to the marginal one

2008-01-23 Thread David Winsemius
Elisabetta Petracci <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hello, > > I'm quite new with R and so I would like to know if there is a > command to calculate an integral. > In particular I simulated a bivariate normal distribution using > these simple lines: > > rbivnorm <- functi

Re: [R] MLE for censored distributions in R

2008-01-23 Thread Vincent Goulet
Le mar. 22 janv. à 17:47, Thomas Downey a écrit : > > Hi just wondering if there is a package that can get the maximum > likelihood > or method of moments estimator for distributions with censored > data? The > distributions I'm interested in are: Exponential, pareto, beta, > gamma and > lo

Re: [R] ODE's in R

2008-01-23 Thread Spencer Graves
Markku Karhunen wrote: > Thank you all. > > We must think about implementing these packages. In the meantime, I > should clarify my question: Is there any evidence that doing the dumb > for loop discretisation is any more dangerous in R, than in any other > language? Apparently not? I know of

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Gabor Grothendieck
Clearly its not the same but the workaround is the same. Just use file="" to see the .tex file or file="myfile.tex" followed by manual processing. with pdflatex or other tex engine to get final output. On Jan 23, 2008 9:44 AM, Kevin E. Thorpe <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote:

[R] ggplot / reshape: basic usage

2008-01-23 Thread baptiste Auguié
Hi, I've been trying to do the following simple thing: given a data.frame, > library(reshape) > library(ggplot2) > > df <- data.frame(x=c(1:10),y=sin(1:10),z=cos(1:10)) > dfm<-melt(df, id=c("x"), measured=c("y","z")) i want to plot y and z against x, and add vertical errorbars to the points

[R] help with replacing all comma in a data frame with a dot

2008-01-23 Thread Tom Cohen
Dear list, I have imported a spss data file in R, where a comma is used to separate the decimal numbers, e.g. 3,567 instead of 3.567 as in R. How can I replace the comma with a dot for all values in the data frame >kk ab c d ef

Re: [R] help with replacing all comma in a data frame with a dot

2008-01-23 Thread Henrique Dallazuanna
apply(apply(df, 2, gsub, patt=",", replace="."), 2, as.numeric) or you can read the data file with read.table using dec argument: df <- read.table('clipboard', dec=",", header=T, row.names=1) On 23/01/2008, Tom Cohen <[EMAIL PROTECTED]> wrote: > Dear list, > > I have imported a spss data fi

[R] R binary version with R_MEMORY_PROFILING

2008-01-23 Thread Yoni Stoffman
Hi all, Where can I find an R binary version (>2.4.0 ) for windows that compiled with R_MEMORY_PROFILING? Within our application we are experiencing serious problems with memory usage. And being able to use "Rprofmem" and "tracemem" command seems like our best option. Thanks, Yoni

[R] Parametric survival models with left truncated, right censored data

2008-01-23 Thread Beth Ireland
Dear All, I would like to fit some parametric survival models using left truncated, right censored data in R. However I am having problems finding a function to fit parametric survival models which can handle left truncated data. I have tested both the survreg function in package survival: fit1

[R] Two-way non-parametric ANOVA?

2008-01-23 Thread David Airey
> We need a two-way non-parametric ANOVA in order to analysis properly > some ecological data, do you know any reference in R? or how to do > it? Thank you very much All the best diana > A couple more references here are below. I liked the Scheirer reference. /* Scheirer CJ, Ray WS, Hare N (1

Re: [R] R object as a function

2008-01-23 Thread Tim Hesterberg
This function is a vectorized alternative to integrate: CumIntegrate <- function(f, a = 0, b = 1, nintervals = 5, ...){ # Cumulative integral. f is a function, a and b are endpoints # return list(x,y) of two vectors, # where x = seq(a, b, length = nintervals) # and y = \int_a^{x} f(

Re: [R] Problem with estimation of distribution parameters

2008-01-23 Thread Ben Bolker
Oliver Herbst gmx.de> writes: > > Hi, > > I tried to calculate the MLE estimation of a parameter of a gamma > distribution of a data set, which is called "amount".. I did it with the > command: fitdistr(amount,"gamma") > > and got the error message: > > Error in optim(x = c(363.36, 551.15,

Re: [R] Package Building and Name Space

2008-01-23 Thread Michał Bojanowski
Hi Johannes, Apparently the package 'strapply' does not have the namespace, so you cannot use importFrom directive to import gsubfn() from it. In that case, I believe, you need to rely on the "old" mechanism using require(). Apart from that, it also seems that 'strapply' package is not even in th

Re: [R] survey: estimating a covariance matrix

2008-01-23 Thread David Winsemius
David Winsemius <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > "Daniel Oberski" <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > >> Hello >> >> Does anybody happen to know if it is possible to use the survey >> package to estimate a covariance matrix from a complex survey? >>

Re: [R] help with replacing all comma in a data frame with a dot

2008-01-23 Thread Peter Dalgaard
Tom Cohen wrote: > Dear list, > > I have imported a spss data file in R, where a comma is used to separate > the decimal numbers, e.g. 3,567 instead of 3.567 as in R. How can I replace > the comma with a dot for all values in the data frame > How did you read the data in the first place

Re: [R] R binary version with R_MEMORY_PROFILING

2008-01-23 Thread Duncan Murdoch
On 1/23/2008 10:41 AM, Yoni Stoffman wrote: > Hi all, > > > > Where can I find an R binary version (>2.4.0 ) for windows that compiled > with R_MEMORY_PROFILING? > > > > Within our application we are experiencing serious problems with memory > usage. And being able to use "Rprofmem" and "tr

[R] newbie:looking for an efficient way to compute distance vector

2008-01-23 Thread papagenic
dear experts, I am new to R and am trying to compute a vector y from a vector x where : y[i] = sign(x[j]-x[i])*(j-i) with j the first index after i where abs(x[j]-x[i]) > to a given step y[i] is 0 if there is no such j I can write this in R as follows for(i in 1:length(x)) { y[i]=0 for(j

Re: [R] R binary version with R_MEMORY_PROFILING

2008-01-23 Thread Prof Brian Ripley
On Wed, 23 Jan 2008, Yoni Stoffman wrote: > Hi all, > > Where can I find an R binary version (>2.4.0 ) for windows that compiled > with R_MEMORY_PROFILING? > > Within our application we are experiencing serious problems with memory > usage. And being able to use "Rprofmem" and "tracemem" command s

[R] adjusting y axis labels in lattice plots?

2008-01-23 Thread Thomas Zumbrunn
Are there parameters that would allow adjusting y axis labels in lattice plots? E.g in the following simple example require(lattice) xyplot(rnorm(10) ~ 1:10, scales=list(alternating=2)) it would be nice to have the y axis labels adjusted to the right or at the decimal point instead of left adju

Re: [R] Package Building and Name Space

2008-01-23 Thread Johannes Graumann
Hello, I don't think package gsubfn which is supposed to provide function 'strapply' is the culprit (just yet). The error message was that my own new package has no name space and isn't in the search path (the second is possibly easily explained by the fact that it's supposed to be installed after

Re: [R] newbie:looking for an efficient way to compute distance vector

2008-01-23 Thread Benilton Carvalho
i'm not so sure i understood, but you might want something in the lines of: z <- outer(x, x, "-") (abs(z)>step)*outer(1:length(x), 1:length(x))*z (not tested) b On Jan 23, 2008, at 11:32 AM, papagenic wrote: dear experts, I am new to R and am trying to compute a vector y from a vector

Newsletter: Vielen dank f�r ihre Anmeldung!

2008-01-23 Thread steinfeuerfred
Hallo, Ihre E-Mailadresse "[EMAIL PROTECTED]" wurde in den Newsletterverteiler hinzugefügt. URL: http://www.fueralles.de/cgi-bin/nsl_pro/newsletter.cgi?id=steinfeuerfred Mit freundlichen Grüssen Ihr Newsletter-Team __ R-help@r-project.org mailing l

Re: [R] Two-way non-parametric ANOVA?

2008-01-23 Thread David Airey
:) I was curious what you would say! Frank was kind enough to send this off list, but it's worth posting to the thread. On Jan 23, 2008, at 10:52 AM, Frank E Harrell Jr wrote: > David Airey wrote: >>> We need a two-way non-parametric ANOVA in order to analysis >>> properly some ecological

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Frank E Harrell Jr
Gabor Grothendieck wrote: > I don't use Mac but a workaround to this type of > problem was discussed just recently here: > > https://stat.ethz.ch/pipermail/r-help/2008-January/151524.html I don't think that addresses the problem. If xdvi is truly in the system path then the problem is very stra

[R] [R-pkgs] MiscPsycho 1.1 uploaded to CRAN

2008-01-23 Thread Doran, Harold
Version 1.1 of the MiscPsycho package had been uploaded to CRAN. The package has been updated to include the following: 1) The irt.ability() function that estimates examinee ability given a set of item parameters. The function is very general and can be used to estimate ability when there are only

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Kevin E. Thorpe
Gabor Grothendieck wrote: > It eliminates Hmisc and R by giving you a tex file. Now its up > to you to figure out how to handle tex files on your system. I have suggested the student try options(xdvicmd="fullpathtoxdvi") to see what happens. > On Jan 23, 2008 12:20 PM, Frank E Harrell Jr <[EMAIL

[R] How do I get a character and a symbol in a legend

2008-01-23 Thread steve
In the following snippet plot(1:10,1:10,type="n") points(1:5,1:5,pch="+") points(6:10,6:10,pch=20) legend(5,5, c("A","B"), pch=c("+",20)) I want to get a legend with a "+" and a solid circle (pch=20). However, what I get in the legend is "+" and "2". How can I get a "+" and a solid circle? than

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Gabor Grothendieck
It eliminates Hmisc and R by giving you a tex file. Now its up to you to figure out how to handle tex files on your system. On Jan 23, 2008 12:20 PM, Frank E Harrell Jr <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: > > I don't use Mac but a workaround to this type of > > problem was disc

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Frank E Harrell Jr
Gabor Grothendieck wrote: > It eliminates Hmisc and R by giving you a tex file. Now its up > to you to figure out how to handle tex files on your system. That's true but quick previewing of the LaTeX result is useful. I frequently type latex(describe(mydataframe)) for example. Everything is p

Re: [R] How do I get a character and a symbol in a legend

2008-01-23 Thread Henrique Dallazuanna
Try: plot(1:10,1:10,type="n") points(6:10,6:10,pch=20) points(1:5,1:5,pch=3) legend(5,5, c("A","B"), pch=c(3,20)) On 23/01/2008, steve <[EMAIL PROTECTED]> wrote: > In the following snippet > > plot(1:10,1:10,type="n") > points(1:5,1:5,pch="+") > points(6:10,6:10,pch=20) > legend(5,5, c("A","B"),

Re: [R] How do I get a character and a symbol in a legend

2008-01-23 Thread Peter Dalgaard
steve wrote: > In the following snippet > > plot(1:10,1:10,type="n") > points(1:5,1:5,pch="+") > points(6:10,6:10,pch=20) > legend(5,5, c("A","B"), pch=c("+",20)) > > I want to get a legend with a "+" and a solid circle (pch=20). > However, what I get in the legend is "+" and "2". How can I get a "

[R] How do I get a character and a symbol in a legend

2008-01-23 Thread Lauri Nikkinen
Perhaps: plot(1:10,1:10,type="n") points(1:5,1:5,pch="+") points(6:10,6:10,pch=20) legend(5,5, c("A","B"), pch=c("+", NA)) legend(5,5, c("A","B"), pch=c(NA, 20)) -Lauri __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

[R] Newsletter: Ihre E-Mailadresse wurde ausgetragen.

2008-01-23 Thread steinfeuerfred
Hallo, Ihre E-Mailadresse "[EMAIL PROTECTED]" wurde aus dem Verteiler entfernt. URL: http://www.fueralles.de/cgi-bin/nsl_pro/newsletter.cgi?id=steinfeuerfred Mit freundlichen Grüssen Ihr Newsletter-Team __ R-help@r-project.org mailing list https://sta

[R] Bar width and labels in barchart

2008-01-23 Thread Spilak,Jacqueline [Edm]
Hi everyone I am using barchart to make my graphs. Here is my code. barchart(percent_below ~ factor(Year)| factor(Season, levels=unique(Season)), data= .season_occurrence, origin = 0, layout = c(4, 1), scales=list(tick.number=ticknum,labels=NULL), ylim=c(0, ymax), group = factor(Yea

Re: [R] ggplot / reshape: basic usage

2008-01-23 Thread John Kane
I don't understant what you're doing with the means calculation. Howvever if you want the standard errors ( your se function) then will this do what you want? df <- data.frame(x=c(1:10),y=sin(1:10),z=cos(1:10)); df dfm<-melt(df, id=c("x"), measured=c("y","z")); dfm se <- function(x) sd(x)/sqr

Re: [R] from a normal bivariate distribution to the marginal one

2008-01-23 Thread Giovanni Petris
Somebody has already replied in probably more constructive terms. However, I would like to add a comment. > Now, I would like to find the marginal distribution of y from the > bivariate distribution. The distribution of y is a theoretical property that cannot be _found_ from a data set. You ca

Re: [R] Lattice on FreeBSD

2008-01-23 Thread Armin Goralczyk
On Jan 23, 2008 1:59 PM, Gabor Csardi <[EMAIL PROTECTED]> wrote: > Which R version do you use? You chose mirror #21, that is > Germany (Muenchen) to me. The same to you? > Btw. Muenchen works for me. > > Maybe you have an old version of R, survival works with >=2.0.0, > but lattice only with >=2.5.

[R] Free Online: Data Mining Intro for Beginners, Vendor-Neutral, January 29, February 19

2008-01-23 Thread Lisa Solomon
ONLINE VENDOR NEUTRAL INTRO TO DATA MINING FOR ABSOLUTE BEGINNERS (no charge) A non-technical data mining introduction for beginners January 29, 2008, 10AM-11AM PST February 19, 2008, 4PM-5PM PST To register: http://salford.webex.com This one-hour webinar is a perfect place to start if you are ne

Re: [R] help with replacing all comma in a data frame with a dot

2008-01-23 Thread John Kane
I think this will do it. mysub <- function(x) {sub(",",".",x)} mydata <- (apply(kk, 2, mysub )) kk1 <- data.frame(apply(mydata, 2, as.numeric)) --- Tom Cohen <[EMAIL PROTECTED]> wrote: > Dear list, > > I have imported a spss data file in R, where a > comma is used to separate the decima

Re: [R] Two-way non-parametric ANOVA?

2008-01-23 Thread David Airey
While I defer to Frank as far as expertise goes, not having access to his paper, I googled, and I just read that this kind of model is not possible when there are a lack of ties for ranks in the data, and adds an intercept for every rank in the data set. So while interpretation doesn't get

[R] formula for nls

2008-01-23 Thread Jarek Jasiewicz
Hi! How to write in model's formula of type: nls(y~k/(x^n), data=data, start=list(k=1,n=1)) i.e the problem is on x^n, I(x^n) generate error thanks Jarek __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] formula for nls

2008-01-23 Thread Gabor Grothendieck
Try port algorithm. Please provide complete reproducible code and data when posting. > y <- 1/(x <- 1:5) > nls(y~k/x^n, start=list(k=1, n=1), algorithm = "port") Nonlinear regression model model: y ~ k/x^n data: parent.frame() k n 1 1 residual sum-of-squares: 0 Algorithm "port", converge

Re: [R] formula for nls

2008-01-23 Thread Jarek Jasiewicz
Gabor Grothendieck wrote: > Try port algorithm. Please provide complete reproducible code and data > when posting. > > >> y <- 1/(x <- 1:5) >> nls(y~k/x^n, start=list(k=1, n=1), algorithm = "port") >> > Nonlinear regression model > model: y ~ k/x^n >data: parent.frame() > k n > 1 1

[R] Multivariate Statistics Short Course?

2008-01-23 Thread Juhlin, Kenton
We are looking for someone to teach a 1-day course in multivariate analysis. This is for a group of 50-80 statisticians who work on various projects in health care, consumer research, and other areas of our business. We are not especially interested in a chemometrics-oriented course. The primary

Re: [R] Need suggestions about GUI

2008-01-23 Thread Michael Lawrence
On Jan 22, 2008 6:41 AM, ronggui <[EMAIL PROTECTED]> wrote: > Thanks, John, > Here is some code to show what I want to do. BTW, it seems there is a > bug in svalue in gWidgetstcltk for gtext when using the drop=T > argument. > > getsel <- function(obj, toolkit, ...) { > ### get the selected text f

Re: [R] adjusting y axis labels in lattice plots?

2008-01-23 Thread Deepayan Sarkar
On 1/23/08, Thomas Zumbrunn <[EMAIL PROTECTED]> wrote: > Are there parameters that would allow adjusting y axis labels in lattice > plots? E.g in the following simple example > > require(lattice) > xyplot(rnorm(10) ~ 1:10, scales=list(alternating=2)) > > it would be nice to have the y axis labels a

[R] writeBin doesn't "send" until readBin executed

2008-01-23 Thread Jake Michaelson
Hi all - I'm playing around with an attempt to do some serial communication from within R to a microcontroller board. I open a connection: zz = file("/dev/ttyUSB0",open="a+") ## text mode ... when I execute writeLines("0",con=zz) I know the board receives the "0" because the board's serial co

[R] image question

2008-01-23 Thread Ajar
Hi, I have a question regarding the image function. Is there a way to specify a separate color set for each column in the matrix? TIA, ajar. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] image question

2008-01-23 Thread Ajar
Hi, I have a question regarding the image function. Is there a way to specify a separate color set for each column in the matrix? TIA, ajar. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

Re: [R] Reading .csv file under linux

2008-01-23 Thread David Scott
Just as an update on encoding (which may or may not be of interest). I changed the read.csv command for three .csv files I was reading to specify the encoding to be encoding="CP1252" and all 3 files were read in without problems on linux. Last night I swapped the analysis back on to my windo

Re: [R] newbie:looking for an efficient way to compute distance vector

2008-01-23 Thread papagenic
hello, I tried your suggestion ,but the first line : z <- outer(x, x, "-") seems to fail pretty quickly as the length of the x vector increases. This is probably because it has to create a matrix of dimension dim(x)*dim(x). I am wondering if that can be quicker than a building a loop. if my ve

[R] Res: image question

2008-01-23 Thread Milton Cezar Ribeiro
Like this? mymat<-matrix(1:1,nc=100) for (nc in 1:dim(mymat)[2]) mymat[nc,]<-nc image(mymat,col=colors()) Miltinho Brazil - Mensagem original De: Ajar <[EMAIL PROTECTED]> Para: R-help@r-project.org Enviadas: Quarta-feira, 23 de Janeiro de 2008 18:36:59 Assunto: [R] image question

[R] Res: image question

2008-01-23 Thread Milton Cezar Ribeiro
Like this? mymat<-matrix(1:1,nc=100) for (nc in 1:dim(mymat)[2]) mymat[nc,]<-nc image(mymat,col=colors()) Miltinho Brazil - Mensagem original De: Ajar <[EMAIL PROTECTED]> Para: R-help@r-project.org Enviadas: Quarta-feira, 23 de Janeiro de 2008 18:36:59 Assunto: [R] image question

Re: [R] formula for nls

2008-01-23 Thread Gabor Grothendieck
On Jan 23, 2008 3:44 PM, Jarek Jasiewicz <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: > > Try port algorithm. Please provide complete reproducible code and data > > when posting. > > > > > >> y <- 1/(x <- 1:5) > >> nls(y~k/x^n, start=list(k=1, n=1), algorithm = "port") > >> > > Nonlinear

Re: [R] Two-way non-parametric ANOVA?

2008-01-23 Thread Frank E Harrell Jr
David Airey wrote: > While I defer to Frank as far as expertise goes, not having access to > his paper, I googled, and I just read that this kind of model is not > possible when there are a lack of ties for ranks in the data, and adds > an intercept for every rank in the data set. So while in

Re: [R] image question

2008-01-23 Thread Duncan Murdoch
On 23/01/2008 4:36 PM, Ajar wrote: > Hi, > > I have a question regarding the image function. Is there a way to > specify a separate color set for each column in the matrix? No, but the crucial part of source of image() the R code in image.default, and you could edit that. zi is a local variab

Re: [R] Two-way non-parametric ANOVA?

2008-01-23 Thread David Airey
. Just goes to show that Frank Harrell beats Google for statistics any day of the week! I have got to try that PO model!! On Jan 23, 2008, at 4:45 PM, Frank E Harrell Jr wrote: > David Airey wrote: >> While I defer to Frank as far as expertise goes, not having access >> to his paper, I goo

Re: [R] Linux, UNIX, XP32, Vista X64 or ...? [SEC=UNCLASSIFIED]

2008-01-23 Thread Jin.Li
Dear All, I am currently using R in Windows PC with a 2 GB of RAM. Some pretty large datasets are expected soon, perhaps in an order of several GB. I am facing a similar situation like Ralph, either to get a new PC with a bigger RAM or else. I am just wondering if R is getting faster in other syste

Re: [R] Linux, UNIX, XP32, Vista X64 or ...? [SEC=UNCLASSIFIED]

2008-01-23 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: > Dear All, > I am currently using R in Windows PC with a 2 GB of RAM. Some pretty large > datasets are expected soon, perhaps in an order of several GB. I am facing a > similar situation like Ralph, either to get a new PC with a bigger RAM or > else. I am just wondering if

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Kevin E. Thorpe
Kevin E. Thorpe wrote: > Gabor Grothendieck wrote: >> It eliminates Hmisc and R by giving you a tex file. Now its up >> to you to figure out how to handle tex files on your system. > > I have suggested the student try options(xdvicmd="fullpathtoxdvi") > to see what happens. Here is the result of

Re: [R] image question

2008-01-23 Thread Charles C. Berry
On Wed, 23 Jan 2008, Ajar wrote: > Hi, > > I have a question regarding the image function. Is there a way to > specify a separate color set for each column in the matrix? Yes. But it will require some attention to the scaling of your matrix. This shows how it might be done: > mat <- matrix( run

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Frank E Harrell Jr
Kevin E. Thorpe wrote: > Kevin E. Thorpe wrote: >> Gabor Grothendieck wrote: >>> It eliminates Hmisc and R by giving you a tex file. Now its up >>> to you to figure out how to handle tex files on your system. >> I have suggested the student try options(xdvicmd="fullpathtoxdvi") >> to see what happ

[R] posterior probability in finite mixture

2008-01-23 Thread Wensui Liu
Dear All, This is a question somewhat off-topic. Say, if I have known the number of components in the mixture, all the estimated parameters, prior probabilities, and so on for a finite mixture model, how might I compute the posterior probabilities of each case for a new dataset without observed r

[R] A bug in circ.plot of CircStats package

2008-01-23 Thread Steven Huang
Hi, i found a bug in circ.plot of CircStats package, namely that the plot ingore the datasets with value = 0. it's simple to fix it, but i cannot seem to figure out where to submit the fix. is there a official procedure of submitting bug report/patch to the contributed packages? -- View this

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-23 Thread Charles C. Berry
On Wed, 23 Jan 2008, Frank E Harrell Jr wrote: > Kevin E. Thorpe wrote: >> Kevin E. Thorpe wrote: >>> Gabor Grothendieck wrote: It eliminates Hmisc and R by giving you a tex file. Now its up to you to figure out how to handle tex files on your system. >>> I have suggested the student tr

Re: [R] navigating ggplot viewports

2008-01-23 Thread Paul Murrell
Hi hadley wickham wrote: > Hi Felix, > > I'm a bit stumped too - it's been a while since I've played around > with viewports in ggplot. I have a feeling that this might be due to > an old bug in grid that I thought had been fixed - you can't > downViewport to a viewport underneath a frame grob.

Re: [R] A bug in circ.plot of CircStats package

2008-01-23 Thread Duncan Murdoch
On 23/01/2008 7:11 PM, Steven Huang wrote: > Hi, > > i found a bug in circ.plot of CircStats package, namely that the plot ingore > the datasets with value = 0. it's simple to fix it, but i cannot seem to > figure out where to submit the fix. is there a official procedure of > submitting bug repor

[R] package manual in pdf

2008-01-23 Thread christophe . genolini
Hi all, I am trying to write a pdf manual for my package. I create a file inst\doc\myDoc.tex. I taught that R CMD build will call latex on this file (like it is said in Writing R extension), but it does not happen. I also notice that a pdf manual is produce automatically but with a not so good pr

Re: [R] package manual in pdf

2008-01-23 Thread Duncan Murdoch
On 23/01/2008 7:37 PM, [EMAIL PROTECTED] wrote: > Hi all, > > I am trying to write a pdf manual for my package. I create a file > inst\doc\myDoc.tex. I taught that R CMD build will call latex on this file > (like > it is said in Writing R extension), but it does not happen. I don't see this in W

Re: [R] ggplot / reshape: basic usage

2008-01-23 Thread hadley wickham
On Jan 23, 2008 10:44 AM, baptiste Auguié <[EMAIL PROTECTED]> wrote: > Hi, > > I've been trying to do the following simple thing: given a data.frame, > > > library(reshape) > > library(ggplot2) > > > > df <- data.frame(x=c(1:10),y=sin(1:10),z=cos(1:10)) > > dfm<-melt(df, id=c("x"), measured=c("y","

  1   2   >