Re: [R] ANCOVA with defined error terms

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

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

2009-08-25 Thread Rolf Turner
On 26/08/2009, at 3:08 PM, Donald Braman wrote: This is a simple problem that has stumped me: I'm trying to loop through a few dozen variable names in graphs. I've tried various approaches like this: attach(mydata) ivs <- c("oneiv", "anotheriv", "yetanotheriv") dvs <- c("onedv", "anotherdv

[R] simple graph question: manipulating variable names

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

Re: [R] How can I do a generic specification in multiple logistic regression

2009-08-25 Thread Juliet Hannah
Is multinom the function you are looking for? library(nnet) library(MASS) ?multinom indicates that this fits multinomial log-linear models. If you are looking for multiple logistic regression you may want to read up on glm or lrm from the Design package. Could you elaborate on what you mean by a

Re: [R] Filtering matrices

2009-08-25 Thread bwgoudey
> r<-rcorr(d[[1]]) #d is matrix containing observation > r[[1]] #r values age sex BMI age 1.000 -0.30010322 -0.13702263 sex -0.3001032 1. 0.06300528 BMI -0.1370226 0.06300528 1. > r[[2]] #Number of obervations age sex BMI age 100 100 100 sex

Re: [R] Filtering matrices

2009-08-25 Thread Steve Lianoglou
Hi, On Tue, Aug 25, 2009 at 10:11 PM, bwgoudey wrote: > > I'm using the rcorr function from the Hmisc library to get pair-wise > correlations from a set of observations for a set of attributes. This > returns 3 matrices; one of correlations, one of the number of observations > seen for each pair a

[R] Filtering matrices

2009-08-25 Thread bwgoudey
I'm using the rcorr function from the Hmisc library to get pair-wise correlations from a set of observations for a set of attributes. This returns 3 matrices; one of correlations, one of the number of observations seen for each pair and the final of the P values for each correlation seen. >From

Re: [R] Clogit or LRM?

2009-08-25 Thread Noah Silverman
Mark, The paper published by Bentor is part of a published collection. I don't know if it is available online. (I can, if you like, scan the relevant 2-3 pages and email them to you.) Computer Based Horse Race Handicapping and Wagering Systems: A Report William Bentor Thanks! -Noah On 8/25/

Re: [R] Number of CPU's

2009-08-25 Thread Ei-ji Nakama
Hi Please preserve as get_num_cpus.c as follows. >8>8>8>8>8>8>8>8>8>8>8>8 #include #include #ifdef WIN32 #include #endif #include #include SEXP get_num_cpus(void) { SEXP cpus; PROTECT (cpus = allocVector (INTSXP, 1)); INTEGER(cpu

[R] Doubt about adaboost

2009-08-25 Thread Cecilia Lezama
Hello, I performed a boosting analisis with adabag package to obtain a classification tree with the following set of commands: Tesis.boost <- adaboost.M1(Captura~., data=Tesis2, mfinal=2) > arb<-Tesis.boost$tree[[1]] > post(arb, file ="") > post(arb, file ="",title= "Arbol 1") I would like

[R] ptproc package

2009-08-25 Thread oyelola . adegboye
Dear All, Please can anyone assist on installing 'ptproc', I downloaded it on the contributors website and tried to install it manual but R wont unzip it. Thank you -- -- Prince Oyelola A. Adegboye Interuniversity Institute for Biostatistics and statistical Bioinformatics University of Hasselt

Re: [R] error matrix, cross table,

2009-08-25 Thread milton ruser
Hi Gustavo, depends on how your thematic maps are stored. Give a look on SPATIAL / CRAN at http://cran.r-project.org/web/views/Spatial.html If your data is raster-based, try to give a look on raster package. bests milton On Tue, Aug 25, 2009 at 7:20 PM, dalposso wrote: > > how to create a cro

[R] error matrix, cross table,

2009-08-25 Thread dalposso
how to create a cross table to quantify the classes of two thematic maps? -- View this message in context: http://www.nabble.com/error-matrix%2C-cross-table%2C-tp25143926p25143926.html Sent from the R help mailing list archive at Nabble.com. __ R-hel

Re: [R] math symbol + value of a variable in legend.

2009-08-25 Thread Kenneth Roy Cabrera Torres
Thank you very much for your help. To the R gurus: It will be better at the future to simplify this options. They are too cumbersome!!! Thank you!!! El mar, 25-08-2009 a las 18:16 -0400, David Winsemius escribió: > On Aug 25, 2009, at 5:51 PM, David Winsemius wrote: > > > > > On Aug 25, 20

Re: [R] math symbol + value of a variable in legend.

2009-08-25 Thread Gabor Grothendieck
Check out bquote as in this example: https://stat.ethz.ch/pipermail/r-help/2009-August/209373.html On Tue, Aug 25, 2009 at 4:30 PM, Kenneth Roy Cabrera Torres wrote: > Hi R users: > > I will like to have a legend with math symbols and also with > the value of a variable. > > But I cannot obtain b

Re: [R] math symbol + value of a variable in legend.

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 5:51 PM, David Winsemius wrote: On Aug 25, 2009, at 4:30 PM, Kenneth Roy Cabrera Torres wrote: Hi R users: I will like to have a legend with math symbols and also with the value of a variable. But I cannot obtain both at the same time (symbol + value of a variable): He

Re: [R] Filling in empty arrays/lists from using "paste" function

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 3:52 AM, Uwe Ligges wrote: I highly suggest to rethink your problem in a way that you store the things labelled, e.g., TA1 to TA5 (as well as all the others) as the elements of a list TA. This way you have just one object TA that can easily be accessed by index operatio

Re: [R] math symbol + value of a variable in legend.

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 4:30 PM, Kenneth Roy Cabrera Torres wrote: Hi R users: I will like to have a legend with math symbols and also with the value of a variable. But I cannot obtain both at the same time (symbol + value of a variable): Here is a reproducible example: m1<-5 m2<-12 I think I

Re: [R] adding factor scores back to an incomplete dataset...

2009-08-25 Thread Phil Spector
David - Here's the easiest way I've been able to come up with. I'll provide some sample data to make things clearer (hint, hint): dat = data.frame(matrix(rnorm(100),20,5)) dat[3,4] = NA dat[12,3] = NA scrs = factanal(na.omit(dat),factors=2,scores='regression')$scores rownames(scrs) = rownam

Re: [R] Re : Odp: Re : Odp: Re : table function

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 9:23 AM, David Winsemius wrote: On Aug 25, 2009, at 6:25 AM, Inchallah Yarab wrote: Thank you very much Peter it works!! the second step is to calculate the sum of variable in each class!!! how can i do this!!! ?table ?xtab I read this incorrectly. Try instead; > b

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-25 Thread Alain Zuur
Ben Bolker wrote: > > My two cents: this is a hard problem to do, period (not just in R). > I would second the recommendation of the Dormann et al paper listed > below; also see Zuur, Alain F., Elena N. Ieno, Neil J. Walker, Anatoly A. > Saveliev, and Graham M. Smith. Mixed Effects Models and E

Re: [R] adding factor scores back to an incomplete dataset...

2009-08-25 Thread Mark Difford
Hi David, >> I am doing a factor analysis on survey data with missing values. ... Is >> there a way to subset >> from my original data set that will work with factanal() and preserve the >> original rows or that >> will allow me to append the factor scores back onto the original dataset >> with

Re: [R] table, xyplot, names, & loops

2009-08-25 Thread Deepayan Sarkar
On Tue, Aug 25, 2009 at 10:16 AM, w_poet wrote: > > Hi R community, > > I'm just starting out in R and have a basic question about xyplot and > tables. Suppose I had a table of data with the following names: Height, > Age_group, City. I'd like to plot mean Height vs Age_group for each City. > > Whe

Re: [R] Regular expression to define contents between parentheses

2009-08-25 Thread Bert Gunter
Ha! Much better than mine and without PERL, to boot. Bravo Gabor! -- Bert Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gabor Grothendieck Sent: Tuesday, August 25, 2009 2:03 PM To:

Re: [R] allowing line wrap for long strip text in xyplot (lattice)

2009-08-25 Thread Deepayan Sarkar
On Mon, Aug 24, 2009 at 8:04 PM, Donald Boyd wrote: > Hi. Am brand new to R and to mailing lists - have never posted anywhere > before, so hope I do this right. > > Am using R 2.9.1 with lattice graphics (just installed, fully up to date). > > Am doing trellis xyplot with y (emp=employment), x (yea

Re: [R] Regular expression to define contents between parentheses

2009-08-25 Thread Gabor Grothendieck
Instead of using .* use [^)]* so that you only get up to the next ) and also it seems that you want to trim spaces so add space star at the beginning and end: gsub(" *\\([^)]*\\) *", "", myvector) On Tue, Aug 25, 2009 at 4:17 PM, Judith Flores wrote: > Hello dear R-helpers, > >   I haven't been

