Re: [R] having problems with the lme function

2007-10-23 Thread 8rino-Luca Pantani
Hi Rodrigo, it is not easy to anwer your question since you did not provide some data to work with, nor what went wrong with your code. Anyway, as far as I can catch I would try the following library(nlme) df.GD <- groupedData(Y ~ fact_A +fact_B|fact_C, data=DataFrame) lme.1 <-lme(y~fact_A + fact_

Re: [R] median value dataframe coming from multiple dataframes

2007-10-23 Thread Diogo Alagador
Obrigadão Henrique It is just doing fine with big datasets... See you, Diogo André Alagador Portugal From: Henrique Dallazuanna [mailto:[EMAIL PROTECTED] Sent: Mon 22-10-2007 22:48 To: Diogo Alagador Cc: r-help@r-project.org Subject: Re: [R] median value dat

Re: [R] median value dataframe coming from multiple dataframes

2007-10-23 Thread Diogo Alagador
Obrigadão Henrique, It is doing well with big datasets, See you, Diogo André Alagador Portugal From: Henrique Dallazuanna [mailto:[EMAIL PROTECTED] Sent: Mon 22-10-2007 22:48 To: Diogo Alagador Cc: r-help@r-project.org Subject: Re: [R] median value dataframe

Re: [R] Input appreciated: R teaching idea + a way to improve R-wiki

2007-10-23 Thread Philippe Grosjean
Hi Matt, The R-Wiki is actively maintained... the addition of material to it is up to R users with any kind of initiative like this being warmly welcome. As for Bill Venable's comment, I totally agree: you should better test your concept first, and be ready to have very poor, as well as probab

[R] How to unlist Dates

2007-10-23 Thread Rees, David
Hi, I am trying to get a vector of dates that I can use for the xaxis in matplot (e.g. axis.Date(1,dates) ) I have a list of dates ... e.g. > dates [[1]] [1] "2015-02-15" [[2]] [1] "2015-08-15" [[3]] [1] "2015-11-15" But when I unlist it I "lose" the Dates and get numbers instead > unlist(da

Re: [R] median value dataframe coming from multiple dataframes

2007-10-23 Thread Alberto Murta
See if this solves your problem: dataframe1 <- as.data.frame(matrix(runif(3*300), 3, 300)) dataframe2 <- as.data.frame(matrix(runif(3*300), 3, 300)) dataframe3 <- as.data.frame(matrix(runif(3*300), 3, 300)) dataframe4 <- as.data.frame(matrix(runif(3*300), 3, 300))

Re: [R] How to unlist Dates

2007-10-23 Thread Prof Brian Ripley
On Tue, 23 Oct 2007, Rees, David wrote: > Hi, > > I am trying to get a vector of dates that I can use for the xaxis in > matplot (e.g. axis.Date(1,dates) ) > > I have a list of dates ... e.g. > >> dates > [[1]] > [1] "2015-02-15" > > [[2]] > [1] "2015-08-15" > > [[3]] > [1] "2015-11-15" > > But w

[R] Transfer Of Fund,

2007-10-23 Thread Dr.Abraham Kwesi
Transfer Of Fund, I am Dr.Abraham Kwesi in Ivory Coast, I am a banker and I need your honest assistance to transfer Usd $ 4.8 Million Dollars from here.Please reply with your direct phone number if interested. I await your quick reply.You can call me directly on +225 06307426 for details after

[R] Residuals from biglm package

2007-10-23 Thread Giulio Di Giovanni
Hi all, first of all, I'm not an expert on R, I'm still learning, so sorry if this is a stupid question... I have a large dataset that is to big for my computer memory, and I found quite useful the package biglm. Now everything is working perfectly. But if I want the residuals, how I can d

[R] SOLVED

2007-10-23 Thread Giulio Di Giovanni
sorry it was a stupid question. I have just to compute the estimated velues from the predictor colums and the coefficients and subtract from the observed values... sorry again _ Scarica GRATIS le emoticon della tua squadra del c

[R] grep with "|" character

2007-10-23 Thread Daniel Brewer
Hi, I am having a problem searching for the "|" character in a string. > grep("|",stringvector) Gives all the strings in a vector but when I try to escape it > grep("\|",stringvector) It comes up with the error Warning messages: 1: '\|' is an unrecognized escape in a character string 2: unrecogni

Re: [R] grep with "|" character

2007-10-23 Thread Duncan Murdoch
On 23/10/2007 6:34 AM, Daniel Brewer wrote: > Hi, > > I am having a problem searching for the "|" character in a string. > >> grep("|",stringvector) > Gives all the strings in a vector but when I try to escape it >> grep("\|",stringvector) > It comes up with the error > Warning messages: > 1: '\|

[R] passing subsets of '...' to several other functions

2007-10-23 Thread Gavin Simpson
Dear List, Say I have a function foo() that accepts a varying number of arguments. This function does some plotting so I want '...' to be able to accept graphics parameters to be passed to plot() or points() say, but '...' should also accept optional arguments for function bar(), called from withi

Re: [R] Bar plot with error bars

2007-10-23 Thread Manuel Morales
Hi Katherine, If you have the original data, you can use the function barplot.CI from the package sciplot which will calculate the means and CI's for you. Examples are at: http://mutualism.williams.edu/sciplot If you have the means and CI's already calculated, the following function will do what

Re: [R] grep with "|" character

2007-10-23 Thread Prof Brian Ripley
Easier is grep("|", stringvector, extended = FALSE) The only reason for having basic regexps in R is to avoid some of the escaping needed. On Tue, 23 Oct 2007, Duncan Murdoch wrote: > On 23/10/2007 6:34 AM, Daniel Brewer wrote: >> Hi, >> >> I am having a problem searching for the "|" character

Re: [R] passing subsets of '...' to several other functions

2007-10-23 Thread Prof Brian Ripley
Take a look at several of the graphics functions, e.g. plot.default(), for a good way to do this via local functions. On Tue, 23 Oct 2007, Gavin Simpson wrote: > Dear List, > > Say I have a function foo() that accepts a varying number of arguments. > This function does some plotting so I want '.

[R] Custom colourkey spacing in levelplot, contourplot

2007-10-23 Thread r-help . 20 . trevva
Dear R gurus, I have got stuck on how to customise the colorkey generated by levelplot and contourplot, in the lattice package. This best illustrated by an example: library(lattice) levelplot(volcano^20/1e45,at=c(0,0.001,0.01,0.1,1,10)) The reason for raising the volcano dataset to the 20th powe

Re: [R] Unicode 16-bit, Lao

2007-10-23 Thread Prof Brian Ripley
The question is 'why are you trying to use UCS-2 (aka Unicode) strings?' If it is to support characters not in the locale you are running R in, that cannot work as R runs in the native charset. Please do study the posting guide: I (as the author of RODBC and of the internationalization features

Re: [R] question on axis box with asp=1

2007-10-23 Thread Uwe Ligges
Why don't you create a device that is approximately squared if you ask to have asp=1? I do not understand why you resize anything. It simply does not make sense in that case. Uwe Ligges Dan Kelley wrote: > I've been using (and loving) R for quite a while now, but I have to > admit that som

[R] Multivariate regression tree: problems with surrogate splits

2007-10-23 Thread Trochine, Carolina
R helpers, I am working with the R program performing multivariate regression trees (MRT). I have a matrix with species and environmental variables saved as a CSV file (sprot_matrix.csv), I have 42 species and 8 environmental variables (SECCHI+PH+TA+PTOT+NTOT+CHLA+AREA+ MEANDEP) for 104 samples

Re: [R] passing subsets of '...' to several other functions

2007-10-23 Thread Gavin Simpson
On Tue, 2007-10-23 at 12:15 +0100, Prof Brian Ripley wrote: > Take a look at several of the graphics functions, e.g. plot.default(), for > a good way to do this via local functions. Dear Prof. Ripley Thank you for your solution - this works well for my real problem. This is such a simple solutio

Re: [R] question on axis box with asp=1

2007-10-23 Thread Dan Kelley
Thanks very much for the reply. Probably my example was poor. In my real application, I have an 8Mb data file of ocean properties, that I didn't want to attach. Plus -- and I should have noted this -- I am using coloured filled contours, so there is a colour bar at the right which uses up

[R] Multivariate regression tree: problems with surrogate splits (complete commands)

2007-10-23 Thread Trochine, Carolina
The secuence was not complete in the other message, sorry! sprot_matrix=read.csv("sprot_matrix.csv", row.names=1) sprot_matrix require(mvpart) mrtsprot_matrix <- mvpart(data.matrix(sprot_matrix [,1:47]) ~SECCHI+PH+TA+PTOT+NTOT+CHLA+AREA+ MEANDEP, sprot_matrix,xv="pick",xvmult=5

[R] sum variable as long condition is true

2007-10-23 Thread marcg
Hello R For expierienced user, the following problem will be easy to solve: a<-c(0,1,0,1,0,2,3,4,3,2) b<-c(3,3,3,4,4,4,7,7,7,10) c<-data.frame(a,b) Data Frame c contains tow colums. I would like to sum up all values in a as long as b stays the same: sum(a[which(b==1)]) does this, but i have t

Re: [R] Custom colourkey spacing in levelplot, contourplot

2007-10-23 Thread Frede Aakmann Tøgersen
How about mbreaks <- c(0,0.001,0.01,0.1,1,10) levelplot(volcano^20/1e45,at=mbreaks, colorkey=list(at=1:length(mbreaks),labels = list(labels=mbreaks))) ?? Med venlig hilsen Frede Aakmann Tøgersen > -Oprindelig meddelelse- > Fra: [EMAIL PROTECTED] > [mailto:[EMAIL PROTEC

Re: [R] sum variable as long condition is true

2007-10-23 Thread Chuck Cleland
marcg wrote: > Hello R > > For expierienced user, the following problem will be easy to solve: > > a<-c(0,1,0,1,0,2,3,4,3,2) > b<-c(3,3,3,4,4,4,7,7,7,10) > c<-data.frame(a,b) > > Data Frame c contains tow colums. I would like to sum up all values in a as > long as b stays the same: > > sum(a[w

Re: [R] sum variable as long condition is true

2007-10-23 Thread Shubha Vishwanath Karanth
rowsum(c$a,c$b) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of marcg Sent: Tuesday, October 23, 2007 5:22 PM To: [EMAIL PROTECTED] Subject: [R] sum variable as long condition is true Hello R For expierienced user, the following problem will be easy to

Re: [R] question on axis box with asp=1

2007-10-23 Thread Prof Brian Ripley
You need to take control. The box is plotted by box(), and that boxes the plot region as set up by plot.window() and given by par("pin"). So try setting that early in your plot sequence. E.g. open a window and do par(pin=c(4,6)) plot commands This is one of the non-introductory things c

Re: [R] Spatial autocorrelation

2007-10-23 Thread Victor Landeiro
Hi, On the online Early articles of the Ecography Journal you can find this paper: Dormann et al. 2007: Methods to account for spatial autocorrelation in the analysis of species distributional data: a review. – Ecography in press (Online Early). This article describe several methods to account for

Re: [R] question on axis box with asp=1

2007-10-23 Thread Dan Kelley
I'm sorry that I didn't mention about using filled.contour(). The advice about using pin (and, in this case, modifying filled.contour) is just what I needed. Thanks very much. (I got sidetracked on the stretchable margin space idea partly because I've been doing lots of tex lately, and I've

Re: [R] sum variable as long condition is true

2007-10-23 Thread John Kane
aggregate(c$a, list(b=b), sum) --- marcg <[EMAIL PROTECTED]> wrote: > Hello R > > For expierienced user, the following problem will be > easy to solve: > > a<-c(0,1,0,1,0,2,3,4,3,2) > b<-c(3,3,3,4,4,4,7,7,7,10) > c<-data.frame(a,b) > > Data Frame c contains tow colums. I would like to > sum

Re: [R] Input appreciated: R teaching idea + a way to improve R-wiki

2007-10-23 Thread John Kane
--- Philippe Grosjean <[EMAIL PROTECTED]> wrote: -clip- > > I tend to give a lot of attention to documents > written by "beginners", > because they are the best people to tell what is > difficult and what is > not in R! It is the starting motivation for the R > Wiki, indeed. Might i

[R] Multiple comparison tests - Homogenous subsets (i.e. for Tukey)

2007-10-23 Thread Prof. Dr. Karl-Heinz Kunzelmann
Dear all, is there any possibility to generate a table of homogeneous subsets for multiple comparison tests as in SPSS with R? I am specially interested in Tukey's B test. I have tried to find the answer myself and found an excellent description here: http://www.ppsw.rug.nl/~sda/siv/Posthoc_p

[R] create diagonal matrix within a for cycle

2007-10-23 Thread Niccolò Bassani
Dear R users, I'm trying to build a diagonal matrix from a group of matrices. These matrices have been built in a for loop. That is, I've subsetted a preliminar matrix to obtain a certain number of square sub-matrices, and now I need to create a diagonal out of these. Suppose my matrix is a square

Re: [R] Looped t.test results according to a subset variable

2007-10-23 Thread Michael A. Miller
Does pairwise.t.test, with paste(group, quiz) as the factor, do what you are looking for? Regards, Mike -- Michael A. Miller [EMAIL PROTECTED] Imaging Sciences, Department of Radiology, IU School of Medicine __ R-help@r

[R] Question: Rcmdr and macbooks

2007-10-23 Thread Tom Willems
Hello dear Russers, I have noticed that certain verry handy functions, like plotMeans and ci.plot, only run under Rcmdr. Rcmdr does not run on a mac , so i hope someone out there knows about an Rcmdr module for mac's. Kind regards, Tom Willems Tom E-mail: [EMAIL PROTECTED] www.var.fgov.be

[R] MPI implementations of fanny or cmeans

2007-10-23 Thread Don Armstrong
I've done a little digging, but I haven't been able to find an MPI or snow (or any other distributed processing) implementation of fanny (from cluster) or cmeans. Is anyone aware of some implementations or addons which I've missed? [I know of doi://10.1007/978-3-540-71351-7; but that's not for R]

[R] Problem with R(D) Com and R within Excel

2007-10-23 Thread Tolga Uzuner
Dear R Users, I am having trouble using R from within Excel. I've installed R(D) Com Client and then try to open up the first sample sheet. As Excel executes auto_open, it stops at function "ExcelVersionMajor" and complaines that a certain type library is missing: missing rcom 1.0 type libra

[R] error message: "the instruction at "0x6c72c676" referenced memory of "0x00000010". The memory could not be "written"."

2007-10-23 Thread Hoenig, Oliver
Hello everyone, I have a problem with a selfwritten R-program. Short description about the program: It gets values via SQL from a MS-Access-database, then forms them to matrices or dataframes and makes some calculations with them. At the end it fills the results in a result table in a MS-Access-

[R] Sum of binominal distributed random numbers

2007-10-23 Thread Rainer M Krug
Hi I have two vectors, prob and size, and I want to add the random deviates of these two, i.e. sum( sapply( 1:length(prob), function(n){ rbinom(1, size(n), prob(n) } ) ) My problem is that I have to do this for a large number of value combinations. Is there a

[R] "flipping" vector and matrix

2007-10-23 Thread Rainer M Krug
Hi I have a vector x <- c(1, 2, 3, 4, 5) and I want to "flip" it around, i.e. I need 5, 4, 3, 2, 1 Is there a ssolution apart from y <- x[length(x):1] I am also looking for the same for a matrix M, i.e. 1 2 3 4 5 6 7 8 9 should become 7 8 9 4 5 6 1 2 3 again, I am using M[1:dim(M)[1],

Re: [R] A very simple question

2007-10-23 Thread John Kane
It sound like you have been loading an existing workspace in 2.5.0 when you started up R each time. I don't know much about this but you might want to see if you have some kind of .Rdata file in the 2.5.0 installation that is doing this. Otherwise did you make any changes to your Rprofile in 2

Re: [R] Question: Rcmdr and macbooks

2007-10-23 Thread John Fox
Dear Tom, Although I'm not a Mac user, the Rcmdr should run on Macs. Please see the installation notes at . In any event, you should be able to extract these functions from the Rcmdr sources. I hope this helps, John --

Re: [R] Bar plot with error bars

2007-10-23 Thread John Kane
library(gplots) ?barplot2 should give you what you want. --- Katherine Jones <[EMAIL PROTECTED]> wrote: > Apologies if this has been asked before. I am having > trouble > understanding the R mailing list never mind R! > > I am relatively new to R having migrated from > Minitab and SPSS. I

Re: [R] Bar plot with error bars

2007-10-23 Thread John Kane
library(gplots) ?barplot2 should give you what you want. --- Katherine Jones <[EMAIL PROTECTED]> wrote: > Apologies if this has been asked before. I am having > trouble > understanding the R mailing list never mind R! > > I am relatively new to R having migrated from > Minitab and SPSS. I

[R] Compute R2 and Q2 in PLS with pls.pcr package

2007-10-23 Thread Ana Conesa
Dear list I am using the mvr function of the package pls.pcr to compute PLS resgression using a X matrix of gene expression variables and a Y matrix of medical varaibles. I would like to obtain the R2 (sum of squares captured by the model) and Q2 (proportion of total sum of squares captured in

[R] Specific examples especific of use library RODBC - Ejemplos especificos de uso de la libreria RODBC

2007-10-23 Thread lecastil
Hello, Do you know another manual different from the manual R-CRAN's RODBC to see specific examples of RODBC's use? Thank you. Luis. ** Usted conoce algún otro ma

Re: [R] "flipping" vector and matrix

2007-10-23 Thread Katharine Mullen
One way: > x<-1:9 > rev(x) [1] 9 8 7 6 5 4 3 2 1 for x as the matrix you gave: > x [,1] [,2] [,3] [1,]123 [2,]456 [3,]789 > > > apply(t(x),1,rev) [,1] [,2] [,3] [1,]789 [2,]456 [3,]123 On Tue, 23 Oct 2007, Rainer

Re: [R] Input appreciated: R teaching idea + a way to improve R-wiki

2007-10-23 Thread hadley wickham
On 10/23/07, Philippe Grosjean <[EMAIL PROTECTED]> wrote: > Hi Matt, > > The R-Wiki is actively maintained... the addition of material to it is > up to R users with any kind of initiative like this being warmly > welcome. As for Bill Venable's comment, I totally agree: you should > better test your

Re: [R] "flipping" vector and matrix

2007-10-23 Thread Rainer M Krug
Thanks Katharine that answers my vector question. The suggestion for the matrix is interesting and I would have never thought about theat. Thanks Rainer Katharine Mullen wrote: > One way: > >> x<-1:9 >> rev(x) > [1] 9 8 7 6 5 4 3 2 1 > > for x as the matrix you gave: >> x > [,1] [,2] [,

Re: [R] "flipping" vector and matrix

2007-10-23 Thread Katharine Mullen
sorry, just do rev on the columns (no t()): > x [,1] [,2] [,3] [1,]123 [2,]456 [3,]789 > apply(x,2,rev) [,1] [,2] [,3] [1,]789 [2,]456 [3,]123 On Tue, 23 Oct 2007, Katharine Mullen wrote: > One way: > > > x<-1:9 >

Re: [R] Input appreciated: R teaching idea + a way to improve R-wiki

2007-10-23 Thread John Kane
--- hadley wickham <[EMAIL PROTECTED]> wrote: > On 10/23/07, Philippe Grosjean > <[EMAIL PROTECTED]> wrote: > > Hi Matt, > > > > The R-Wiki is actively maintained... the addition > of material to it is > > up to R users with any kind of initiative like > this being warmly > > welcome. As for Bill

Re: [R] create diagonal matrix within a for cycle

2007-10-23 Thread Robin Hankin
Hello I suspect that adiag() of the magic package is what you need: > library(magic) Loading required package: abind Attaching package: 'magic' The following object(s) are masked from package:mgcv : magic > a <- matrix(1:4,2,2) > b <- matrix(1:9,3,3) > adiag(a,b) [

Re: [R] "flipping" vector and matrix

2007-10-23 Thread Robin Hankin
Hello for vectors, use rev() For matrices and arbitrary-dimensioned arrays, use arev() of the magic package: > library(magic) > b <- matrix(1:9,3,3) > b [,1] [,2] [,3] [1,]147 [2,]258 [3,]369 > arev(b) [,1] [,2] [,3] [1,]963 [2,]

Re: [R] "flipping" vector and matrix

2007-10-23 Thread Rainer M Krug
Hi Robin I knew that something like arev was somewhere around. Thanks Rainer Robin Hankin wrote: > Hello > > > for vectors, use rev() > > For matrices and arbitrary-dimensioned arrays, > use arev() of the magic package: > > > > library(magic) > > b <- matrix(1:9,3,3) > > b > [,1] [

[R] distributing the values of data frame to a vector based on......

2007-10-23 Thread Daniel O'Shea
I am trying to distribute the entries of a data frame (dat) to a vector (water) based on the values of two other vectors (region and year). region is also the columns and year the rows of the data frame (dat). I can write a bunch of ifelse statements or I created the for statement below - but

Re: [R] "flipping" vector and matrix

2007-10-23 Thread Robin Hankin
Sorry misread the question. Function arev() takes a second argument that specifies which dimensions to flip: > b <- matrix(1:9,3,3,byrow=T) > b [,1] [,2] [,3] [1,]123 [2,]456 [3,]789 > arev(b,1) [,1] [,2] [,3] [1,]789 [2,]45

[R] "adding" matrix of smaller dimensions to matrix of larger dimensions and "apply" question

2007-10-23 Thread Rainer M Krug
Hi I have another question concerning matrices: I have two matrices: > b <- matrix(1:25,5,5,byrow=T) > b [,1] [,2] [,3] [,4] [,5] [1,]12345 [2,]6789 10 [3,] 11 12 13 14 15 [4,] 16 17 18 19 20 [5,] 21 22 23 24 25 and > d

Re: [R] "adding" matrix of smaller dimensions to matrix of larger dimensions and "apply" question

2007-10-23 Thread Henrique Dallazuanna
Perhaps: b[1:nrow(d), 2:3] <- b[1:nrow(d), 2:3]+d For seconde questin you can use the which function. which(b==5, arr.ind=T) On 23/10/2007, Rainer M Krug <[EMAIL PROTECTED]> wrote: > > Hi > > I have another question concerning matrices: > I have two matrices: > > > b <- matrix(1:25,5,5,byrow=T

Re: [R] Input appreciated: R teaching idea + a way to improve R-wiki

2007-10-23 Thread Tony Plate
hadley wickham wrote: > On 10/23/07, Philippe Grosjean <[EMAIL PROTECTED]> wrote: >> Hi Matt, >> >> The R-Wiki is actively maintained... the addition of material to it is >> up to R users with any kind of initiative like this being warmly >> welcome. As for Bill Venable's comment, I totally agree:

Re: [R] Input appreciated: R teaching idea + a way to improve R-wiki

2007-10-23 Thread Philippe Grosjean
Tony Plate wrote: > hadley wickham wrote: >> On 10/23/07, Philippe Grosjean <[EMAIL PROTECTED]> wrote: >>> >>> I tend to give a lot of attention to documents written by "beginners", >>> because they are the best people to tell what is difficult and what is >>> not in R! It is the starting motiv

Re: [R] Sum of binominal distributed random numbers

2007-10-23 Thread Charles C. Berry
?rbinom only says: size: number of trials (zero or more). prob: probability of success on each trial. But they can be vectors. BTW, you were aked to "PLEASE ... provide minimal, self-contained, reproducible code." What you show cannot run without correction. Most likel

[R] Using a data frame in a function call

2007-10-23 Thread Peter Tait
Hi, I am writing a basic function to extract the z scores for some linear regression coefficients: zscore<-function( y, x) { lm<-lm( y ~ x ) z <- coef(lm)/sqrt(diag(vcov(lm))) return(z) } I would like to pass a dataframe to the function as a argument so the function call changes from zs

Re: [R] distributing the values of data frame to a vector based on......

2007-10-23 Thread jim holtman
Does this do what you want? Another way of doing matrix addressing: > dat[cbind(year,region)] [1] 1 5 9 10 18 3 4 8 16 17 2 6 7 15 19 On 10/23/07, Daniel O'Shea <[EMAIL PROTECTED]> wrote: > I am trying to distribute the entries of a data frame (dat) to a vector > (water) based on the

Re: [R] Input appreciated: R teaching idea + a way to improve R-

2007-10-23 Thread Ted Harding
On 23-Oct-07 16:11:12, Tony Plate wrote: > [...] > Is there any way on the R-Wiki for people to quickly and easily add an > annotation indicating that they believe some particular advice is poor > practice? Ideally, these annotations would be easily searchable so > that other users could find

[R] Strange dataframe behavior

2007-10-23 Thread Sergey Goriatchev
Hello, I have a question regarding the following output: > database <- read.delim(file=path.input.file, header=TRUE, dec=".", sep="\t", > na.strings = "#NV") > str(database) 'data.frame': 314 obs. of 13 variables: $ S : Factor w/ 314 levels "307073","400212",..: 147 72 299 137 162 62

Re: [R] Using a data frame in a function call

2007-10-23 Thread Henrique Dallazuanna
HI, Perhaps: zscore<-function(x, y, data) { lm<-lm( y ~ x , ...) z <- coef(lm)/sqrt(diag(vcov(lm))) return(z) } On 23/10/2007, Peter Tait <[EMAIL PROTECTED]> wrote: > > Hi, > > I am writing a basic function to extract the z scores for some linear > regression coefficients: > > zscore<-function(

Re: [R] Input appreciated: R teaching idea + a way to improve R-

2007-10-23 Thread Philippe Grosjean
Well... you want comments... It's rigid, and complex. The Wiki is much more flexible and flexibility is a quality sometimes. At least, I haven't received much complains about the way pages can be written/edited in the R Wiki (but I received a couple of complains on the way these pages are prese

Re: [R] Using a data frame in a function call

2007-10-23 Thread Henrique Dallazuanna
I'm sorry: zscore<-function(x, y,...) { lm<-lm( y ~ x , ...) z <- coef(lm)/sqrt(diag(vcov(lm))) return(z) } zscore(x, y, data=df) On 23/10/2007, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote: > > HI, > > Perhaps: > zscore<-function(x, y, data) { > lm<-lm( y ~ x , ...) > z <- coef(lm)/sqrt(

Re: [R] Input appreciated: R teaching idea + a way to improve R-

2007-10-23 Thread Matthew Keller
I think what Ted is getting at is a new kind of wiki. Maybe in the short term (unless someone out there is willing to jump in and put this sort of thing together), it isn't practical, but as a concept, I found it quite appealing. The problem with learning from books is that you don't get to see the

Re: [R] Question: Rcmdr and macbooks

2007-10-23 Thread Rod
On 10/23/07, Tom Willems <[EMAIL PROTECTED]> wrote: > Hello dear Russers, > > I have noticed that certain verry handy functions, like plotMeans and > ci.plot, > only run under Rcmdr. > Rcmdr does not run on a mac , so i hope someone out there knows about an > Rcmdr module for mac's. > > Kind regar

Re: [R] Using a data frame in a function call

2007-10-23 Thread Charles C. Berry
On Tue, 23 Oct 2007, Peter Tait wrote: > Hi, > > I am writing a basic function to extract the z scores for some linear > regression coefficients: > > zscore<-function( y, x) { > lm<-lm( y ~ x ) > z <- coef(lm)/sqrt(diag(vcov(lm))) > return(z) > } > > I would like to pass a dataframe to the func

Re: [R] Strange dataframe behavior

2007-10-23 Thread Charles C. Berry
On Tue, 23 Oct 2007, Sergey Goriatchev wrote: > Hello, > > I have a question regarding the following output: > >> database <- read.delim(file=path.input.file, header=TRUE, dec=".", sep="\t", >> na.strings = "#NV") >> str(database) > 'data.frame': 314 obs. of 13 variables: > $ S : Factor

[R] Letzte Gelegenheit für [EMAIL PROTECTED] .ethz.ch - Greifen Sie jetzt letztmalig zu - Wie lange wollen Sie noch warten?

2007-10-23 Thread [EMAIL PROTECTED]
Gruess Gott [EMAIL PROTECTED], letztmalig im 3. Versuch erhalten Sie die Gelegenheit Ihre 2400.00 EUR abzuholen. Klicken Sie einfach auf die untere Webseite und Sie werden unser Angebot bestaetigt sehen. Eine weitere Gelegenheit wird es dann nicht mehr geben - Wir werden Sie dann auch nicht we

Re: [R] Strange dataframe behavior

2007-10-23 Thread Sergey Goriatchev
THanks, Chuck! I figured it out already, these were not row numbers at all! It just counted down along the columns. On 10/23/07, Charles C. Berry <[EMAIL PROTECTED]> wrote: > On Tue, 23 Oct 2007, Sergey Goriatchev wrote: > > > Hello, > > > > I have a question regarding the following output: > > >

Re: [R] Input appreciated: R teaching idea + a way to improve R-

2007-10-23 Thread Frank E Harrell Jr
(Ted Harding) wrote: > On 23-Oct-07 16:11:12, Tony Plate wrote: >> [...] >> Is there any way on the R-Wiki for people to quickly and easily add an >> annotation indicating that they believe some particular advice is poor >> practice? Ideally, these annotations would be easily searchable so >>

[R] simple data.frame question

2007-10-23 Thread pharos
Hi, At first I have to admit that I'm quite new to R and need some basic information. Although I searched the internet and this forum where I found answers to really sophisticated questions, I couldn't find the answer to my really simple one - or I didn't understand it for English is not my mothe

Re: [R] simple data.frame question

2007-10-23 Thread jim holtman
Your first statement may create a data frame, but your second statement now store a vector in an object with the same name, but is now not a data frame, that is why it "appears" that the first row is overwritten. What are you trying to do? On 10/23/07, pharos <[EMAIL PROTECTED]> wrote: > > Hi, >

Re: [R] Secondary Y axis title

2007-10-23 Thread John Theal
Excellent. Thank you both for the help. Just what I was looking for. On 21-Oct-07, at 12:18 AM, Dave Hewitt wrote: > The controls for the margin sizes, which set the amount of space > allocated for the labels, are the 'mai' numbers in the first 'par' > call. The fourth number changed to

[R] Replace values on seq

2007-10-23 Thread Walter Alini
Hey guys, sorry for the inconvenience (this might be a hundred times answered question), but I have been searching a while and gave up about the following: I have the following, table and data: table <- seq(255, 0, by=-1) data <- c(1,8,...) <--- doesn't matter what's in here Which would be th

Re: [R] Replace values on seq

2007-10-23 Thread jim holtman
Is this what you want to do? > table <- seq(255, 0, by=-1) > data <- c(1,8,34,100) > data <- table[data + 1] > data [1] 254 247 221 155 On 10/23/07, Walter Alini <[EMAIL PROTECTED]> wrote: > Hey guys, sorry for the inconvenience (this might be a hundred times > answered question), but I have bee

Re: [R] Replace values on seq

2007-10-23 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Walter Alini > Sent: Tuesday, October 23, 2007 1:18 PM > To: r-help@r-project.org > Subject: [R] Replace values on seq > > Hey guys, sorry for the inconvenience (this might be a hundred times > answere

[R] How to avoid the NaN errors in dnbinom?

2007-10-23 Thread francogrex
Hi, The code below is giving me this error message: Error in while (err > eps) { : missing value where TRUE/FALSE needed In addition: Warning messages: 1: In dnbinom(x, size, prob, log) : NaNs produced 2: In dnbinom(x, size, prob, log) : NaNs produced I know from the help files that for dnbinom "

[R] Plot a line according to a specified equation

2007-10-23 Thread Kyle.
Does anyone know how to graph a line according to a specified equation? I'd like to plot the following hyperbola: Y=139.35/(1+(0.174*X)) I know there's a way to do this, but I'm having a ridiculous time trying to remember how. Thanks! Kyle H. Ambert Department of Behavioral Neuroscience Oregon

Re: [R] Replace values on seq

2007-10-23 Thread Walter Alini
> Hope this is helpful, Certainly! Thanks Dan and Jim! Now, I wonder where I can dig in to realize why this is better. Is C code for this function better than others? Is C guilty on this? Maybe I am too newbie. Thanks again, guys! Walter __ R-help@r

Re: [R] Plot a line according to a specified equation

2007-10-23 Thread Peter Alspach
?curve > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Kyle. > Sent: Wednesday, 24 October 2007 9:44 a.m. > To: RHelp > Subject: [R] Plot a line according to a specified equation > > Does anyone know how to graph a line according to a specified >

Re: [R] How to avoid the NaN errors in dnbinom?

2007-10-23 Thread jim holtman
Your problems is that your code is generating NaN and 'err' is set to NaN and therefore the 'while (err > eps)' fails since NaN is not a logical variable. You should learn to use debug or the browser. I put the following statement in your code: new.parms=c(k1,mu1,k2,mu2,prob) err

Re: [R] Replace values on seq

2007-10-23 Thread jim holtman
Guilty of what? What are you trying to compare? Now all the approaches do get down to 'loops' being performed in the base level code (C in this case). What exactly are you asking? You can alway 'time' (sys.time) a set of statements to see which is better (just make sure you execute them enough

Re: [R] Plot a line according to a specified equation

2007-10-23 Thread jim holtman
curve(139.35/(1+(0.174*x))) On 10/23/07, Kyle. <[EMAIL PROTECTED]> wrote: > Does anyone know how to graph a line according to a specified equation? I'd > like to plot the following hyperbola: > > Y=139.35/(1+(0.174*X)) > > I know there's a way to do this, but I'm having a ridiculous time trying t

Re: [R] Replace values on seq

2007-10-23 Thread Walter Alini
> code (C in this case). What exactly are you asking? You can alway > 'time' (sys.time) a set of statements to see which is better (just > make sure you execute them enough times to get reasonable readings -- > several seconds) I was wondering where to seach for the code of these different optio

Re: [R] Replace values on seq

2007-10-23 Thread jim holtman
Well you do know that R is 'interpreted' and that C is 'compiled'. In R you are calling functions to perform the operations. There is a function for indexing ('['): > get ("[") .Primitive("[") So your 'for' statement in R is interpreting the R code and calling some functions to perform the oper

[R] multivariate Stochastic Volatility and GARCH

2007-10-23 Thread Dennis Tuerk
Dear everyone, i`m a german economics student, writing my master´s thesis about "Multivariate Volatility Models". After having read about theoretical aspects of Multivariate GARCH ans Stochastic Volatility Models, I would like to compare DCC-GARCH and DC-SV with help of an empirical application.

[R] 2-D numerical integration over odd region

2007-10-23 Thread Chris Rhoads
Hello all, I'm hoping to find a way to evaluate the following sort of integral in R. \int_a^b \int_{g(y)}^Inf f(x,y) dx dy. The integral has no closed form and so must be evaluated numerically. The "adapt" package provides for multidimensional integration but does not appear to allow the lim

[R] Autocorrelation Matrix

2007-10-23 Thread Jan Feyereisl
Hi, I am trying to calculate the autocorrelation matrix for an input matrix with the size n*m where n=7 (the dimensionality of my input feature vectors) and m being the time. Thus one could think of the input data as a 7-dimensional time-series. Does anyone know of any way to calculate the autoc

Re: [R] 2-D numerical integration over odd region

2007-10-23 Thread Doran, Harold
I have used the functions in the statmod package regularly to evaluate complex integrals using gaussian quadrature. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Chris Rhoads > Sent: Tuesday, October 23, 2007 4:58 PM > To: r-help@r-project.org >

Re: [R] Replace values on seq

2007-10-23 Thread Walter Alini
> Does this help clarify the differences? For sure! Thanks Jim. I will test with the solutions you gave me, maybe the differences are not so big, I was just surprised about that. I will report results then, Thanks! Walter __ R-help@r-project.org mail

[R] robustSmoothSpline

2007-10-23 Thread Brian . O'Gorman
I'm rather frustrated in trying to run the examples on the robustSmoothSpline. No matter what packages I load, I still come up with the error as follows. Error: could not find function "robustSmoothSpline" Am I missing something? __ R-help@r-project.

Re: [R] robustSmoothSpline

2007-10-23 Thread Roy Mendelssohn
Hi Brian: A little more information would be helpful.. What operating system you are running and what version of R you are running and which packages you tried to install. robustSmoothSplie is part of the aroma.light package which is part of Bioconductor. Have you installed Bioconductor ba

[R] multicomp plotting

2007-10-23 Thread Nair, Murlidharan T
I am trying to plot a large set of multiple comparison data from a csv file. I used to do in the following manner, but its giving me an error now, and I am not sure what correct. I have put the data in the code using the output from dput for completeness. Can anyone help me with my mistakes? Tha

[R] (no subject)

2007-10-23 Thread jdj2x
Hello, This is my first query to the message board. I have a question on how to do a long run multiplier in R. Our teacher has given us insight in completing this in SAS, but not in R. Any advice would be appreciated. Thanks, Joshua Johns __ R-help@r

  1   2   >