Re: [R] hierarchical clustering with pearson's coefficient

2013-03-29 Thread Nicole Ford
I am not sure about your question but i did find this: http://research.med.helsinki.fi/corefacilities/proteinchem/hierarchical_clustering_basics.pdf it seems to address all three topics so perhaps the answer is in there?? On Mar 28, 2013, at 6:16 PM, Pierre Antoine DuBoDeNa wrote: > Hello, >

Re: [R] if clause in data frame

2013-03-29 Thread arun
HI, I am not sure I understand it correctly. Should this (m1*x1/m1) +n1*y1/n1) /(m1+n1) be (x1+y1)/(m1+n1)? final<-data.frame()    for (m1 in 4:10) {    for (n1 in 4:10){     for (x1 in 0: m1) {   for (y1 in 0: n1) { final<- rbind(final,c(m1,n1,x1,y1)) colnames(fi

Re: [R] hierarchical clustering with pearson's coefficient

2013-03-29 Thread Pierre Antoine DuBoDeNa
Anyone for that question? 2013/3/28 Pierre Antoine DuBoDeNa > Hello, > > I want to use pearson's correlation as distance between observations and > then use any centroid based linkage distance (ex. Ward's distance) > > When linkage distances are formed as the Lance-Williams recursive > formul

Re: [R] Error message in dredge function (MuMIn package) used with binary GLM

2013-03-29 Thread Kamil Barton
'rank' should be "QAICc". AICc does not have argument 'chat', hence the error. kamil CatCowie wrote > Hi all, > > I'm having trouble with the model generating 'dredge' function in the > MuMIn > 'Multi-model Inference' package. > > Here's the script: > > globalmodel<- glm(TB~lat+protocol+tes

Re: [R] multiple plots and looping assistance requested (single plot)

2013-03-29 Thread Irucka Embry
Hi Arun, thank you very much. That code worked perfectly. Below is the full version of the code with the addition of a legend. Irucka rm(list=ls()) source("read.funkyfile.R") temp = read.funkyfile("seasonalFluxComparisonDataSet.csv", "station_id", header=TRUE, sep="\t") temp1<-lapply(temp,func

Re: [R] multiple plots and looping assistance requested (single plot)

2013-03-29 Thread arun
HI Irucka, Please check this: temp<- structure(list(`:Bostoncitydata` = structure(list(Month = c(1L, 2L, 3L, NA), Data1 = c(1.5, 12.3, 11.4, NA), Data2 = c(9.1342, 12.31, 3.5, NA)), .Names = c("Month", "Data1", "Data2"), class = "data.frame", row.names = c(NA, -4L)), `:Chicagocitydata` = struct

Re: [R] if clause in data frame

2013-03-29 Thread David Winsemius
On Mar 29, 2013, at 1:48 PM, arun wrote: > Yes, that is better. > > I just copied the same function that the OP used. > A.K. > > > From: David Winsemius > To: arun > Cc: Joanna Zhang ; R help > Sent: Friday, March 29, 2013 4:46 PM > Subject: Re: [R] if clau

Re: [R] if clause in data frame

2013-03-29 Thread arun
Yes, that is better. I just copied the same function that the OP used. A.K. From: David Winsemius To: arun Cc: Joanna Zhang ; R help Sent: Friday, March 29, 2013 4:46 PM Subject: Re: [R] if clause in data frame On Mar 29, 2013, at 10:47 AM, arun wrote

Re: [R] if clause in data frame

2013-03-29 Thread David Winsemius
On Mar 29, 2013, at 10:47 AM, arun wrote: > Hi, > > > final<-data.frame() >for (m1 in 4:10) { >for (n1 in 4:10){ >for (x1 in 0: m1) { > for (y1 in 0: n1) { > > final<- rbind(final,c(m1,n1,x1,y1)) > res > final1<-within(final,{flag<-ifelse(x1/m1>y1/n

Re: [R] Installing views in R2.15.3

2013-03-29 Thread David Winsemius
On Mar 29, 2013, at 11:19 AM, Uwe Ligges wrote: > > > On 29.03.2013 19:07, David Winsemius wrote: >> >> On Mar 29, 2013, at 10:40 AM, ugulum...@yahoo.com wrote: >> >>> Hi, >>> >>> Please what am I doing wrong? I tried installing some views (eg >>> MachineLearning, Multivariate) on R2.15.3,

Re: [R] Create values based on a table of conditions

2013-03-29 Thread John Kane
I must be blind but I don' see any link between the two files. RD2 seems to give some kind of encounter data in length of time. allocate gives the time that an animal was wearing a collar ? If each file belongs to a specific animal (am I reading this correctly) what does it matter what the

Re: [R] pairs(X,Y) analog of cor(X,Y)?

2013-03-29 Thread Greg Snow
There is the pairs2 function in the TeachingDemos package that works like cor(x,y) where you give it 2 matricies/data frames and it gives the pairwise plots between the 2 groups. There is currently not a formula interface. On Fri, Mar 29, 2013 at 12:16 PM, Michael Friendly wrote: > With a data

Re: [R] Installing views in R2.15.3

2013-03-29 Thread Achim Zeileis
On Fri, 29 Mar 2013, Uwe Ligges wrote: On 29.03.2013 19:07, David Winsemius wrote: On Mar 29, 2013, at 10:40 AM, ugulum...@yahoo.com wrote: Hi, Please what am I doing wrong? I tried installing some views (eg MachineLearning, Multivariate) on R2.15.3, but it keeps on telling me that the

Re: [R] How do you graph data when you have lots of small values but few extremely large values?

2013-03-29 Thread John Kane
The plotrix package provides a way to insert a break into a y-axis but doing so is not considered really good plotting behaviour. The split axis method actually shows the data but human perception has a hard time handling the split. I'd look at some kind of transformation as a possibility or pe

Re: [R] Installing views in R2.15.3

2013-03-29 Thread Uwe Ligges
On 29.03.2013 19:07, David Winsemius wrote: On Mar 29, 2013, at 10:40 AM, ugulum...@yahoo.com wrote: Hi, Please what am I doing wrong? I tried installing some views (eg MachineLearning, Multivariate) on R2.15.3, but it keeps on telling me that the package is not available for 2.15.3. Is

[R] pairs(X,Y) analog of cor(X,Y)?

2013-03-29 Thread Michael Friendly
With a data frame containing some X & Y variables I can get the between set correlations with cor(X,Y): > cor(NLSY[,1:2], NLSY[3:6]) antisochyperact income educ math 0.043381307 -0.07581733 0.25487753 0.2876875 read -0.003735785 -0.07555683 0.09114299 0.1884101 Is there

Re: [R] Installing views in R2.15.3

2013-03-29 Thread David Winsemius
On Mar 29, 2013, at 10:40 AM, ugulum...@yahoo.com wrote: > Hi, > > Please what am I doing wrong? I tried installing some views (eg > MachineLearning, Multivariate) on R2.15.3, but it keeps on telling me that > the package is not available for 2.15.3. Is it true? > You cannot install TaskVie

[R] FMOLS DOLS and ADL regression

2013-03-29 Thread Chien-Ho Wang
Whether can any R package run Full modified OLS (Phillips and Hansen 1990 ), DOLS (Stock and Watson 1993) and ADL model (Pesaran and Shin 2001) for cointegrated VAR model? I cannot find any useful order in VAR and SVAR package. Thanks. Eric Wang [[alternative HTML version deleted]] _

[R] Installing views in R2.15.3

2013-03-29 Thread ugulum...@yahoo.com
Hi, Please what am I doing wrong? I tried installing some views (eg MachineLearning, Multivariate) on R2.15.3, but it keeps on telling me that the package is not available for 2.15.3. Is it true? Thanks [[alternative HTML version deleted]] __

Re: [R] Make a matrix from two lists

2013-03-29 Thread John Sorkin
Ben, Thank you. When I used print I saw the matrix; the problem was as you indicated that I was using cat. Thanks, John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Green

Re: [R] weird error with a lazyload .RData file in a package

2013-03-29 Thread Michael Friendly
On 3/29/2013 12:05 PM, Uwe Ligges wrote: What could cause this? No idea. Can you make the package source (incl that Rdata file) available? It must have been something in my old session. Starting a fresh one, it went away. -- Michael Friendly Email: friendly AT yorku DOT ca Professor,

Re: [R] Make a matrix from two lists

2013-03-29 Thread Ben Tupper
Hi, On Mar 29, 2013, at 1:29 PM, John Sorkin wrote: > I am trying to write a function that makes a matrix out of two lists. As you > will see run running the function below, the result is NOT a matrix but > rather a list. Can anyone tell me what I am doing wrong? > Thanks, > John > > test <- f

Re: [R] if clause in data frame

2013-03-29 Thread arun
Forgot: colnames(final)<- c("m1","n1","x1","y1") before; final1<-within(final,{flag<-ifelse(x1/m1>y1/n1, 1,0)}) - Original Message - From: arun To: Joanna Zhang Cc: R help Sent: Friday, March 29, 2013 1:47 PM Subject: Re: if clause in data frame Hi, final<-data.frame()    for (m1

Re: [R] if clause in data frame

2013-03-29 Thread arun
Hi, final<-data.frame()    for (m1 in 4:10) {    for (n1 in 4:10){     for (x1 in 0: m1) {   for (y1 in 0: n1) { final<- rbind(final,c(m1,n1,x1,y1)) res  final1<-within(final,{flag<-ifelse(x1/m1>y1/n1, 1,0)})  head(final1) #  m1 n1 x1 y1 flag #1  4  4  0  0    0 #2 

[R] Make a matrix from two lists

2013-03-29 Thread John Sorkin
I am trying to write a function that makes a matrix out of two lists. As you will see run running the function below, the result is NOT a matrix but rather a list. Can anyone tell me what I am doing wrong? Thanks, John test <- function(one,two) { cat("List One=",one,"\n") cat("List Two=",tw

Re: [R] weird error with a lazyload .RData file in a package

2013-03-29 Thread peter dalgaard
On Mar 29, 2013, at 17:22 , Prof Brian Ripley wrote: > On 29/03/2013 14:24, Michael Friendly wrote: >> I added a new data file, NLSY.RData, to a package that uses LazyData: Yes >> It passed R CRAN check and R CMD install worked w/o significant complaints. >> >> * installing to library 'C:/R/R-2.

Re: [R] weird error with a lazyload .RData file in a package

2013-03-29 Thread Prof Brian Ripley
On 29/03/2013 14:24, Michael Friendly wrote: I added a new data file, NLSY.RData, to a package that uses LazyData: Yes It passed R CRAN check and R CMD install worked w/o significant complaints. * installing to library 'C:/R/R-2.15.2/library' * installing *source* package 'heplots' ... ** R ** d

Re: [R] How do you graph data when you have lots of small values but few extremely large values?

2013-03-29 Thread Robert Baer
On 3/29/2013 10:52 AM, Shane Carey wrote: I was thinking of splitting the y-axis into two? Is this possible? Thanks Look at the plotrix package and see: https://stat.ethz.ch/pipermail/r-help/2011-September/290685.html -- Robert W. Baer, Ph.D. Professor of Physiology Kirksille College of Ost

Re: [R] How do you graph data when you have lots of small values but few extremely large values?

2013-03-29 Thread Rich Shepard
On Fri, 29 Mar 2013, Shane Carey wrote: Need to try show it as a bar chart or similar, Will a ln(y) transformation meet your needs? Rich __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] weird error with a lazyload .RData file in a package

2013-03-29 Thread Uwe Ligges
On 29.03.2013 15:24, Michael Friendly wrote: I added a new data file, NLSY.RData, to a package that uses LazyData: Yes It passed R CRAN check and R CMD install worked w/o significant complaints. * installing to library 'C:/R/R-2.15.2/library' * installing *source* package 'heplots' ... ** R **

Re: [R] How do you graph data when you have lots of small values but few extremely large values?

2013-03-29 Thread Rich Shepard
On Fri, 29 Mar 2013, Shane Carey wrote: I was thinking of splitting the y-axis into two? Is this possible? Shane, Does a boxplot show what you want to display? If not, what information do you wish to convey about these data? Rich __ R-help@r-pro

[R] How do you graph data when you have lots of small values but few extremely large values?

2013-03-29 Thread Shane Carey
I was thinking of splitting the y-axis into two? Is this possible? Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

[R] FMOLS DOLS and ADL regression

2013-03-29 Thread Chien-Ho Wang
Whether can any R package run Full modified OLS (Phillips and Hansen 1990 ), DOLS (Stock and Watson 1993) and ADL model (Pesaran and Shin 2001) for cointegrated VAR model? I cannot find any useful order in VAR and SVAR package. Thanks. Eric Wang [[alternative HTML version deleted]] _

[R] Error message in dredge function (MuMIn package) used with binary GLM

2013-03-29 Thread Cat Cowie
Hi all, I'm having trouble with the model generating 'dredge' function in the MuMIn 'Multi-model Inference' package. Here's the script: globalmodel<- glm(TB~lat+protocol+tested+ streams+goats+hay+cattle+deer, family="binomial") chat<- deviance(globalmodel)/59 #There we 59 residual degrees of fre

Re: [R] change font size in R editor

2013-03-29 Thread arun
Hi, Check these links: http://r.789695.n4.nabble.com/Change-font-size-in-Windows-td3518034.html http://r.789695.n4.nabble.com/GUI-font-size-td798626.html A.K. From: Joanna Zhang Sent: Friday, March 29, 2013 10:01 AM Subject: change font size in R editor Hi

[R] gls + summary assumptions

2013-03-29 Thread Robin Caillon
Dear R users,I proceeded to a regression through the gls fonction (package nlme) with the following code: >a1=read.table("total25.txt",header=TRUE)>a1$T=factor(a1$T)>m2=gls(Res~ModeF*T,a1)>m2>summary(m2) I used gls fonction because it deals with heteroskedasticity and I would like you to confirm

[R] Create values based on a table of conditions

2013-03-29 Thread Cat Cowie
Hi R help forum, I have a simple data frame of four columns - one of numbers (really a categorical variable), one of dates and one of data. I have over 500,000 data points to work with, spread over 40 files, each named after a different animal. These are contact data recorded by proximity logger

Re: [R] Help partimat()

2013-03-29 Thread Uwe Ligges
On 29.03.2013 15:59, Antelmo Aguilar wrote: Hello David, Thank you for letting me know that the partimat() function calls that function. I am kind of knew to R so I do not know exactly how to describe the structure. If I understand correctly, what I essentially need to do is pass in all th

Re: [R] Help partimat()

2013-03-29 Thread Antelmo Aguilar
Hello David, Thank you for letting me know that the partimat() function calls that function. I am kind of knew to R so I do not know exactly how to describe the structure. If I understand correctly, what I essentially need to do is pass in all the different data sets into one partimat() funct

[R] weird error with a lazyload .RData file in a package

2013-03-29 Thread Michael Friendly
I added a new data file, NLSY.RData, to a package that uses LazyData: Yes It passed R CRAN check and R CMD install worked w/o significant complaints. * installing to library 'C:/R/R-2.15.2/library' * installing *source* package 'heplots' ... ** R ** data ** moving datasets to lazyload DB ** demo

Re: [R] changing y-axis intervals in a boxplot

2013-03-29 Thread David L Carlson
This can also be done without the axis() function: > par(las=1, mfrow=c(2,1)) > boxplot(count ~ spray, data = InsectSprays, yaxp=c(0, 25, 10), cex.axis=0.6, col = "lightgray") > boxplot(count ~ spray, data = InsectSprays, yaxp=c(0, 25, 25), cex.axis=0.6, col = "lightgray")

Re: [R] 0e+00

2013-03-29 Thread Shane Carey
Yup, that worked, cheers for that John On Fri, Mar 29, 2013 at 12:09 PM, John Kane wrote: > Does this help? > > http://stackoverflow.com/questions/5963047/do-not-want-scientific-notation-on-plot-axis > > John Kane > Kingston ON Canada > > > > -Original Message- > > From: careys...@gmail

Re: [R] Conditional CCA and Monte Carlo - Help!

2013-03-29 Thread MWilson
Thank you so much for your response! This clarifies the issue I was having. Cheers, Matt On Fri, Mar 29, 2013 at 2:43 AM, Jari Oksanen [via R] < ml-node+s789695n4662809...@n4.nabble.com> wrote: > MWilson bucknell.edu> writes: > > > > > Hi All, > > I am using canonical correspondence analysis to

Re: [R] problem with plots with short example.

2013-03-29 Thread Nicole Ford
yes I was also having something like this happen to me just before everything blew up. i never set a working directory, but use file.choose() or call the path directly. but the last few hours before it failed, it kept running older datasets, when i clearly called the new data set, for example,

Re: [R] 0e+00

2013-03-29 Thread John Kane
Does this help? http://stackoverflow.com/questions/5963047/do-not-want-scientific-notation-on-plot-axis John Kane Kingston ON Canada > -Original Message- > From: careys...@gmail.com > Sent: Fri, 29 Mar 2013 10:44:16 + > To: r-help@r-project.org > Subject: [R] 0e+00 > > Hi, > > Rath

Re: [R] changing y-axis intervals in a boxplot

2013-03-29 Thread Berg, Tobias van den
Thank you all, Guess you'll learn everyday new stuff, especially in R. Tobias -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Pascal Oettli Verzonden: vrijdag 29 maart 2013 12:33 CC: 'r-help@r-project.org' Onderwerp: Re: [R] changi

Re: [R] changing y-axis intervals in a boxplot

2013-03-29 Thread Pascal Oettli
Every week, I learn something new with R-help. Pascal On 29/03/13 20:23, Jim Lemon wrote: And if you would like to be able to read the crowded axis: boxplot(count ~ spray, data = InsectSprays, col = "lightgray", yaxt='n') library(plotrix) staxlab(2, at=seq(0,25,1),cex=0.8) Jim On 03/29/201

Re: [R] changing y-axis intervals in a boxplot

2013-03-29 Thread Rui Barradas
Hello, You can use axis(side=2, at=c(10, 30, 50, 70, 90)) or axis(side=2, at=seq(10, 90, by = 20)) Hope this helps, Rui Barradas Em 29-03-2013 09:22, Berg, Tobias van den escreveu: Thank you Pascal but unfortunelately i still didn't figure out how to change the numbers presented at the y-

Re: [R] changing y-axis intervals in a boxplot

2013-03-29 Thread Jim Lemon
And if you would like to be able to read the crowded axis: boxplot(count ~ spray, data = InsectSprays, col = "lightgray", yaxt='n') library(plotrix) staxlab(2, at=seq(0,25,1),cex=0.8) Jim On 03/29/2013 08:36 PM, Pascal Oettli wrote: Hi, Example adapted from ?boxplot par(las=1, mfrow=c(2,1))

Re: [R] 0e+00

2013-03-29 Thread Shane Carey
Good one!!! :-) Im plotting a Cumulative Frequency curve, see graph attached (just using normal basic plot command), but the values come out 4e+05 etc and I dont know how to produce the number without scientific notation? Thanks On Fri, Mar 29, 2013 at 10:58 AM, R. Michael Weylandt < michael.wey

Re: [R] Odd graphic device behavior

2013-03-29 Thread Thomas Adams
Thank you Peter, that sounds pretty reasonable. Best, Tom On Friday, March 29, 2013, peter dalgaard wrote: > > On Mar 28, 2013, at 22:27 , Thomas Adams wrote: > > > All, > > > > Well to my relief and embarrassment, I discovered my problem. About 5 > weeks > > ago, I shutdown my computer and move

Re: [R] 0e+00

2013-03-29 Thread R. Michael Weylandt
On Fri, Mar 29, 2013 at 10:44 AM, Shane Carey wrote: > Hi, > > Rather than a graph label to display labels as 0e+00, how do I get it to > display the real value? Hi Shane, Is 0e+00 not a real value? I'd assume it's roughly equal to zero... ;-) More seriously, could we have a reproducible exampl

[R] 0e+00

2013-03-29 Thread Shane Carey
Hi, Rather than a graph label to display labels as 0e+00, how do I get it to display the real value? Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

Re: [R] problem with data

2013-03-29 Thread catalin roibu
hello all! I solve the problem! Sorry for disturbing! Best regards, CR On 29 March 2013 11:28, catalin roibu wrote: > Hello all! > I have a problem with my data in R. When I want to plot the following > data, I have a problem with y scale. The maximum value is cc. 10 degrees > and in R is abou

Re: [R] changing y-axis intervals in a boxplot

2013-03-29 Thread Pascal Oettli
Hi, Example adapted from ?boxplot par(las=1, mfrow=c(2,1)) boxplot(count ~ spray, data = InsectSprays, col = "lightgray", yaxt='n') axis(2, at=seq(0,25,2.5)) boxplot(count ~ spray, data = InsectSprays, col = "lightgray", yaxt='n') axis(2, at=seq(0,25,1)) HTH, Pascal On 29/03/13 18:22, Berg, T

[R] problem with data

2013-03-29 Thread catalin roibu
Hello all! I have a problem with my data in R. When I want to plot the following data, I have a problem with y scale. The maximum value is cc. 10 degrees and in R is about 100. I use this code: fasy<-read.table("gridd1.txt",sep="\t",dec=",",header=T,row.names=1) # here are the years: x <- as.numeri

Re: [R] changing y-axis intervals in a boxplot

2013-03-29 Thread Berg, Tobias van den
Thank you Pascal but unfortunelately i still didn't figure out how to change the numbers presented at the y-axis. I looked up your suggestions but if I'm right, yaxt can set if the axis is presented (yaxt="s") or suppressed (yaxt="n") which does not help for changing the values on the y-axis.

Re: [R] Need to read an Excel File

2013-03-29 Thread Shane Carey
I use XlsReadWrite package, its good. On Fri, Mar 29, 2013 at 9:00 AM, Jim Holtman wrote: > I have found that the easiest way to read/write Excel files is to use the > XLConnect package. > > Sent from my iPad > > On Mar 28, 2013, at 15:54, Henry Njovu wrote: > > > To be able to import excel-fi

Re: [R] Need to read an Excel File

2013-03-29 Thread Jim Holtman
I have found that the easiest way to read/write Excel files is to use the XLConnect package. Sent from my iPad On Mar 28, 2013, at 15:54, Henry Njovu wrote: > To be able to import excel-files into R you also need to download Perl from > http://www.perl.org/. From this link you will have to dow

Re: [R] Odd graphic device behavior

2013-03-29 Thread peter dalgaard
On Mar 28, 2013, at 22:27 , Thomas Adams wrote: > All, > > Well to my relief and embarrassment, I discovered my problem. About 5 weeks > ago, I shutdown my computer and moved it. When I reconnected everything I > apparently plugged my HDMI monitor into the 'wrong' output port without > realizing

Re: [R] changing y-axis intervals in a boxplot

2013-03-29 Thread Pascal Oettli
Hello, ?par (particularly the 'yaxt' argument) ?axis ('side' and 'at' arguments) Hope this help, Pascal On 29/03/13 16:37, Berg, Tobias van den wrote: Dear R-users, I'm a bit of a rooky in R and do not know how to change the y-axis intervals of a boxplot. The y-axis in my boxplot ranges f

[R] changing y-axis intervals in a boxplot

2013-03-29 Thread Berg, Tobias van den
Dear R-users, I'm a bit of a rooky in R and do not know how to change the y-axis intervals of a boxplot. The y-axis in my boxplot ranges from 0 to 100 which is fine. The problem is the interval level in between. Now it increases with steps of 20 but I'd like to have it changed by steps of 5.