Re: [R] getting started on Bayesian analysis

2004-09-15 Thread Jari Oksanen
On Wed, 2004-09-15 at 03:27, HALL, MARK E wrote: I've found Bayesian Methods: A Social and Behavioral Sciences Approach by Jeff Gill useful as an introduction. The examples are written in R and S with generalized scripts for doing a variety of problems. (Though I never got

Re: [R] getting started on Bayesian analysis

2004-09-15 Thread Anon.
Jari Oksanen wrote: On Wed, 2004-09-15 at 03:27, HALL, MARK E wrote: I've found Bayesian Methods: A Social and Behavioral Sciences Approach by Jeff Gill useful as an introduction. The examples are written in R and S with generalized scripts for doing a variety of problems. (Though I never

[R] Cancor

2004-09-15 Thread Irena Komprej
Dear Gabor, thank you for your answer related to the normalization of cancor coefficients. If you want to interpret the coefficients in terms of variables' contributions to canonical variables, loadings, redundancy measure, etc. , you have to normalize the results so that the canonical variables

[R] Bessel function

2004-09-15 Thread beat.huggler
Dear all Currently, I'm implementing the generalized hyperbolic distribution into Splus. Unfortunately the Bessel function is not implemented in Splus. In R the Bessel function does exist but it is an internal function and I'm not able to look at the code. Is there any possibility to see the

Re: [R] Bessel function

2004-09-15 Thread Dimitris Rizopoulos
Hi Beat, take a look at this link, http://www.statsci.org/s/besseli0.html for the modified Bessel function. I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven,

Re: [R] Cancor

2004-09-15 Thread Prof Brian Ripley
On (she claimed) Thu, 1 Jan 1998, Irena Komprej wrote: Dear Gabor, This is R-help, not `Gabor', although you keep sending mail addressed to `Gabor' to this list. thank you for your answer related to the normalization of cancor coefficients. If you want to interpret the coefficients in terms

Re: [R] Bessel function

2004-09-15 Thread Prof Brian Ripley
On Wed, 15 Sep 2004 [EMAIL PROTECTED] wrote: Currently, I'm implementing the generalized hyperbolic distribution into Splus. Unfortunately the Bessel function is not implemented in Splus. In R the Bessel function does exist but it is an internal function and I'm not able to look at the code.

[R] testing goodness of fit of linear model

2004-09-15 Thread Dewez Thomas
Dear R-users, I've been reading a bunch of things on linear models but cannot quite find a clear answer. How can one determine whether a linear model is significant or not? For background info, I am modelling the response of topographic slope to the distance of a catchment's outlet. Some guys

Re: [R] Bessel function

2004-09-15 Thread Robin Hankin
Hi you might find package(hyperbolicDist) interesting. best wishes rksh Dear all Currently, I'm implementing the generalized hyperbolic distribution into Splus. Unfortunately the Bessel function is not implemented in Splus. In R the Bessel function does exist but it is an internal function and

Re: [R] Bessel function

2004-09-15 Thread Robin Hankin
Hi you might find package(hyperbolicDist) interesting. best wishes robin Dear all Currently, I'm implementing the generalized hyperbolic distribution into Splus. Unfortunately the Bessel function is not implemented in Splus. In R the Bessel function does exist but it is an internal function and

Re: [R] loading error of the Rcmdr library on Debian Sid

2004-09-15 Thread Christian Schulz
Hi, it seems you have to install the rgl package and this demand the gl4 java lib what is necessary, too. http://www.jausoft.com/products/gl4java/gl4java_install.html christian Am Mittwoch, 15. September 2004 12:01 schrieb Thomas Schönhoff: Hello, I just tried to get Rcmdr package

Re: [R] loading error of the Rcmdr library on Debian Sid

2004-09-15 Thread Thomas Schönhoff
Hello Christian, Christian Schulz schrieb: Hi, it seems you have to install the rgl package and this demand the gl4 java lib what is necessary, too. http://www.jausoft.com/products/gl4java/gl4java_install.html Seems like that this dependency is missing in the r-cran-rgl package!? So I am