Re: [R] adding points to a wireframe

2009-08-25 Thread Deepayan Sarkar
On Mon, Aug 24, 2009 at 4:27 PM, jebyrnes wrote: > > Hrm.  I have to admit, I don't entirely understand how to use the scaling, > and that seems like a lot of unneeded extra code.  It is what it is, though. That's true, and I think it would be easy enough to have a flag to panel.3dscatter etc. tel

Re: [R] Regular expression to define contents between parentheses

2009-08-25 Thread Alexander Shenkin
Hi Judith, This probably isn't the only way to do it, but: gsub("\\(.*?\\)", "", myvector, perl=TRUE) seems to do the trick. The problem is that regular expressions are greedy, so you were matching everything between the first and last parens, as you noticed. Putting the question mark ther

Re: [R] Regular expression to define contents between parentheses

2009-08-25 Thread Bert Gunter
Judith: I believe that this is, indeed, tough; it might require PERL regex's to do entirely within the regular expression language. You might also wish to check out the gsubfn package to see if it could help. However, a reasonably simple alternative approach that I think will work is to use strsp

[R] math symbol + value of a variable in legend.

2009-08-25 Thread Kenneth Roy Cabrera Torres
Hi R users: I will like to have a legend with math symbols and also with the value of a variable. But I cannot obtain both at the same time (symbol + value of a variable): Here is a reproducible example: m1<-5 m2<-12 plot(1:5,1:5,type="n") legend("topleft",legend=c(paste(expression(mu),"=",m1),

[R] Regular expression to define contents between parentheses

2009-08-25 Thread Judith Flores
Hello dear R-helpers, I haven't been able to figure out of find a solution in the R-help archives about how to delete all the characters contained in groups of parenthesis. I have a vector that looks more or less like this: myvector<-c("something (80 km/h, sd) & more (6 kg/L,sd)", "something

Re: [R] adding factor scores back to an incomplete dataset...

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 3:45 PM, David G. Tully wrote: I am sure there is a simple way to do the following, but i haven't been able to find it. I am hoping a merciful soul on R-help could point me in the right direction. I am doing a factor analysis on survey data with missing values. to do

Re: [R] Surpress one panel in lattice plot..?

2009-08-25 Thread Deepayan Sarkar
On Sun, Aug 23, 2009 at 5:41 PM, Ben Bolker wrote: > > > > Fredrik Karlsson wrote: >> >> Dear list, >> >> I have a two character vector with two different values in them (two >> each, that is). Naturally, when I use these vectors as grouping >> factors in a lattice plot, I get four panels. >> Now,

Re: [R] Activation Functions in Package Neural

2009-08-25 Thread bradsmith
You are required to provide specifications for all the activation functions, the number of which is equal to the number of hidden layers plus 1. Thus in your case actfns=c(2,2) would suffice. BKMooney wrote: > > Hi, > > I am trying to build a VERY basic neural network as a practice before > h

[R] analysis of categorical data

2009-08-25 Thread tommers
>From a somewhat ill-designed education experiment, I have categorical data with two between subject variables and one within subject variable. Since it is categorical (essentially counts of answer choices on multiple choice questions), I'm looking for some chi-squared method. I know how to gener

Re: [R] Elastic net in R (enet package)

2009-08-25 Thread Max Kuhn
It estimates the model for every value of the L1 parameter. See ?predict.enet. When you predict, you have to specify the other parameter (which you can do a variety of ways). Max On Tue, Aug 25, 2009 at 8:54 AM, Alex Roy wrote: > Dear R users, >                        I am using "enet" package in

[R] adding factor scores back to an incomplete dataset...

2009-08-25 Thread David G. Tully
I am sure there is a simple way to do the following, but i haven't been able to find it. I am hoping a merciful soul on R-help could point me in the right direction. I am doing a factor analysis on survey data with missing values. to do this, I run: FA1<-factanal(na.omit(DATA), factors = X,

Re: [R] table, xyplot, names, & loops

2009-08-25 Thread Erik Iverson
And of course I did not test this :). Within the data.frame argument list, please change the <- operators to = signs. Then it should work. Erik -Original Message- From: Erik Iverson Sent: Tuesday, August 25, 2009 1:17 PM To: 'w_poet'; r-help@r-project.org Subject: RE: [R] table, xypl

Re: [R] mixed normal distriburtion

2009-08-25 Thread Giovanni Petris
With n = 100 I can see the two modes well separated in a density plot. However, I don't see why you cannot plot the density function, if that's what you need: curve(0.6 * dnorm(x, 0.4, 0.1) + 0.4 * dnorm(x, 0.8, 0.1), 0, 1.2) Best, Giovanni > Date: Tue, 25 Aug 2009 13:55:26 +0100 > From: ri

Re: [R] Partykit Document

2009-08-25 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
>Example, >data("GlaucomaM", package = "ipred") is accepted. Now instead of GlaucomaM, I> need to give my own data. But the data format for GlaucomaM is not given. >So how can I know that? Not familliar with the packages at all but if you simply enter: > data ("GlaucomaM", package="ipred") > Glau

Re: [R] how to apply a date format for data frame

2009-08-25 Thread Don MacQueen
Assuming your starts and ends are the number of days since some starting point (day 0), then following this example might do what you want: x <- 45678 class(x) <- 'Date' x [1] "2095-01-23" You will have to study the documentation to find out if your starting point is the same as R's, an

[R] Any one experienced working with git? (version control system)

2009-08-25 Thread Tal Galili
Hello all, I got a reccomandation from a friend to try: http://git-scm.com/ For verstion control of my R code. I am currently using notepad++ for my IDE. Does anyone got experience with this system? Any tips or recommandation will be warmly welcomed. Tal --

[R] List

2009-08-25 Thread AbouEl-Makarim Aboueissa
Dear Admins:   Could you please add me to the r-h...@stat.math.ethz.ch mailing list. I prefere to use my yahoo account: aboue...@yahoo.com Thank you so much for your attention to this matter, and I look forward to hearing from you soon. My other contact information is:

Re: [R] table, xyplot, names, & loops

2009-08-25 Thread Erik Iverson
Hello, "I'm just starting out in R and have a basic question about xyplot and tables. Suppose I had a table of data with the following names: Height, Age_group, City. I'd like to plot mean Height vs Age_group for each City" You did not provide a sample data.frame, so I generated one. This examp

Re: [R] how to pass user input to a function?

2009-08-25 Thread Don MacQueen
And an alternative to nested if else's, in a case where they are actually needed, is switch -Don At 1:06 PM -0400 8/25/09, Ista Zahn wrote: Nice one Gabor! It works great, and is really simple. Bill Dunlap's solution of GET$pass.var <- as.name(GET$pass.var) eval(substitute(mean(x), list

[R] Plotting to a connection

2009-08-25 Thread Gábor Csárdi
Dear All, is there a way to plot to a connection? I mean, I would like to do something like > tc <- textConnection("foo", "w") > png(tc) > plot(...) > close(tc) According to the documentation of the Cairo package, this should work with CairoPNG() (among others), but all I get is > tc <- textCon

Re: [R] plotting a grid with grid() ?

2009-08-25 Thread John Kane
That is what I wanted but grid(10,10) works just fine too Thanks again. --- On Mon, 8/24/09, David Winsemius wrote: > From: David Winsemius > Subject: Re: [R] plotting a grid with grid() ? > To: "John Kane" > Cc: "R R-help" > Received: Monday, August 24, 2009, 4:37 PM > > On Aug 24, 2009, a

Re: [R] plotting a grid with grid() ?

2009-08-25 Thread John Kane
ARGGH! I knew I was missing something simple!! It was just too obvious. Many thanks. --- On Mon, 8/24/09, David Winsemius wrote: > From: David Winsemius > Subject: Re: [R] plotting a grid with grid() ? > To: "John Kane" > Cc: "R R-help" > Received: Monday, August 24, 2009, 5:14 PM > > On

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

2009-08-25 Thread Paul Smith
Thanks, Henrique. I think you mean the following: fConn <- file('test.txt', 'r+') Lines <- readLines(fConn) writeLines(c("Text at beginning of file\n", Lines), con = fConn) close(fConn) (With paste(), it does not work.) Paul On Tue, Aug 25, 2009 at 5:02 PM, Henrique Dallazuanna wrote: > Try th

Re: [R] table, xyplot, names, & loops

2009-08-25 Thread Daniel Malter
Just plotting the mean is not very informative (at least not more informative than providing the same information in a table). If you want to show some of the distributional properties of height for each Age_group x City pair, try box-and-whisker plots ?bwplot Imagine you have four age categories

Re: [R] Autocorrelation and t-tests

2009-08-25 Thread milton ruser
Hi Bernardo, I suggest you give a look at: Dale MRT & Fortin MJ, 2009. Spatial Autocorrelation and Statistical Tests: Some Solutions. Journal of Agricultural, Biological and Environmental Statistics, 14(2):188-206. Cheers milton On Tue, Aug 25, 2009 at 1:08 PM, B Garcia Carreras < bernardo.garc

[R] Semi Standard Deviation

2009-08-25 Thread babelproofreader
Is there a function in R to calculate the semi deviation of a data set? I cannot seem to find a reference to one in the manual. -- View this message in context: http://www.nabble.com/Semi-Standard-Deviation-tp25138640p25138640.html Sent from the R help mailing list archive at Nabble.com. __

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

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 12:15 PM, mirko86 wrote: I want to draw lines using a matrix with the X-axe on the first column, and the the Y-axe on the second column. These lines have to link the n points of a graph, so they are n-1, but the resout using these two commands: X <- m

Re: [R] Help with nls and error messages singular gradient

2009-08-25 Thread Sundar Dorai-Raj
Another alternative is to use SSlogis which is very similar to the model you're fitting except with one additional parameter: Asym <- 3 xmid <- 0 scal <- 10 model <- nls(bod ~ SSlogis(time, Asym, xmid, scal), data = mydata) summary(model) plot(bod ~ time, mydata) newdata <- data.frame(time = seq(1

[R] table, xyplot, names, & loops

2009-08-25 Thread w_poet
Hi R community, I'm just starting out in R and have a basic question about xyplot and tables. Suppose I had a table of data with the following names: Height, Age_group, City. I'd like to plot mean Height vs Age_group for each City. When I try to do the following: > library(lattice) > xyplot(mea

[R] Autocorrelation and t-tests

2009-08-25 Thread B Garcia Carreras
Hi, I have two sets of data for a given set of (non-lattice) locations. I would like to know whether the two are significantly different. This would be simple enough if it wasn't for the fact that the data is spatially autocorrelated. I have come across several possible solutions (including Cliff

Re: [R] how to pass user input to a function?

2009-08-25 Thread Ista Zahn
Nice one Gabor! It works great, and is really simple. Bill Dunlap's solution of GET$pass.var <- as.name(GET$pass.var) eval(substitute(mean(x), list(x=GET$pass.var))) also works. Thanks! On Tue, Aug 25, 2009 at 12:59 PM, Gabor Grothendieck wrote: > Try this: > > x <- get(GET$pass.var) > mean(x)

Re: [R] Help with nls and error messages singular gradient

2009-08-25 Thread Sundar Dorai-Raj
Hi, Michael, I think the SPSS answer is wrong. Your starting values are way off. Look at this plot for verification: con <- textConnection("time bod 11 0.47 22 0.74 33 1.17 44 1.42 55 1.60 67 1.84 79 2.19 8 11 2.17") mydata <- read.table(con, header = TRUE) close(co

Re: [R] Covariates in NLS (Multiple nonlinear regression)

2009-08-25 Thread Lindsay Banin
Thank you for your suggestion. Unfortunately, like most texts on the topic of nonlinear regression, examples tend to be either a) a simple regression with one predictor and one response or b) a continuous predictor and response with a categorical variable (i.e. differentiating for example two cu

Re: [R] how to pass user input to a function?

2009-08-25 Thread Gabor Grothendieck
Try this: x <- get(GET$pass.var) mean(x) On Tue, Aug 25, 2009 at 12:26 PM, Ista Zahn wrote: > Hi everyone, > I'm building a website (http://yourpsyche.org) using  Jeffrey Horner's > awesome Rapache module. I want to take user input, and pass it to an R > script. At first I was simply using if el

Re: [R] Covariates in NLS (Multiple nonlinear regression)

2009-08-25 Thread Gabor Grothendieck
Try this: RSiteSearch("Weibull regression") On Tue, Aug 25, 2009 at 12:02 PM, Lindsay Banin wrote: > Dear R-users, > > I am trying to create a model using the NLS function, such that: > > Y = f(X) + q + e > > Where f is a nonlinear (Weibull: a*(1-exp(-b*X^c)) function of X and q is a > covariat

Re: [R] how to correlate nominal variables?

2009-08-25 Thread Daniel Malter
I updated the previously posted function for Cramer's V so that it automatically prints Cramer's V, chi-square, the degrees of freedom, and the significance level of Cramer's V based on the chi-square value and the degrees of freedom with desired (user-supplied) levels of precision. An example is

Re: [R] how to pass user input to a function?

2009-08-25 Thread Michael E. Driscoll
Hi Ista - I've had success using the do.call function with RApache do.call(func, arglst) where 'func' is the function you desire to use, 'arglst' is a list of arguments. You may need to do some cleanup of the arguments using evalq() function (so that numbers are treated as numbers, for example

Re: [R] scatterplot3d bug??

2009-08-25 Thread Vivek Ayer
Great! Thanks again! Vivek 2009/8/25 Uwe Ligges : > I finally found some time to look at it: > > Yes, it does not work properly for angles > 180 degrees. Will try to find a > fix and make a new release soon. > > Best wishes, > Uwe Ligges > > > Vivek Ayer wrote: >> >> Hey guys, >> >> Not sure if I

[R] how to pass user input to a function?

2009-08-25 Thread Ista Zahn
Hi everyone, I'm building a website (http://yourpsyche.org) using Jeffrey Horner's awesome Rapache module. I want to take user input, and pass it to an R script. At first I was simply using if else statements, but after a while I had so many nested if else's in my code that my head was spinning. S

Re: [R] Decision boundaries for lda function?

2009-08-25 Thread Thomas Larsen
I got hold of 'Modern Applied Statistics with S' by Venables and Ripley (p. 335-336) and I was able to answer my own question: ### AA<-read.table("http://www.natursyn.dk/online/fingerprinting.txt",header=T) aa.grp <- factor(c(rep('f',13),rep('b',10),rep('p',10))) aa.lda<-lda(as.matrix(AA[3:9]),

Re: [R] Covariates in NLS (Multiple nonlinear regression)

2009-08-25 Thread Bert Gunter
I think you need to consult a local statistician, as you appear to be so far out of your depth statistically that even the best-intentioned help from this list may not suffice. For example, if I were that local statistician, I would ask: what is the context? -- what is the underlying scientific iss

Re: [R] scatterplot3d bug??

2009-08-25 Thread Uwe Ligges
I finally found some time to look at it: Yes, it does not work properly for angles > 180 degrees. Will try to find a fix and make a new release soon. Best wishes, Uwe Ligges Vivek Ayer wrote: Hey guys, Not sure if I encountered a bug with the scatterplot3d function. Here's the calls I made

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

2009-08-25 Thread mirko86
I want to draw lines using a matrix with the X-axe on the first column, and the the Y-axe on the second column. These lines have to link the n points of a graph, so they are n-1, but the resout using these two commands: X <- matrix(scan("MaxInterEdges.R",0), ncol=2);

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-25 Thread Timothy_Handley
Manuel, Thanks for the reference. I printed it out and read through it this morning. I think I'm going to take a gls approach. I've spent the last couple weeks reading about spatial autocorrelation, and found that the world of SAC is large, complex, and requires more time than I currently have. U

[R] Help with nls and error messages singular gradient

2009-08-25 Thread Michael Pearmain
Hi All, I'm trying to run nls on the data from the study by Marske (Biochemical Oxygen Demand Interpretation Using Sum of Squares Surface. M.S. thesis, University of Wisconsin, Madison, 1967) and was reported in Bates and Watts (1988). Data is as follows, (stored as mydata) time bod 11 0.

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

2009-08-25 Thread Henrique Dallazuanna
Try this; fConn <- file('test.txt', 'r+') Lines <- readLines(fConn) writeLines(paste("Text at beginning of file", Lines, sep = "\n"), con = fConn) On Tue, Aug 25, 2009 at 12:54 PM, Paul Smith wrote: > Dear All, > > I have a piece of text that I want to append to a text file at the >

Re: [R] converting a matrix into a fn

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 8:45 AM, maram salem wrote: Dear All, I have a matrix m of the form m [,1] [,2] [1,] 9072.302 0.0004462366 [2,] 9086.811 0.0005628169 [3,] 9101.320 0.0007126347 [4,] 9115.830 0.0008986976 [5,] 9130.339 0.001126

[R] Covariates in NLS (Multiple nonlinear regression)

2009-08-25 Thread Lindsay Banin
Dear R-users, I am trying to create a model using the NLS function, such that: Y = f(X) + q + e Where f is a nonlinear (Weibull: a*(1-exp(-b*X^c)) function of X and q is a covariate (continous variable) and e is an error term. I know that you can create multiple nonlinear regressions where x i

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

2009-08-25 Thread Paul Smith
Dear All, I have a piece of text that I want to append to a text file at the beginning of the text file. I have thought about using cat() with the option 'append=T', but the appending, in this case, is done at the bottom of the text file. Any ideas? Thanks in advance, Paul

Re: [R] Lattice graph tweaking

2009-08-25 Thread Wallis, David
Sorry, That worked. However, is it possible to single out specific boxes and change their colour? I want the four graph headers in the top right of the trellice to be different colour to the rest. Thanks very much From: Sundar Dorai-Raj [sdorai...@gmail

[R] seeking tutor on statistical learning and data-mining

2009-08-25 Thread Luna Laurent
(posting for my friend) Hi all, We are looking for a tutor who could teach me statistical learning and data-mining using the book: The Elements of Statistical Learning: Data Mining, Inference, and Prediction Please drop me a line if you are interested. Thank you! [[alternative HTML ver

Re: [R] Help in building new function

2009-08-25 Thread Ana Paula Mora
It worked perfectly. Thanks a lot. On Mon, Aug 24, 2009 at 4:16 AM, Gabor Grothendieck wrote: > 1. Just enter > arima > at the R console to see its source code (without comments). The source > tar.gz for R is found by googling for R, clicking on CRAN in left column > and choosing mirror. Or

[R] Help in plotting a legend

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

Re: [R] Removing objects from workspace

2009-08-25 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Ronggui Huang > Sent: Monday, August 24, 2009 9:26 PM > To: Steven Kang > Cc: r-help@r-project.org > Subject: Re: [R] Removing objects from workspace > > It depends. > > If ther

Re: [R] Problems with loading 'wordnet' in a standalone pc

2009-08-25 Thread Kelvin Lam
Thanks Uwe. The wordnet is working now. My previous configuration that causes the error was: R - version 2.9.1 wordnet - version 0.1-4 rJava 0.6-2 After updating rJava to version 0.7-0 everything works now. Uwe Ligges-3 wrote: > > Looks like nobody answered so far: > > > Kelvin Lam wrote

[R] MASS: lda collinearity

2009-08-25 Thread Jo Etzel
I am trying to understand what the lda function in the MASS package calculates when there are more dimensions than examples. It is my understanding that the Fisher Linear Discriminant is not applicable in this case, because the inverse of the covariance matrix cannot be calculated. My question

[R] Plotting the Log-Likelihood

2009-08-25 Thread enrico.fosco...@libero.it
Dear Users, I would like to plot the log-likelihood (depending on two parameters). I wrote the following code: library(mvtnorm) sigma<- matrix(c(4,2,2,3),ncol=2) x<-rmvnorm(n=500,mean=c(1,2),sigma=sigma) likel<- function(param,data){

Re: [R] Lattice graph tweaking

2009-08-25 Thread Sundar Dorai-Raj
A reproducible example would be nice. Try grid = FALSE for the first question, though I'm unaware which lattice plot you are using where the default is TRUE. So I can't guarantee that will even work. For your second question, add par.settings = list(strip.background = list(col = "white")) to yo

[R] Lattice graph tweaking

2009-08-25 Thread Wallis, David
To: silwood-r Subject: Removing lattice graph gridlines and editing label box colour Hi, Is it possible to remove the background gridlines from a lattice graph (ie graph made up of multiple individual graphs with annoying blue grid in the backgroun)? Also, Is it possible to change the colour o

Re: [R] Help on comparing two matrices

2009-08-25 Thread Michael Kogan
Gabor: Wow, that seems to be exactly what I need! Does it matter that "my" incidence matrices represent neighborhood relations between vertices and faces rather than between vertices and edges? Steve: Yep, I realize that this package is exactly what I'm searching for. :) Gabor Grothendieck s

Re: [R] Help on comparing two matrices

2009-08-25 Thread Steve Lianoglou
Hi, It looks like you're getting more good stuff, but just to follow up: On Aug 24, 2009, at 4:01 PM, Michael Kogan wrote: Steve: The two matrices I want to compare really are graph matrices, just not adjacency but incidence matrices. There should be a way to get an adjacency matrix of a gra

Re: [R] Help on comparing two matrices

2009-08-25 Thread Gabor Grothendieck
They can be regarded as incidence matrices rather than adjacency matrices and in that case it follows: library(igraph) # incidence matrix to canonical edge list inc2canel <- function(m) { g <- graph.incidence(m) cp <- canonical.permutation(g) can <- permute.vertices(g, cp$

Re: [R] Re : Odp: Re : Odp: Re : table function

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 6:25 AM, Inchallah Yarab wrote: Thank you very much Peter it works!! the second step is to calculate the sum of variable in each class!!! how can i do this!!! ?table ?xtab De : Petr PIKAL Cc : r-help@r-project.org Envoyé le : Mardi, 2

Re: [R] problem with BRugs

2009-08-25 Thread Uwe Ligges
Vitalie S. wrote: This is a BUGS error message that indeed tells you that BUGS cannot truncate that density - not related to R at all. Best, Uwe Ligges Yes, indeed, that does not work in OpenBugs as well. Means that documentation of Open bugs is incorrect (they are using dnorm there)

Re: [R] formats

2009-08-25 Thread Richard . Cotton
> what do you mean by "%d-%b-%y". is it reading format or writing format. "%d-%b-%y" is a date format - see the help page for strptime. Example usage: strptime("01-Jan-84", "%d-%b-%y") strftime(Sys.time(), "%d-%b-%y") Regards, Richie. Mathematical Sciences Unit HSL ---

[R] Elastic net in R (enet package)

2009-08-25 Thread Alex Roy
Dear R users, I am using "enet" package in R for applying "elastic net" method. In elastic net, two penalities are applied one is lambda1 for LASSO and lambda2 for ridge ( zou, 2005) penalty. But while running the analysis, I realised tht, I optimised only one lambda. ( eve

Re: [R] mixed normal distriburtion

2009-08-25 Thread Richard . Cotton
> I'm trying to draw the density function of a mixed normal distribution > in the form of: > .6*N(.4,.1)+ .4*N(.8,.1) > At first I generate a random sample with size 200 by the below code: > means = c(.4,.8) > sds = sqrt(c(.1,.1)) > ind = sample(1:2, n, replace=TRUE, prob=c(.6,.4)) > x=rnorm(n,mean

Re: [R] multiple expressions in a legend

2009-08-25 Thread Gabor Grothendieck
Try this: plot(0) ix <- as.double(1:3) legend("top", as.expression(lapply(ix, function(i) bquote(r^.(i) On Tue, Aug 25, 2009 at 8:45 AM, Michael Cho wrote: > Hi, > > Trying to do something fairly simple.  I'm trying to get a legend that > combines superscripts with a sequence, like this: > r

[R] formats

2009-08-25 Thread rajclinasia
Hi every one, what do you mean by "%d-%b-%y". is it reading format or writing format. Thanks in Advance. -- View this message in context: http://www.nabble.com/formats-tp25133503p25133503.html Sent from the R help mailing list archive at Nabble.com. ___

[R] converting a matrix into a fn

2009-08-25 Thread maram salem
Dear All, I have a matrix m of the form  m     [,1] [,2]   [1,]  9072.302 0.0004462366   [2,]  9086.811 0.0005628169   [3,]  9101.320 0.0007126347   [4,]  9115.830 0.0008986976   [5,]  9130.339 0.001126   [6,]  9144.848 0.0014018405   [7,]  9159.357 0

[R] multiple expressions in a legend

2009-08-25 Thread Michael Cho
Hi, Trying to do something fairly simple. I'm trying to get a legend that combines superscripts with a sequence, like this: r^2 = 1 r^2 = 2 r^2 = 3 ... Except that r^2 is properly formatted as a superscript. I've been playing with "substitute" and "expression" and can get an individual line to a

Re: [R] problem with BRugs

2009-08-25 Thread Vitalie S.
This is a BUGS error message that indeed tells you that BUGS cannot truncate that density - not related to R at all. Best, Uwe Ligges Yes, indeed, that does not work in OpenBugs as well. Means that documentation of Open bugs is incorrect (they are using dnorm there). Also "I" works

[R] Pec function in R

2009-08-25 Thread K F Pearce
Hello everyone, These are some questions about the 'pec' function in R. These questions deal with prediction error curves and their derivation. Prediction error curves are documented in, for example, "Efron-type measures of prediction error for survival analysis" by Gerds and Schumacher. I h

[R] mixed normal distriburtion

2009-08-25 Thread mahdiyeh
I'm trying to draw the density function of a mixed normal distribution in the form of: .6*N(.4,.1)+ .4*N(.8,.1) At first I generate a random sample with size 200 by the below code: means = c(.4,.8) sds = sqrt(c(.1,.1)) ind = sample(1:2, n, replace=TRUE, prob=c(.6,.4)) x=rnorm(n,mean=means[ind],sd=s

  1   2   >