[R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Xavier Fernández i Marín
Dear all, When trying to multiply the same matrices repeatedly I get different results some of the times. It is not systematic, which is the fact that is giving me more trouble to try to isolate the problem. Basically I am doing X %*% B, where X is a Nx2 matrix and B is a vector with 2 values.

Re: [R] Solve your R problems

2011-09-13 Thread Patrick Burns
There has been one update of 'The R Inferno' made in spring 2011. It is a fairly mild revision but has changes prompted by a number of people -- most especially Mark Difford. That other Pat Burns may have known about hockey, but I suspect he was a real laggard when it came to random portfolios.

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Joshua Wiley
I cannot replicate this on, even with 1 milllion reps on: R version 2.13.1 (2011-07-08) Platform: i386-pc-mingw32/i386 (32-bit) or R Under development (unstable) (2011-08-13 r56733) Platform: x86_64-pc-mingw32/x64 (64-bit) Perhaps it is OS dependent (I am away from my linux box at the moment)?

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Xavier Fernández i Marín
Joshua Wiley vas escriure el dia dt, 13 set 2011: I cannot replicate this on, even with 1 milllion reps on: R version 2.13.1 (2011-07-08) Platform: i386-pc-mingw32/i386 (32-bit) or R Under development (unstable) (2011-08-13 r56733) Platform: x86_64-pc-mingw32/x64 (64-bit) Perhaps

[R] How to use a variable after $ ($x) for subscripting a list, How to source from a character object (source(x))

2011-09-13 Thread drflxms
Dear R colleagues, as result of a function a huge list is generated. From this result list I'd like to extract information. Think of the list i.e. as an object named listResult with the following form: [[a]] [1] [2] [3] [4] [5] [[b]] [1] [2] [3] [4] [5] [[c]] [1] [2] [3] [4] [5] where

Re: [R] creating a new column with values from another

2011-09-13 Thread Patrick Connolly
On Mon, 12-Sep-2011 at 12:35PM -0700, holly shakya wrote: | I have 2 columns for weight. There are NAs in each column but not for the | same observation. Some observations have values for both. I would want to | prioritize the WT2 values so I would like to do the following: | | From this: | ID

Re: [R] barplot in hexagram layout

2011-09-13 Thread Jim Lemon
On 09/13/2011 03:08 AM, Schatzi wrote: I updated the code as follows: dev.new(width=2.5, height=3,mar=c(0,0,0,0)) par(mfrow=c(5,1),mar=c(.5, .5, 1.5, .5), oma=c(.4, 0,.5, 0)) barplot(c(1,1,1,1,1),col=c(white,white,red,white,white), axes = FALSE,border=NA)

Re: [R] How to use a variable after $ ($x) for subscripting a list, How to source from a character object (source(x))

2011-09-13 Thread R. Michael Weylandt
I had a little bit of trouble following what exactly you mean to do (specifically, I'm having a little bit of trouble understanding your sample object listResult -- is it a list or a set of factors or a list of lists or something else entirely), but I believe that replacing the `$` operator with

[R] estimating Fstats in strucchange

2011-09-13 Thread Vikram Bahure
Hi, I am new to R. It would be kind if I could get some help on this. I am using R to estimate Fstats but I am getting following error. a3 is annual GDP data from 1951 to 2010. fs- Fstats(ecm.model, from=1954, to = 1975,data=a3) Error in Fstats(ecm.model, from = 1954, to = 1975, data = a3) :

[R] missing message part in R console

2011-09-13 Thread Mehmet Suzen
Dear List, I have compiled R on windows 32bit (v 2.12.2). However, I am not getting the following line: Natural language support but running in an English locale message. What would be the reason for this behaviour? -m PS: R version 2.12.2 (2011-02-25) Copyright (C) 2011 The R Foundation

[R] class weights with Random Forest

2011-09-13 Thread James Long
Hi All, I am looking for a reference that explains how the randomForest function in the randomForest package uses the classwt parameter. Here: http://tolstoy.newcastle.edu.au/R/e4/help/08/05/12088.html Andy Liaw suggests not using classwt. And according to:

Re: [R] On-line machine learning packages?

2011-09-13 Thread Jay
How does sequential classification differ form running a one-off classifier for each run? - Because feedback from the previous round can and needs to be incorporated into the ext round. http://lmgtfy.com/?q=R+machine+learning - That is a new low. I was hoping to get help, oblivious I was wrong

Re: [R] Multiple regression intercept

2011-09-13 Thread burdy
Thanks for clearing that up -- View this message in context: http://r.789695.n4.nabble.com/Multiple-regression-intercept-tp3808045p3809458.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] estimating Fstats in strucchange

2011-09-13 Thread R. Michael Weylandt
I'd suggest you read the documentation on Fstats by typing ? Fstats in your R window. You'll note that from/to are not time arguments but rather indices of the object being passed in. This is the source of your problem: the documentation also suggests that if you pass from a two-value vector it

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Rolf Turner
I tried your example code on my laptop running Ubuntu Linux, and of course it ran --- just as it should (*has* to!) without any problem; no errors thrown. This sort of thing should not/does not/cannot happen under ``normal circumstances''. There has to be something wrong somewhere in your

Re: [R] mvpart analyses with covariables

2011-09-13 Thread Gavin Simpson
On Tue, 2011-09-13 at 13:46 +0800, 'Ben Ford' wrote: Hi all, I am fairly new to R and I am trying to run mvpart and create a MRT using explanatory variables and covariables. I've been following the procedures in Numerical Ecoogy with R. The command (no covariables) which works fine -

Re: [R] On-line machine learning packages?

2011-09-13 Thread Gavin Simpson
On Mon, 2011-09-12 at 23:35 -0700, Jay wrote: How does sequential classification differ form running a one-off classifier for each run? - Because feedback from the previous round can and needs to be incorporated into the ext round. http://lmgtfy.com/?q=R+machine+learning - That is a new

Re: [R] calc.relimp pmvd for US R-user

2011-09-13 Thread Dénes TÓTH
Dear All: I am calculating the relative importance of a regressor in a linear model. Does anyone know how I can obtain/install the 'pmvd' computation type? I am a US user. Regards, Y Hi, Do you have any specific reason to use the pmvd method, especially in the light of

[R] ggplot - class character problem

2011-09-13 Thread David Menezes
Hi I'm trying to use ggplot2 to chart a dataset that I've drawn in from excel.  When I run the qplot command, I get the following error message: Error: ggplot2 doesn't know how to deal with data of class character It feels like I need to coerce one of the fields in my data frame. Here's the

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Xavier Fernández i Marín
Rolf Turner vas escriure el dia dt, 13 set 2011: I tried your example code on my laptop running Ubuntu Linux, and of course it ran --- just as it should (*has* to!) without any problem; no errors thrown. This sort of thing should not/does not/cannot happen under ``normal circumstances''.

Re: [R] On-line machine learning packages?

2011-09-13 Thread Paul Hiemstra
You posed a very vague question: what packages are available for classification tasks. Then you respond by saying that you have done some searching to no avail on Rseek, not specifying what it Providing you with answers is purely voluntary for the people on the mailing list. Sending vague,

Re: [R] Getting Rcpp SEXP data in C++

2011-09-13 Thread Joshua Ulrich
Worik, On Mon, Sep 12, 2011 at 10:54 PM, Worik R wor...@gmail.com wrote: Friends I am looking at Rcpp and I am a bit stuck on a simple matter. Rcpp questions will likely get more attention on the Rcpp-devel list: http://lists.r-forge.r-project.org/mailman/listinfo/rcpp-devel (I am calling R

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Ben Bolker
Xavier Fernández i Marín xfim.ll at gmail.com writes: Rolf Turner vas escriure el dia dt, 13 set 2011: [snip] This sort of thing should not/does not/cannot happen under ``normal circumstances''. There has to be something wrong somewhere in your setup. Either your hardware or your

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Ben Bolker
Xavier Fernández i Marín xfim.ll at gmail.com writes: More elements: In python the same algorithm does not show this strange behaviour. Is Python using the same BLAS/LAPACK? __ R-help@r-project.org mailing list

Re: [R] On-line machine learning packages?

2011-09-13 Thread André Rossi
Jay, I understood your question, but I don't know any package with a classifier that uses feedback as input. I'm looking for something similar, but for regression. If you find something, please let me know. André Rossi 2011/9/13 Jay josip.2...@gmail.com How does sequential classification

[R] Mathematical expressions in the group labels in lattice

2011-09-13 Thread Timo Schmid
Hi, I am working with the lattice package and I want to label to groups in the xyplots with mathematical expressions. I short example for this library(lattice) Case-factor(rep(1:2,each=300)) xx-rnorm(600,0,1) yy-rnorm(600,0,1) xyplot(yy~xx|Case) This results in two scatter plots with label 1

[R] Problems of metafile plots when converting word to pdf file

2011-09-13 Thread Jin Minming
Hi all, I copy metafile boxplot from R to Word. Then save as Pdf file. But I found there are some unexpected black lines in some plots within this PDF file. Please give me some advice how to get rid of these black lines in PDF files. Thanks a lot, Jim [[alternative HTML version

[R] SVD Memory Issue

2011-09-13 Thread vioravis
I am trying to perform Singular Value Decomposition (SVD) on a Term Document Matrix I created using the 'tm' package. Eventually I want to do a Latent Semantic Analysis (LSA). There are 5677 documents with 771 terms (the DTM is 771 x 5677). When I try to do the SVD, it runs out of memory. I am

Re: [R] Multilevel model in lme4 and nlme

2011-09-13 Thread jonas garcia
Hi Ben, thanks for your reply. Your suggestion does not work indeed: lme(y ~ x, random=list(~1|a:b, ~1|b:c), data=mydata) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups Here is a reproducible example of my data: set.seed(123) library(lme4) library(nlme)

Re: [R] envfit vector labels with ordiplot3d

2011-09-13 Thread Briony
It *really* does help to read the documentation for functions. Like most of the functions in vegan that extract information from ordinations, ordilabel() extracts information for axes 1 and 2 only, by default. Does ordilabel(pl$arrows, choices = 1:3) work for you? G Thanks for the suggestion.

[R] Force regression line to a 1:1 relationship

2011-09-13 Thread RCulloch
Hello, I appreciate this is likely to be an easy question. I am trying to obtain the residuals from a linear regression where the line is forced to have a 1:1 relationship. An example of the data: A-c(0.9803922, 1.3850416, 0.8241758, 0.000, 0.4672897, 1.1904762, 0.000, 0.9456265,

Re: [R] function censReg in panel data setting

2011-09-13 Thread Igors
Hi Arne, Any success in finding possible solutions for my problem? I have tried to experiment with size of sample and I get really bad picture. I can't get it work even if sample is ~ 1000 obs. And it is way less than I would like to see working, taking into account my full sample size ~ 540

[R] GO Protein Complex Analysis for Homo sapiens

2011-09-13 Thread Sandeep Amberkar
Dear All, I need to fetch GO ontologies for Homo sapiens with their mappings to corresponding Uniprot identifiers. I would be using this information to compare result from a clustering algorithm with existing protein complexes. This would be a test to check how the clustering algorithm accurately

Re: [R] envfit vector labels with ordiplot3d

2011-09-13 Thread Briony
It *really* does help to read the documentation for functions. Like most of the functions in vegan that extract information from ordinations, ordilabel() extracts information for axes 1 and 2 only, by default. Does ordilabel(pl$arrows, choices = 1:3) work for you? G Thanks for the suggestion.

Re: [R] ggplot - class character problem

2011-09-13 Thread RCulloch
I suspect it is to do with your method of creating the dataframe, I would check to see if the columns in the df are numeric, which you can do by: is.numeric(flat_data$time) for each variable, if it is not numeric (and at least one must be a character, given the error message) then redefine as

Re: [R] ggplot - class character problem

2011-09-13 Thread Ista Zahn
Hi David, On Tue, Sep 13, 2011 at 6:00 AM, David Menezes david.n.mene...@gmail.com wrote: Hi I'm trying to use ggplot2 to chart a dataset that I've drawn in from excel.  When I run the qplot command, I get the following error message: Error: ggplot2 doesn't know how to deal with data of

Re: [R] missing message part in R console

2011-09-13 Thread Mehmet Suzen
Reply to my own question: This is due to internationalisation support: http://cims.nyu.edu/cgi-systems/info2html?%28R-admin.info.gz%29Internati onalization%2520support -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mehmet Suzen

Re: [R] How to use a variable after $ ($x) for subscripting a list, How to source from a character object (source(x))

2011-09-13 Thread drflxms
Thank you very much! foreach(i=1:length(levels)) %do% {listResult[[i]][[input]]} (instead of listResult[[i]]$input) does the trick!!! Sorry for being a little bit confuse in describing the problem. My example object listResult is meant to be a list-object with several levels. More concrete: it

Re: [R] GO Protein Complex Analysis for Homo sapiens

2011-09-13 Thread neetika nath
Hi Sandeep, I am not entirely sure about this but you might be interested in using ‘clValid’ package. In which Biological measures seems to be good option to map function with GO terms. I haven't used it myself. Neetika On Tue, Sep 13, 2011 at 1:21 PM, Sandeep Amberkar

Re: [R] How to use a variable after $ ($x) for subscripting a list, How to source from a character object (source(x))

2011-09-13 Thread Duncan Murdoch
On 13/09/2011 8:50 AM, drflxms wrote: Thank you very much! foreach(i=1:length(levels)) %do% {listResult[[i]][[input]]} (instead of listResult[[i]]$input) does the trick!!! If both i and input were the same type (numeric or character), you could also use listResult[[c(i, input)]] This

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread R. Michael Weylandt
Just to clarify things before trying to answer: by a 1:1 relationship do you mean you want the regression slope to be equal to 1 no matter what? Michael On Tue, Sep 13, 2011 at 7:03 AM, RCulloch ross.cull...@dur.ac.uk wrote: Hello, I appreciate this is likely to be an easy question. I am

Re: [R] ggplot - class character problem

2011-09-13 Thread Ista Zahn
On Tue, Sep 13, 2011 at 7:32 AM, RCulloch ross.cull...@dur.ac.uk wrote: I suspect it is to do with your method of creating the dataframe, I think the error is actually triggered by quoting the name of the data.frame in the qplot call. I would check to see if the columns in the df are numeric,

Re: [R] GO Protein Complex Analysis for Homo sapiens

2011-09-13 Thread Martin Morgan
On 09/13/2011 05:21 AM, Sandeep Amberkar wrote: Dear All, I need to fetch GO ontologies for Homo sapiens with their mappings to corresponding Uniprot identifiers. I would be using this information to compare result from a clustering algorithm with existing protein complexes. This would be a

Re: [R] How to use a variable after $ ($x) for subscripting a list, How to source from a character object (source(x))

2011-09-13 Thread David Winsemius
On Sep 13, 2011, at 4:11 AM, drflxms wrote: Dear R colleagues, as result of a function a huge list is generated. From this result list I'd like to extract information. Think of the list i.e. as an object named listResult with the following form: [[a]] [1] [2] [3] [4] [5] [[b]] [1] [2]

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread John Fox
Dear Ross, lm(y ~ 0 + offset(x)) will do the trick, but the resulting model has no coefficient estimates and thus can't be used with abline(). You can, e.g., get predictions from the model, but I'm not sure what real use it will be to you. I hope this helps, John

Re: [R] Problems of metafile plots when converting word to pdf file

2011-09-13 Thread Jean-Christophe BOUËTTÉ
Hi there, did you try saving your graph directly as pdf with R, using ?pdf What you're describing seems more a Word problem. JC 2011/9/13 Jin Minming jminm...@yahoo.com: Hi all, I copy metafile boxplot from R to Word. Then save as Pdf file. But I found there are some unexpected black lines in

Re: [R] Mathematical expressions in the group labels in lattice

2011-09-13 Thread David Winsemius
On Sep 13, 2011, at 8:30 AM, Timo Schmid wrote: Hi, I am working with the lattice package and I want to label to groups in the xyplots with mathematical expressions. I short example for this library(lattice) Case-factor(rep(1:2,each=300)) xx-rnorm(600,0,1) yy-rnorm(600,0,1)

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread RCulloch
yes, that is correct. The idea being that I want to know the residuals of the data points compared to a 1:1 line (as shown in the plot), if that makes sense? I appreciate that this might not be considered a typical approach, and it would probably take a while to explain (defend) why I am doing it!

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Xavier Fernández i Marín
Ben Bolker vas escriure el dia dt, 13 set 2011: You mentioned that you had compiled R yourself. Can you replicate this with a stock R binary, i.e. from a Red Hat or Ubuntu repository? If not, can you give details of your compilation setup, especially if you are using a specialized or

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread Jean-Christophe BOUËTTÉ
And you can easily get these predictions using the following code : A - B ;-) JC 2011/9/13 John Fox j...@mcmaster.ca: Dear Ross, lm(y ~ 0 + offset(x)) will do the trick, but the resulting model has no coefficient estimates and thus can't be used with abline(). You can, e.g., get predictions

Re: [R] Mathematical expressions in the group labels in lattice

2011-09-13 Thread David Winsemius
On Sep 13, 2011, at 9:30 AM, David Winsemius wrote: On Sep 13, 2011, at 8:30 AM, Timo Schmid wrote: Hi, I am working with the lattice package and I want to label to groups in the xyplots with mathematical expressions. I short example for this library(lattice)

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread David Winsemius
On Sep 13, 2011, at 9:34 AM, Jean-Christophe BOUËTTÉ wrote: And you can easily get these predictions using the following code : A - B I had a similar thought in that: resA_B - A - B would give the residuals from a line through the origin with a slope of 1. No regression needed.

Re: [R] Problems of metafile plots when converting word to pdf file

2011-09-13 Thread Bill Pikounis
Jim, I have seen this outcome as well with graphs from time to time and agree with Jean-Christophe that the bug seems to creep in at the Windows / Office level. You do not mention your version of Word, but I have seen this with Word 2000 and Word 2007 (doc and docx) software and formats, for

[R] Deleting Rows based on Factor and Time Period

2011-09-13 Thread Anna Dunietz
Hi All! I have been messing around with this problem for about a week but to no avail! The following data has been cut down in order to make my question reproducible. The alldat data frame includes 2 columns: 1 date column and 1 factor column (equity names)).

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread John Fox
Dear JC, -Original Message- From: Jean-Christophe BOUËTTÉ [mailto:jcboue...@gmail.com] Sent: September-13-11 9:35 AM To: John Fox Cc: RCulloch; r-help@r-project.org Subject: Re: [R] Force regression line to a 1:1 relationship And you can easily get these predictions using the

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread John Fox
Dear Ross, But the residuals are just y - x. Best, John -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of RCulloch Sent: September-13-11 9:19 AM To: r-help@r-project.org Subject: Re: [R] Force regression line to a 1:1

[R] help with hclust and cutree

2011-09-13 Thread Madeleine Seeland
Hello, I would like to cut a hclust tree into several groups at a specific similarity. I assume this can be achieved by specifying the h argument with the specified similarity, e.g.: clust-hclust(dist,average) cut-cutree(clust,h=0.65) Now, I would like to draw rectangles around the branches of

[R] using vif from package car - aliased coefficients in the model

2011-09-13 Thread Dimitri Liakhovitski
Hello! I have run a simple regression - lm and created a regression object myreg. I can see all the coefficients when I print(myreg). Then I tried to run vif(myreg) from the package car. However, it's giving me an error: in vif.lm(regr.f) : there are aliased coefficients in the model Very sorry

Re: [R] nls, the four parameter logistic equation, and prediction band

2011-09-13 Thread John C Nash
The error msg is telling you that R cannot evaluate the loss function, so you should not expect answers. You might try examining the data -- Are there NA or Inf entries? Or prepare a dataframe with just X and Y, sort by X and graph. Then check the nls computations by sampling, say, every 100

Re: [R] using vif from package car - aliased coefficients in the model

2011-09-13 Thread John Fox
Dear Dimitri, -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Dimitri Liakhovitski Sent: September-13-11 10:29 AM To: r-help Subject: [R] using vif from package car - aliased coefficients in the model Hello! I have run a

Re: [R] Problems of metafile plots when converting word to pdf file

2011-09-13 Thread Jin Minming
Hi JC and Bill, Thanks a lot for your help. I found that Office 2007 and 2010 both have this problem when I choose to save as PDF file in Word program.  If I copy a graph as bitmap file, then everything is ok, but not look as nice as metafile.  I have tried to use other two tools (CutePDF

[R] help with hclust

2011-09-13 Thread Madeleine Seeland
Hello, how can I get the similarity value (i.e., the inner cluster similarity) that was used to cut a hierarchical tree at a specific height? I would appreciate your help! Best regards, Madeleine __ R-help@r-project.org mailing list

Re: [R] using vif from package car - aliased coefficients in the model

2011-09-13 Thread Dimitri Liakhovitski
John, you were right. After I checked: I had MORE predictors that entered the model than predictors that were left in and that show up in in summary(myreg)$coeff). That means, some of the predictors were kicked out from the results. I have rerun my lm with all the predictors left in and then vif

[R] map

2011-09-13 Thread n.via...@libero.it
Hi!I'm trying to plot the italian map with provincial administration but I don't find the right database and packages to do so.Does anyone help me and tell me how to do???Thanks for your attention [[alternative HTML version deleted]] __

[R] Help in SVM prediction

2011-09-13 Thread Divyam
Hello, I am trying to use SVM from e1071 package for doing binary classification and I am having problems in prediction using SVM. I ran a SVM for X~as.factor(X1)+as.factor(X2)+as.factor(X3),data=data1,cross=10. str(data1) gives me data.frame':5040 obs. of 5 variables: $ X4: int 1 2 3

Re: [R] help with glmm.admb-it worked thanks!

2011-09-13 Thread eeadie
Hi Ben, Your suggestions about the offset worked. Thank you!! Lizzy -- View this message in context: http://r.789695.n4.nabble.com/help-with-glmm-admb-tp3788082p3810141.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread RCulloch
Dear John, Thank you for that, and for explaining why the abline() command wont/dosen't work. The approach is based on reviewers comments that I am a tad sceptical about myself but yet curious enough to test their suggestion..I don't think it is very straightforward to explain; however, it

[R] ESS: Viewing Restored Workspace At Startup

2011-09-13 Thread Rich Shepard
I use ESS and have no problems invoking it when I fire up emacs. When it loads it tells me, [Previously saved workspace restored]. However, I do not know how to view that history of commands so I can continue what I was doing. Since the buffer begins with ESS, what do I do to view that

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread RCulloch
David JC, Excellent point, of course it does - and of course that is (should have been) obvious!!! That is what I get for taking a reviewers comment/suggestion as gospel without applying a bit of thought! I'm off to go and kick myself. Cheers, Ross -- View this message in context:

[R] writing a loop using several list()-objects

2011-09-13 Thread travellina
Hi there, I am looking for some help with a loop which uses three list()-objects: sequence has got numbers, start and end have got the begin/end time points which should be applied to the numbers in sequence. length() of all three objects is identical, length() of vectors stored in sequence is

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread David Winsemius
On Sep 13, 2011, at 9:43 AM, RCulloch wrote: Dear John, Thank you for that, and for explaining why the abline() command wont/ dosen't work. The approach is based on reviewers comments that I am a tad sceptical about myself but yet curious enough to test their suggestion..I don't

Re: [R] Force regression line to a 1:1 relationship

2011-09-13 Thread David Winsemius
On Sep 13, 2011, at 11:44 AM, David Winsemius wrote: On Sep 13, 2011, at 9:43 AM, RCulloch wrote: Dear John, Thank you for that, and for explaining why the abline() command wont/dosen't work. The approach is based on reviewers comments that I am a tad sceptical about myself but yet

Re: [R] help with hclust and cutree

2011-09-13 Thread Mikkel Grum
plot(clust) rect.hclust(clust, h = 0.65) Is that what you wanted? - Original Message - From: Madeleine Seeland madeleine.seel...@in.tum.de To: r-help@r-project.org Cc: Sent: Tuesday, September 13, 2011 9:25 AM Subject: [R] help with hclust and cutree Hello, I would like to cut a

[R] import csv file into R, strange problem

2011-09-13 Thread bonnieyuan
Hi, I used read.csv(file name, header=T, sep=,) to bring in a csv file I saved in MS Excel. The strange thing is all the data ended up in one big column. The number of rows match with the number of observations, but all the variables got squeezed into one column. Also the first row where the

[R] Selecting row indices from a data.frame by a factor and simple calculation (miniumum)

2011-09-13 Thread Rawlins, Barry G.
Hello I wish to extract the row indices from a data.frame in which a column contains numeric data by calculating the minimum value, but grouped on another column factor: An example data.frame: Codeabsdiff NY14/3070 2 NY14/3070 4 NY14/3070 1 NY14/5459

[R] Building R package with precompiled shared library

2011-09-13 Thread Francesco Finazzi
Dear R users, we are trying to build a R package that includes a precompiled shared library, let's say mylib.so. We created the skeleton of the package and we moved the mylib.so file into the libs folder that we created at the same level of the folders man and R. Moreover we created the file

Re: [R] map

2011-09-13 Thread Batur
Adding to the previous question, I would like to map central Asia along with those five countries (Kazakhstan, Kyrgyzstan, Uzbekstan, Tajikstan and Turkmenstan). Please tell us the right data base!!! Thanks a lot!!! -- View this message in context:

[R] space in directory name

2011-09-13 Thread dbonneau
Hi, I am trying to read a text file located in following paths. I am getting error if I try to read from long directory.. But if I place the file right under C, It runs fine. Could anyone tell me how to read table from following directory path ? data1 -read.table(C:\\Documents and Settings

[R] implicit data frame reference

2011-09-13 Thread Benjamin Polidore
If I create an aggregation like this: aggregate(lastYear[,8:10],list(Stadium=lastYear$STAD),mean) I'll get a new data frame, which I can order if I assign it like this: newFrame - aggregate(lastYear[,8:10],list(Stadium=lastYear$STAD),mean) newFrame[order(newFrame$TEMP),] But.. if I just want

[R] x %% y as an alternative to which( x y)

2011-09-13 Thread Timothy Bates
Dear R cognoscenti, While having NA as a native type is nifty, it is annoying when making binary choices. Question: Is there anything bad about writing comparison functions that behavior like %in% (which I love) and ignore NAs? %% - function(table, x) { return(which(table x)) } %% -

Re: [R] Loops on data˜1

2011-09-13 Thread Trying To learn again
Hi Michael, First of all thanks for your response. I do know that if I make my stimation on a single data the regression has no sense but it will be getting sense in the growing next estimations. I change my asking doubt. I want to use this regressions as a first filter. Only this. Can anyone

Re: [R] Deleting Rows based on Factor and Time Period

2011-09-13 Thread Mikkel Grum
The following will get you the first stock in each week. Is that useful? install.packages(surveillance) library(surveillance) alldat$year - isoWeekYear(alldat$mydate)$ISOYear alldat$week - isoWeekYear(alldat$mydate)$ISOWeek alldat - alldat[order(alldat$year, alldat$week), ]

Re: [R] import csv file into R, strange problem

2011-09-13 Thread Greg Snow
It would appear that your file is not a csv file, but we cannot tell for sure without seeing an example of the data that you are reading in, can you cut and paste the first few lines of the file? Or post a link to a copy of the file. If the data is not able to be shared, then create a new

Re: [R] map

2011-09-13 Thread Justin Haynes
i responded offline the first time, but: google is your friend: search for R maps and you'll find what I mention below. In the future make sure to perform a thorough search of google and the help forums before you post That said... you're looking for the maps package install.packages('maps')

Re: [R] x %% y as an alternative to which( x y)

2011-09-13 Thread Duncan Murdoch
On 13/09/2011 12:42 PM, Timothy Bates wrote: Dear R cognoscenti, While having NA as a native type is nifty, it is annoying when making binary choices. Question: Is there anything bad about writing comparison functions that behavior like %in% (which I love) and ignore NAs? %%-

Re: [R] Selecting row indices from a data.frame by a factor and simple calculation (miniumum)

2011-09-13 Thread Mikkel Grum
Code - c(rep(NY14/3070, 3), rep(NY14/5459, 2)) Code - as.factor(Code) absdiff - c(2, 4, 1, 5, 7) df - data.frame(Code, absdiff) which(     paste(df$Code, df$absdiff) ==      paste(         aggregate(df$absdiff, by = list(df$Code), min)$Group.1,         aggregate(df$absdiff, by = list(df$Code),

[R] Min of

2011-09-13 Thread bradford
With the help of Andrie on StackOverflow.com, I was able to learn about ddply. I have another question that is more trivial and cannot seem to find help on IRC and do not want to bother Andrie again. I can't seem to figure out what to google for, so I thought I'd ask here. I have: library(plyr)

Re: [R] space in directory name

2011-09-13 Thread Jean-Christophe BOUËTTÉ
I suggest changing Documents and Settings Administrator to Documents and Settings\\Administrator ... JC 2011/9/13 dbonneau daronnebonn...@gmail.com: Hi, I am trying to read a text file located in following paths. I am getting error if I try to read from long directory..  But if I place the

[R] ZOO: Learning to apply it to my data

2011-09-13 Thread Rich Shepard
I have read ?zoo but am not sure how to relate the parameters (x, order.by, frequency, and style) to my data.frame. The structure of the data.frame is 'data.frame': 11169 obs. of 4 variables: $ stream : Factor w/ 37 levels Burns,CIL,..: 1 1 1 1 1 1 1 1 1 1 ... $ sampdate: Date, format:

[R] Convert RDX and RDB to ASCII format?

2011-09-13 Thread Henri Mone
Dear R users and experts, I need to modify an exisiting R function from a package. The function/ variable is inside a namespace and I have problems accessing it. I only need to get access to to corresponding sourcecode. I localised the RDX and RDB files. But it seems to be a binary format. How

Re: [R] class weights with Random Forest

2011-09-13 Thread Liaw, Andy
The current classwt option in the randomForest package has been there since the beginning, and is different from how the official Fortran code (version 4 and later) implements class weights. It simply account for the class weights in the Gini index calculation when splitting nodes, exactly as

Re: [R] Convert RDX and RDB to ASCII format?

2011-09-13 Thread Jean-Christophe BOUËTTÉ
Hi henri, R is open source, so you should be able to download the source code of the package from CRAN. JC 2011/9/13 Henri Mone henrim...@gmail.com: Dear R users and experts, I need to modify an exisiting R function from a package. The function/ variable is inside a namespace and I have

Re: [R] Selecting row indices from a data.frame by a factor and simple calculation (miniumum)

2011-09-13 Thread David Winsemius
On Sep 13, 2011, at 12:31 PM, Rawlins, Barry G. wrote: Hello I wish to extract the row indices from a data.frame in which a column contains numeric data by calculating the minimum value, but grouped on another column factor: An example data.frame: Codeabsdiff NY14/3070

Re: [R] Convert RDX and RDB to ASCII format?

2011-09-13 Thread Duncan Murdoch
On 13/09/2011 2:28 PM, Henri Mone wrote: Dear R users and experts, I need to modify an exisiting R function from a package. The function/ variable is inside a namespace and I have problems accessing it. I only need to get access to to corresponding sourcecode. I localised the RDX and RDB files.

Re: [R] Min of

2011-09-13 Thread David Winsemius
On Sep 13, 2011, at 1:17 PM, bradford wrote: With the help of Andrie on StackOverflow.com, I was able to learn about ddply. I have another question that is more trivial and cannot seem to find help on IRC and do not want to bother Andrie again. It's doubtful that he would have

Re: [R] space in directory name

2011-09-13 Thread Ben Bolker
Jean-Christophe BOUËTTÉ jcbouette at gmail.com writes: I suggest changing Documents and Settings Administrator to Documents and Settings\\Administrator Please don't cross-post to R-help and Stack Overflow. People in both places will gladly answer well-posed questions, but it turns into

Re: [R] space in directory name

2011-09-13 Thread Henrik Bengtsson
FYI, by using library(R.utils); pathname - C:\\Documents and Settings Administrator\\My Documents\\My Dropbox\\data.txt; pathname - Arguments$getReadablePathname(pathname); data1 - read.table(pathname, sep=\t, header=TRUE); you would get an explanation what is wrong and helps you troubleshoot,

[R] How to calculate the power of Wilcoxon signed rank test

2011-09-13 Thread tn85
Hello All, I perform a Wilcoxon signed rank test for two sets of data to test whether they two have significantly different means. I would also like to know the power of this test. The third part of this tutorial is similar to what I want except the t distribution.

Re: [R] x %% y as an alternative to which( x y)

2011-09-13 Thread Hadley Wickham
Because in coding, I often end up with big chunks looking like this: ((mydataframeName$myvariableName 2 !is.na(mydataframeName$myvariableName)) (mydataframeName$myotherVariableName == male !is.na(mydataframeName$myotherVariableName))) Which is much less

Re: [R] envfit vector labels with ordiplot3d

2011-09-13 Thread Gavin Simpson
On Tue, 2011-09-13 at 05:18 -0700, Briony wrote: It *really* does help to read the documentation for functions. Like most of the functions in vegan that extract information from ordinations, ordilabel() extracts information for axes 1 and 2 only, by default. It also helps if I read the docs

  1   2   >