[R] Density Estimation

2004-09-15 Thread Brian Mac Namee
Hi there, Sorry if this is a rather loing post. I have a simple list of single feature data points from which I would like to generate a probability that an unseen point comes from the same distribution. To do this I am trying to estimate the probability density of the list of points and use this

[R] Read.fwf

2004-09-15 Thread Doran, Harold
Dear List I have a fixed width file with variables of varying width. The help is pretty transparent for this feature, but I can't seem to figure out how I can make effective use of the package with my data. In my dataset, the first 80 columns are of width 1 followed by other variables with width

[R] Density Estimation

2004-09-15 Thread Vito Ricci
Dear Brian, I can suggest you to use density() function to get an estimate of the pdf you're finding (I believe it's unknown). Then you can plot the point you got by density() using plot(). In this way you have a graphic representation of you unknown pdf. According its shape and helping by the

Re: [R] Read.fwf

2004-09-15 Thread Chuck Cleland
You can use rep() in specifying the widths argument to avoid typing all those ones. For example: read.fwf(file=c:\\mydata.dat, widths = c(rep(1,80), 5, 4, 6)) hope this helps, Chuck Doran, Harold wrote: I have a fixed width file with variables of varying width. The help is pretty transparent

Re: [R] Read.fwf

2004-09-15 Thread Uwe Ligges
Doran, Harold wrote: Dear List I have a fixed width file with variables of varying width. The help is pretty transparent for this feature, but I can't seem to figure out how I can make effective use of the package with my data. In my dataset, the first 80 columns are of width 1 followed by other

RE: [R] Bessel function

2004-09-15 Thread Ravi Varadhan
Dear Beat, You might also want to look at the book by Zang and Jin - Computation of Special Functions, John Wiley. They have Fortran sources for all the special functions covered in there. Ravi. Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of

[R] control of font size colour for title, subtitles, axis, and tick marks in LATTICE graph

2004-09-15 Thread Jens Hainmueller
Hi, I very much appreciate any help on this fine tuning problem in a lattice graph (I am new to LATTICE and could not find an example in the help files that worked for me. My apologies if I missed it there). I am running the following box plots to compare conditional distributions of x at

Re: [R] pairs correlations colors

2004-09-15 Thread Uwe Ligges
Valeria Edefonti wrote: I have the following problem. I want to use pairs function and get a matrix of scatterplots with the correlations in the upper panel and the ordinary scatterplots in the lower panel. Moreover, I want to have points colored in five differet ways in the lower panel,

Re: [R] loading error of the Rcmdr library on Debian Sid

2004-09-15 Thread A.J. Rossini
You can apt-get RGL in sid. Thomas Schönhoff [EMAIL PROTECTED] writes: Hello, I just tried to get Rcmdr package working, resulting in: -- library(Rcmdr) Loading required package: tcltk Loading required package:

RE: [R] Bessel function

2004-09-15 Thread Kahra Hannu
Currently, I'm implementing the generalized hyperbolic distribution into Splus. Unfortunately the Bessel function is not implemented in Splus. In R the Bessel function does exist but it is an internal function and I'm not able to look at the code. Is there any possibility to see the code of the

Re: [R] Density Estimation

2004-09-15 Thread Bob Wheeler
Try fitting it with a Johnson function -- see SuppDists. If you can fit it you will then be able to use the functions in SuppDists just as you can for any other distribution supported by R. Brian Mac Namee wrote: Hi there, Sorry if this is a rather loing post. I have a simple list of single

RE: [R] Read.fwf

2004-09-15 Thread Liaw, Andy
It might help to read that help file again: d - paste(c(rep(0, 80), 1), collapse=) d [1] 000 01 f - file(try.dat, w) writeLines(d, f) writeLines(d, f) writeLines(d, f) close(f) fw - c(rep(1, 80), 5) x -

Re: [R] Density Estimation

2004-09-15 Thread Wolski
Hi! The function density returns you a object of class density. This object has an x and an y attribute which you can access by x y, Hi! Use approx and runif. eg.: dd-density(rnorm(100,3,5)) plot(dd) Using the function ?approx you can compute the density value for any x. #the x is a dummy

Re: [R] loading error of the Rcmdr library on Debian Sid

2004-09-15 Thread Thomas Schnhoff
Hello, A.J. Rossini schrieb: You can apt-get RGL in sid. An apt-cache search or (Synaptic search) RGL gives me r-cran-rgl 0.64.13-1. This package is already installed! regards Thomas __ [EMAIL PROTECTED] mailing list

[R] fractal dimension of an image

2004-09-15 Thread Rajarshi Guha
Hello, I have a problem that I think can be solved in R but I'm not sure how to tie things together. I have a digital image of a crystal growth in 2 dimensions. And my aim is to calculate the fractal dimension of the crystal. I was planning to use the box counting method. So I need to read in

RE: [R] Density Estimation

2004-09-15 Thread Ted Harding
On 15-Sep-04 Brian Mac Namee wrote: Sorry if this is a rather loing post. I have a simple list of single feature data points from which I would like to generate a probability that an unseen point comes from the same distribution. To do this I am trying to estimate the probability density of

Re: [R] control of font size colour for title, subtitles, axis, and tick marks in LATTICE graph

2004-09-15 Thread Deepayan Sarkar
On Wednesday 15 September 2004 08:24, Jens Hainmueller wrote: Hi, I very much appreciate any help on this fine tuning problem in a lattice graph (I am new to LATTICE and could not find an example in the help files that worked for me. My apologies if I missed it there). Well, if the examples

[R] adding observations to lm for fast recursive residuals?

2004-09-15 Thread ivo_welch-rstat8783
dear R community: i have been looking but failed to find the following: is there a function in R that updates a plain OLS lm() model with one additional observation, so that I can write a function that computes recursive residuals *quickly*? PS: (I looked at package strucchange, but if I am

Re: [R] adding observations to lm for fast recursive residuals?

2004-09-15 Thread roger koenker
In my quantreg package there is a function called lm.fit.recursive() that, as the .Rd file says: Description: This function fits a linear model by recursive least squares. It is a utility routine for the 'khmaladzize' function of the quantile regression package. Usage:

Re: [R] rolling n-step predictions for ARIMA models

2004-09-15 Thread Paul Gilbert
There are functions in the dse bundle that do this. (See featherForecasts and horizonForecasts.) You might look through the users' guide to get an idea if they are exactly what you want. Paul Gilbert Michael Roberts wrote: Hello: I would like to generate rolling, multiperiod forecasts from an

[R] [R-pkgs] RODBC 1.1-1

2004-09-15 Thread Prof Brian Ripley
The first non-maintenance update of RODBC since January 2003 is now on CRAN and will soon propagate to mirrors. From the ChangeLog: * Select the decimal point from Sys.localeconv. * Add an external reference and finalizer so open channels get closed at the end of the

Re: [R] cluster analysis and null hypothesis testing

2004-09-15 Thread Christian Hennig
Hi, testing the randomness of a cluster analysis is not a well defined problem, because it depends crucially on your null model. In fpc, there is nothing like this. Function prabtest in package prabclus performs such a test, but this is for a particular data structure, namely presence-absence

Re: [R] fractal dimension of an image

2004-09-15 Thread Spencer Graves
From www.r-project.org - search - R site search - fractal dimension, I got 17 hits, the third of which discussed package RandomFields, which includes a function fractal. Are you familiar with this? hope this helps. spencer graves p.s. Have you read the posting guide!

[R] heatmap2

2004-09-15 Thread Paul Lepp
Can anybody tell me where to find a copy of heatmap2? I've seen it in my travels across the web but didn't bookmark it and can't find it again. Thanks in advance. Paul `-:-. ,-;`-:-. ,-;`-:-. ,-;`-:-. ,-;`-:-. ,-;`-:-. `=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/

Re: [R] heatmap2

2004-09-15 Thread Sean Davis
Paul, It is called heatmap.2 and it is in the gregmisc package. Sean On Sep 15, 2004, at 1:03 PM, Paul Lepp wrote: Can anybody tell me where to find a copy of heatmap2? I've seen it in my travels across the web but didn't bookmark it and can't find it again. Thanks in advance. Paul `-:-.

[R] lomb periodogram package

2004-09-15 Thread Richard Bonneau
Hi, Does anyone know the name of the package that includes a function for computing the lomb periodogram on irregular spaced ts data? I saw the package once ~ 1 month ago but cannot find it now ... , Rich __ [EMAIL PROTECTED] mailing list

[R] Problem installing source packages on OS X

2004-09-15 Thread Aric Gregson
I am attempting to install the Hmisc, rreport and Design packages, but am not able to do so. I am running R v1.9.1 on Mac OS 10.3.5. I have tried installation using both the GUI version of R and also running R from sudo in a terminal session. In the terminal I receive the following error: *

Re: [R] Problem installing source packages on OS X

2004-09-15 Thread Jari Oksanen
On 15 Sep 2004, at 20:29, Aric Gregson wrote: I am attempting to install the Hmisc, rreport and Design packages, but am not able to do so. I am running R v1.9.1 on Mac OS 10.3.5. I get the same error for Hmisc (rreport is not on CRAN). It looks like it is trying to use g77 to compile the source

[R] BUGS and OS X

2004-09-15 Thread Tamas K Papp
Is there a way of running BUGS on OS X (from R)? I only see Windows versions on their website. If not, what are the alternatives for Bayesian analysis? Thanks, Tamas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Bessel function

2004-09-15 Thread cstrato
You can find C++ source code for Bessel function and similar functions for example here: http://root.cern.ch/root/htmldoc/src/TMath.cxx.html Hope this helps Best regards Christian -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- C.h.r.i.s.t.i.a.n. .S.t.r.a.t.o.w.a V.i.e.n.n.a. .A.u.s.t.r.i.a

[R] Slightly off-topic --- distribution name.

2004-09-15 Thread Rolf Turner
I've built R functions to ``effect'' a particular distribution, and would like to find out if that distribution is already ``known'' by an existing name. (I.e. suppose it were called the ``Melvin'' distribution --- I've built dmelvin, pmelvin, qmelvin, and rmelvin as it were, but I need a real

Re: [R] BUGS and OS X

2004-09-15 Thread Tamas K Papp
On Wed, Sep 15, 2004 at 02:21:18PM -0400, Liaw, Andy wrote: That's more of a question for the BUGS developers. BUGS is not open source, so whatever binary is provided, that's all you can use. If I'm not mistaken, WinBUGS is the only version under development. I found something called JAGS,

Re: [R] Slightly off-topic --- distribution name.

2004-09-15 Thread A.J. Rossini
Have you checked Johnson and Kotz? That's the obvious place to start looking for distributions beyond the usual. Rolf Turner [EMAIL PROTECTED] writes: I've built R functions to ``effect'' a particular distribution, and would like to find out if that distribution is already ``known'' by an

[R] replacing NA's with 0 in a dataframe for specified columns

2004-09-15 Thread David Kane
I know that there must be a cool way of doing this, but I can't think of it. Let's say I have an dataframe with NA's. x - data.frame(a = c(0,1,2,NA), b = c(0,NA,1,2), c = c(NA, 0, 1, 2)) x a b c 1 0 0 NA 2 1 NA 0 3 2 1 1 4 NA 2 2 I know it is easy to replace all the NA's with

Re: [R] lomb periodogram package

2004-09-15 Thread Earl F. Glynn
Does anyone know the name of the package that includes a function for computing the lomb periodogram on irregular spaced ts data? I saw the package once ~ 1 month ago but cannot find it now ... I have a LombScargleLibrary.R file that I will be talking about at CAMDA '04 in November:

[R] [R-pkgs] Announcing snowFT 0.1

2004-09-15 Thread A.J. Rossini
Parallel programming with snowFT Our package snowFT is now available at CRAN. It is an extention of the package snow, which adds fault tolerance (in the sense of recomputing computational units when hardware/network failures occur on compute nodes) and a tighter notion of reproducibility for

Re: [R] replacing NA's with 0 in a dataframe for specified columns

2004-09-15 Thread Spencer Graves
Have you considered the following: x - data.frame(a = c(0,1,2,NA), b = c(0,NA,1,2), c = c(NA, 0, 1, 2)) x$a[is.na(x$a)] - 0 x$c[is.na(x$c)] - 0 x a b c 1 0 0 0 2 1 NA 0 3 2 1 1 4 0 2 2 hope this helps. spencer graves David Kane wrote: I know that there must be a cool way of doing

Re: [R] replacing NA's with 0 in a dataframe for specified columns

2004-09-15 Thread Corey Moffet
try: x[is.na(x$a) | is.na(x$c),] - 0 At 02:44 PM 9/15/2004 -0400, David Kane wrote: I know that there must be a cool way of doing this, but I can't think of it. Let's say I have an dataframe with NA's. x - data.frame(a = c(0,1,2,NA), b = c(0,NA,1,2), c = c(NA, 0, 1, 2)) x a b c 1 0 0

RE: [R] replacing NA's with 0 in a dataframe for specified columns

2004-09-15 Thread Berton Gunter
But Spencer's solution would require looping to generalize to a large numbers of columns. In fact, you've given the answer already in your post: xsub-x[,somecols] xsub[is.na(xsub)]-0 x[,somecols]-xsub -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of

Re: [R] replacing NA's with 0 in a dataframe for specified columns

2004-09-15 Thread John Fox
Dear David, How about the following? cols - c(1,3) x[,cols][is.na(x[,cols])] - 0 I hope that this helps, John On Wed, 15 Sep 2004 14:44:53 -0400 David Kane [EMAIL PROTECTED] wrote: I know that there must be a cool way of doing this, but I can't think of it. Let's say I have an dataframe

Re: [R] replacing NA's with 0 in a dataframe for specified columns

2004-09-15 Thread Chuck Cleland
mydata - data.frame(a = c(0,1,2,NA), b = c(0,NA,1,2), c = c(NA, 0, 1, 2)) mydata a b c 1 0 0 NA 2 1 NA 0 3 2 1 1 4 NA 2 2 mydata[,c(a, c)] - apply(mydata[,c(a,c)], 2, function(x){replace(x, is.na(x), 0)}) mydata a b c 1 0 0 0 2 1 NA 0 3 2 1 1 4 0 2 2 David Kane wrote: I know

Re: [R] replacing NA's with 0 in a dataframe for specified columns

2004-09-15 Thread Gabor Grothendieck
The col funtion can be helpful here. We want to satisfy two conditions: 1. the element is an NA 2. the element lies in one of the specified columns The first two lines below calculate logical vectors for these two, respectively, and the last line assigns 0 to those elements.

RE: [R] Splitting vector into individual elements

2004-09-15 Thread Liaw, Andy
do.call() is good for this, I believe: offred.rgb - c(1, 0, 0) * 0.60 offred.col - do.call(rgb, c(as.list(offred.rgb), names=offred)) offred.col [1] #99 HTH, Andy From: Paul Roebuck Is there a means to split a vector into its individual elements without going the brute-force route

Re: [R] Splitting vector into individual elements

2004-09-15 Thread Spencer Graves
Have you considered do.call: do.call(rgb, as.list((1:3)/10)) [1] #1A334C same as: rgb(.1, .2, .3) [1] #1A334C Hope this helps. spencer graves Paul Roebuck wrote: Is there a means to split a vector into its individual elements without going the brute-force route for arguments to a

[R] RWAVE axis notation

2004-09-15 Thread Jonathan M. Lees
I am using Rwave wavelets and I need better axis notation. Does anyone have code similar to matlab's centfreq or scale2frq functions that turn a scale for a wavelet transform into a good looking scale to plot on my wavelet transfoms? I am using the rwave package to investigate seismic signals from

Re: [R] Splitting vector into individual elements

2004-09-15 Thread Gabor Grothendieck
Paul Roebuck roebuck at odin.mdacc.tmc.edu writes: : Is there a means to split a vector into its individual : elements without going the brute-force route for arguments : to a predefined function call? : : offred.rgb - c(1, 0, 0) * 0.60; : : ## Brute force style : offred.col -

Re: [R] Splitting vector into individual elements

2004-09-15 Thread John Fox
Dear Paul, How about do.call(rgb, as.list(offred.rgb)) ? I hope that this helps, John On Wed, 15 Sep 2004 15:20:24 -0500 (CDT) Paul Roebuck [EMAIL PROTECTED] wrote: Is there a means to split a vector into its individual elements without going the brute-force route for arguments to a

Re: [R] Splitting vector into individual elements

2004-09-15 Thread Peter Dalgaard
Paul Roebuck [EMAIL PROTECTED] writes: Is there a means to split a vector into its individual elements without going the brute-force route for arguments to a predefined function call? offred.rgb - c(1, 0, 0) * 0.60; ## Brute force style offred.col - rgb(offred.rgb[1],

[R] efficient submatrix extraction

2004-09-15 Thread Rajarshi Guha
Hi, I have a matrix of say 1024x1024 and I want to look at it in chunks. That is I'd like to divide into a series of submatrices of order 2x2. | 1 2 3 4 5 6 7 8 ... | | 1 2 3 4 5 6 7 8 ... | | 1 2 3 4 5 6 7 8 ... | | 1 2 3 4 5 6 7 8 ... | ... So the first submatrix would be | 1 2 | | 1 2 |

Re: [R] Splitting vector into individual elements

2004-09-15 Thread Paul Roebuck
On Wed, 15 Sep 2004, Peter Dalgaard wrote: Paul Roebuck [EMAIL PROTECTED] writes: Is there a means to split a vector into its individual elements without going the brute-force route for arguments to a predefined function call? offred.rgb - c(1, 0, 0) * 0.60; ## Brute force

Re: [R] efficient submatrix extraction

2004-09-15 Thread Tony Plate
I think you should be able to do something with reassigning the dim attribute, and then using apply(), something along the lines of the following (which doesn't do your computation on the data in the subarrays, but merely illustrates how to create and access them): x - matrix(1:64,ncol=8) x

RE: [R] Splitting vector into individual elements

2004-09-15 Thread Liaw, Andy
From: Paul Roebuck On Wed, 15 Sep 2004, Peter Dalgaard wrote: Paul Roebuck [EMAIL PROTECTED] writes: Is there a means to split a vector into its individual elements without going the brute-force route for arguments to a predefined function call? offred.rgb - c(1, 0, 0)

Re: [R] Splitting vector into individual elements

2004-09-15 Thread Peter Dalgaard
Paul Roebuck [EMAIL PROTECTED] writes: Everyone offered 'do.call' as the solution. While that works, is it to say that there is no means of expanding the expression as an argument to the original function? Not really. You need an explicit expansion of the argument to a list somehow, and

RE: [R] Splitting vector into individual elements

2004-09-15 Thread Liaw, Andy
From: Liaw, Andy From: Paul Roebuck On Wed, 15 Sep 2004, Peter Dalgaard wrote: Paul Roebuck [EMAIL PROTECTED] writes: Is there a means to split a vector into its individual elements without going the brute-force route for arguments to a predefined function call?

Re: [R] Slightly off-topic --- distribution name.

2004-09-15 Thread David Scott
I believe this is the skew-Laplace distribution, although the skew-Laplace does allow for the location of the mode of the distribution to vary. Have a look at the function dskewlap in HyperbolicDist. The help on that function gives a reference to a paper by Feiller et al which describes the

Re: [R] Splitting vector into individual elements

2004-09-15 Thread Spencer Graves
Slightly more transparent but arguably uglier: offred.rgb - c(1, 0, 0) * 0.60 ofr - paste(offred.rgb, collapse=,) ofr. - paste(rgb(, ofr, ',names=offred)') ofr. [1] rgb( 0.6,0,0 ,names=\offred\) eval(parse(text=ofr.)) offred #99 As long as I can remember eval(parse(text=, this

Re: [R] Signs of loadings from princomp on Windows

2004-09-15 Thread Francisco Chamu
I am sorry to insist, but we have three other people that were able to reproduce the behavior I mentioned. I have also installed R 1.9.1 from the CRAN binaries on a different Windows machine and again I see the differents signs as mentioned before. What would be causing the difference?

[R] Cross-validation for Linear Discrimitant Analysis

2004-09-15 Thread Yu Shao
Hello: I am new to R and statistics and I have two questions. First I need help to interpret the cross-validation result from the R linear discriminant analysis function lda. I did the following: lda (group ~ Var1 + Var2, CV=T) where CV=T tells the lda to do cross-validation. The output of lda

Re: [R] Signs of loadings from princomp on Windows

2004-09-15 Thread Tony Plate
You could investigate this yourself by looking at the code of princomp (try getAnywhere(princomp.default)). I'd suggest making a file that in-lines the body of princomp.default into the commands you had below. See if you still get the difference. (I'd be surprised if you didn't). Then try

[R] Newbie q. need some help understanding this code.

2004-09-15 Thread sean kim
dear all. Would someone be kind and willing to explain the code below for a person who has never used R? ( that is if one has enough time and inclination) It implements gillepsie's stochastic algorithm for Lotka Volterra model. What would help me tremendously is to see the breakdown of the

Re: [R] Newbie q. need some help understanding this code.

2004-09-15 Thread Kevin Wang
Hi, sean kim wrote: thanks for any insights or other comments. I would suggest that you run the code line by line, to see what it does yourself. It is the best way to learn! library(stepfun) This just loads the package stepfun. lv - function(N=1000,cvec=c(1,0.005,0.6),x=c(50,100)) {

Re: [R] Splitting vector into individual elements

2004-09-15 Thread Gabor Grothendieck
Gabor Grothendieck ggrothendieck at myway.com writes: : : Paul Roebuck roebuck at odin.mdacc.tmc.edu writes: : : : : : On Wed, 15 Sep 2004, Peter Dalgaard wrote: : : : : Paul Roebuck roebuck at odin.mdacc.tmc.edu writes: : : : : Is there a means to split a vector into its individual : :

Re: [R] Cross-validation for Linear Discrimitant Analysis

2004-09-15 Thread Prof Brian Ripley
On Wed, 15 Sep 2004, Yu Shao wrote: I am new to R and statistics and I have two questions. Perhaps then you need to start by explaining why you are using LDA. Please take a good look at the posting guide. First I need help to interpret the cross-validation result from the R linear

[R] sapply() with cat()

2004-09-15 Thread Kevin Wang
Hi, Suppose I've got a data frame: inter.df V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 1 3.3 NA NA NA NA NA NA NA NA NA NA NA 2 0.0 0.1 NA NA NA NA NA NA NA NA NA NA 3 1.0 0.9 0.2 NA NA NA NA NA NA NA NA NA 4 1.6 0.0 2.9 0.7 NA NA NA NA

Re: [R] sapply() with cat()

2004-09-15 Thread Prof Brian Ripley
On Thu, 16 Sep 2004, Kevin Wang wrote: Hi, Suppose I've got a data frame: inter.df V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 1 3.3 NA NA NA NA NA NA NA NA NA NA NA 2 0.0 0.1 NA NA NA NA NA NA NA NA NA NA 3 1.0 0.9 0.2 NA NA NA NA NA

Re: [R] sapply() with cat()

2004-09-15 Thread Gabor Grothendieck
Prof Brian Ripley ripley at stats.ox.ac.uk writes: : : On Thu, 16 Sep 2004, Kevin Wang wrote: : : Hi, : : Suppose I've got a data frame: : inter.df : V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 : 1 3.3 NA NA NA NA NA NA NA NA NA NA NA : 2 0.0 0.1 NA NA