Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-19 Thread ottorino
Il giorno mar, 19/10/2010 alle 11.12 -0700, Dieter Menne ha scritto: Thanks Dieter for your help, but unfortunately your suggestion results only in changing the color of the *lines* and not the color of the *area* of the polygon. I also tried to call "col" from within the panel.superpose xyplot(

Re: [R] is get() really what I want here?

2010-10-19 Thread Joshua Wiley
On Tue, Oct 19, 2010 at 10:58 PM, Daniel Weitzenfeld wrote: > Hi Josh, > What I'm really trying to do is to refer to objects whose names I have > stored in a vector.  This example was arbitrary. > I do a lot of looping through files in the working directory, or through > objects in the namespace,

Re: [R] is get() really what I want here?

2010-10-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 20.10.2010 07:58:29: > Hi Josh, > What I'm really trying to do is to refer to objects whose names I have > stored in a vector. This example was arbitrary. > I do a lot of looping through files in the working directory, or through > objects in the namesp

[R] Generate variable with Bivariate Normal Distribution

2010-10-19 Thread สถาบันวิจัยและพัฒนา มหาวิทยาลัยราชภัฏอุบลร าชธานี
Dear All I want to generate variable with Bivariate Normal Distribution by use mean1 = a, variance1 = b, mean2 = c, variance2 = d, rho = e. How I can do this. Many Thanks. IRD [[alternative HTML version deleted]] ___

Re: [R] is get() really what I want here?

2010-10-19 Thread Daniel Weitzenfeld
Hi Josh, What I'm really trying to do is to refer to objects whose names I have stored in a vector. This example was arbitrary. I do a lot of looping through files in the working directory, or through objects in the namespace, and I'm confused about how best to call upon them from within a loop. T

[R] Adding Legend about two quantile lines at ggplot

2010-10-19 Thread YN Kim
Hi, all. I'd like to add legend on my graph but I can't. My code is follows. library(ggplot2) score1<-rnorm(100,0,5) score2<-rnorm(400,10,15) mydata<-data.frame(score1,score2) ggplot(mydata,aes(y=score2,x=score1))+geom_point()+stat_quantile(quantiles=c(0.50),col="red")+stat_quantile(quantiles=c(0

Re: [R] is get() really what I want here?

2010-10-19 Thread Joshua Wiley
Hi Daniel, get() will work for any object, but cat() may not. cat() should work for arrays, but it will be messy even for relatively small ones. For example, run: cat("Hello", array(1:100, dim = c(10, 10)), sep = " ") What are you really trying to do? If you are just trying to figure out what

[R] is get() really what I want here?

2010-10-19 Thread Daniel Weitzenfeld
# Let's say I have 5 objects, object_1, object_2, etc. for (i in 1:5) { assign(paste("object_",i, sep=""), i+500) } # Now, for whatever reason, I don't know the names of the objects I've created, but I want to operate on them. list<-ls(pattern="^obj") #Is get best? for (l in list) { cat("

Re: [R] glm with linear restrictions

2010-10-19 Thread Bill.Venables
If b1+b2+b3 = 0 can't you put b3 = -b1-b2 and re-write the model in terms of b1 and b2 alone? The model is stil (g)linear. If the parameters to which you refer corresponds to the levels of a factor, then you can use the contr.sum contrast matrices. It essentailly does the above. -Origin

[R] question on optim() fn.

2010-10-19 Thread sharkoil
i am trying to use optim() fn in R to estimate mle of my pdf. even though I am able to get the results, but there are always warning message, which says that NaN produced. I am not very sure if I should ignore these warning message since I have got solution without error message. I am wondering

Re: [R] plot CI and mortality rate

2010-10-19 Thread Dennis Murphy
Hi: Following up on Ben's suggestion re ggplot2, here's a manufactured example: # Fake data: mortrate <- round(runif(100), 3) dd <- data.frame(rate = mortrate, moe = 1.96 * sqrt(mortrate * (1 - mortrate))/10, hosp = factor(paste('H', 1:100, sep = ''))) dim(dd) [1] 100 3 # Set

[R] glm with linear restrictions

2010-10-19 Thread mege
I'm looking for a function or package to estimate a glm with linear restrictions (e.g. the sum of some parameters needs to be zero). I found the function orlm in the package ic.infer which works for lm models, but I need it for glm. Thanks, Markus __

[R] Accessing table elements and escape characters

2010-10-19 Thread sachinthaka . abeywardana
Hi All, Are there any escape characters that I should be aware of when using table.read? I don't have any '#' characters in this table. I get the error: A<-read.table("P:/temp.csv",header=TRUE, sep=","); Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 11018 d

Re: [R] scatter.smooth() fitted by loess

2010-10-19 Thread Dennis Murphy
Hi: I agree with Ista's point that you shouldn't be doing loess with these data (x and y both need to be continuous for loess, but your x is discrete), but you shouldn't be computing boxplots at each YMRS_Sum value either because you don't have enough resid observations at Sum = 3 and 4. A combina

Re: [R] sampling from normal

2010-10-19 Thread Wu Gong
Hi Solafah, You are right that two commands are equivalent when p= pnorm(a). You can check the results by following codes. n <- 5 a <- -1 set.seed(123456) qnorm(runif(n,0,pnorm(a))) p <- pnorm(a) set.seed(123456) qnorm(p*runif(n)) Anyway, the elements of the lower tail are not chosen equally by

Re: [R] plot CI and mortality rate

2010-10-19 Thread Ben Bolker
XINLI LI gmail.com> writes: > > Dear R Users: > >I have the individual mortality rate and 95% CI of 100 hospitals, > how to do the plot with the individual hospital in the Yaxis, and the > mortality rate and 95% CI in the Xais and a overall mean as a reference > line? Something lik

[R] is there a way to update both packages if they occur in 2 libraries?

2010-10-19 Thread Chris Howden
Hi everyone, I’ve recently added a private library as a way to manage my R libraries. And I did this by simply copying my old library to a new folder and then linking this to R by setting my R_LIBS environmental variable in .Renviron. However I have run into a problem. When I update my pa

Re: [R] remove unused variable and data

2010-10-19 Thread Henrique Dallazuanna
Try this: rm(list = setdiff(ls(), 'poprho.3')) On Tue, Oct 19, 2010 at 11:29 PM, Jumlong Vongprasert < jumlong.u...@gmail.com> wrote: > Dear All >I have this > > ls() > [1] "IWJR.complete""IWJR.missing" "IWJR.reg.temp" > [4] "IWJR.reg.temp.x" "IWJR.reg.temp.y" "I

[R] remove unused variable and data

2010-10-19 Thread Jumlong Vongprasert
Dear All I have this > ls() [1] "IWJR.complete""IWJR.missing" "IWJR.reg.temp" [4] "IWJR.reg.temp.x" "IWJR.reg.temp.y" "IWJR.temp" [7] "Power.record.100.3.5" "col.delete" "correlation.100.3.5" [10] "i""index.temp" "iterate" [

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-19 Thread Dennis Murphy
Hi: This is how you could do the same in ggplot2; geom_ribbon() does the shading. For your example, it seemed reasonable to put in reference lines, especially since the upper limits of one confidence band abutted the lower limits of the other in group a, so I averaged the upper and lower limits to

Re: [R] Clustering with ordinal data

2010-10-19 Thread Michael Bedward
Hello Steve, > I've been asked to help evaluate a vegetation data set, specifically to > examine it for community similarity. The initial problem I see is that the > data is ordinal.   At best this only captures a relative ranking of > abundance and ordinal ranks are assigned after data collection

[R] plot CI and mortality rate

2010-10-19 Thread XINLI LI
Dear R Users: I have the individual mortality rate and 95% CI of 100 hospitals, how to do the plot with the individual hospital in the Yaxis, and the mortality rate and 95% CI in the Xais and a overall mean as a reference line? Thanks and regards, Xin [[alternative HTML version

[R] sampling from normal

2010-10-19 Thread solafah bh
Hello If i want to resample from the lower tail of normal distribution , are these commands equivelant??  lower tail :qnorm(runif(n,0,pnorm(a))) if a is a lower tail bound or  lower tail:qnorm(p*runif(n)) if p is the probability of each interval(the observations are divided to intervals)   Regard

Re: [R] DLL not found

2010-10-19 Thread Remko Duursma
Ok so it works when I delete it from the first library (and not the second). I misunderstood... thanks! Remko Hi Duncan, this is it: > .libPaths() [1] "c:\\remko\\rstuff\\library" "C:/PROGRA~1/R/R-212~1.0/library" and you are right, I do have lattice installed in the latter I de

Re: [R] DLL not found

2010-10-19 Thread Remko Duursma
Hi Duncan, this is it: > .libPaths() [1] "c:\\remko\\rstuff\\library" "C:/PROGRA~1/R/R-212~1.0/library" and you are right, I do have lattice installed in the latter I deleted it from the second library, but it still gives me the same error message. Remko --

Re: [R] DLL not found

2010-10-19 Thread Duncan Murdoch
On 19/10/2010 6:50 PM, Remko Duursma wrote: Dear R-helpers, I have a fresh installation of windows vista, and R 2.12.0 (session info below). I have seen a similar error reported when someone had a copy of lattice in a library that came ahead of the system one. What does .libPaths() show you

[R] DLL not found

2010-10-19 Thread Remko Duursma
Dear R-helpers, I have a fresh installation of windows vista, and R 2.12.0 (session info below). Problem: > require(sp) Loading required package: sp Error in library.dynam(lib, package, package.lib) : DLL 'lattice' not found: maybe not installed for this architecture? > require(lattice) Loadi

[R] Fix for xlsReadWrite 1.5.2 running in R2.12.0 (32-bit) on a Win7 64-bit platform

2010-10-19 Thread Hans-Peter Suter
Argh, just now I saw a scrambled start-up message when running xlsReadWrite1.5.2 in R2.12.0 (32-bit) on a Win7 64-bit platform. If you have this situation and use xlsReadWrite 1.5.2 (probably all earlier versions also) you can download a quick fix, see below. I don't know if this also affects Vista

[R] RWeka - Error in model.frame.default - evaluate_Weka_classifier

2010-10-19 Thread Andreas Jansson
Hi, First of all, I'm a complete rookie to R (~2 weeks). But anyway, I'm trying to use the RWeka interface for C4.5 (J48) classification. As a proof of concept I'm using the Iris data set to create a training set of 30 instances (10 per species) and use the remaining 120 instances as my test set.

Re: [R] comparing two data files

2010-10-19 Thread Mike Marchywka
> From: nicol...@buffalo.edu > Date: Tue, 19 Oct 2010 18:23:27 -0400 > To: r-help@r-project.org > Subject: [R] comparing two data files > > I have 2 large data files that I need to compare and find the differences > between data file x and data file y in o

Re: [R] Gini Coefficient

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 4:24 PM, Peter Francis wrote: Dear List, I am unsure if this is specifically a R question or a stats question? I thought i would ask here and if i get no replies it will answer that! I am trying to calculate Gini coefficients in R, based on a slight modification of

Re: [R] comparing two data files

2010-10-19 Thread Henrique Dallazuanna
Here is some ways: all.equal(readLines(file1), readLines(file2)) You could try compare md5sum of the files: library(tools) identical(md5sum(file1), md5sum(file2)) On Tue, Oct 19, 2010 at 8:23 PM, Nicole Brandt wrote: > I have 2 large data files that I need to compare and find the differences

[R] comparing two data files

2010-10-19 Thread Nicole Brandt
I have 2 large data files that I need to compare and find the differences between data file x and data file y in order to correct data entry error. Theoretically both data files should be identical. I am trying to figure out a way to do this in R. Any help would be great! ___

Re: [R] scatter.smooth() fitted by loess

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 5:43 PM, phoebe kong wrote: Hi there, I would like to draw a scatter plot and fit a smooth line by loess. Below is the data. However, the curve line started from 0, which my "resid" list doesn't consist of 0 value. It returned some warnings which I don't know if this is the

Re: [R] scatter.smooth() fitted by loess

2010-10-19 Thread Ista Zahn
The fundamental problem is that you only have five distinct x values. lowess cannot work in this situation. Try side-by-side boxplots: boxplot(resid.value ~ YMRS_Sum) -Ista On Tue, Oct 19, 2010 at 5:43 PM, phoebe kong wrote: > Hi there, > > I would like to draw a scatter plot and fit a smooth l

[R] Gini Coefficient

2010-10-19 Thread Peter Francis
Dear List, I am unsure if this is specifically a R question or a stats question? I thought i would ask here and if i get no replies it will answer that! I am trying to calculate Gini coefficients in R, based on a slight modification of the typical equation that i have seen in a paper. Past

[R] scatter.smooth() fitted by loess

2010-10-19 Thread phoebe kong
Hi there, I would like to draw a scatter plot and fit a smooth line by loess. Below is the data. However, the curve line started from 0, which my "resid" list doesn't consist of 0 value. It returned some warnings which I don't know if this is the reason affecting such problem. Here I also attached

Re: [R] How to write to sqlite files

2010-10-19 Thread Steven McKinney
You will need to install the RSQLite package, see e.g. http://cran.r-project.org/web/packages/RSQLite/index.html Review the installation instructions there for the setup appropriate for your situation. Review the pdf manual there for examples of command sequences involved with connecting to the

Re: [R] Tif image to 8bit colour matrix.

2010-10-19 Thread Greg Snow
Look at the EBImage package from bioconductor. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Roger Gill > S

Re: [R] points( .... pch=2) substitue pch with image

2010-10-19 Thread Greg Snow
Look at my.symbols and ms.image in the TeachingDemos package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of

Re: [R] R 2.12.0 and JGR

2010-10-19 Thread Prof Brian Ripley
JRI/rJava/JGR have their own mailing lists, and it would be better to ask there. But there was a rJava update this morning, and it is consequently little tested. (I know for example that 64-bit JRI will need furtehr work.) It may be that other things also need an update (like the JGR stub).

[R] R 2.12.0 and JGR

2010-10-19 Thread Rob Baer
Since upgrading to 2.12.0, I'm having trouble getting the JGR to start under Windows 7, but I'm not quite sure what's happening. When I try to run the JGR.exe stub, the dialog says can't find Java R interface jri.dll. As nearly as I can tell from a Google search this is to be a part of the r

Re: [R] How to read only ten rows from a SAS dataset (read.ssd)?

2010-10-19 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Phil Spector > Sent: Tuesday, October 19, 2010 10:49 AM > To: David Winsemius > Cc: r-help@r-project.org; johannes rara > Subject: Re: [R] How to read only ten rows from a SAS data

[R] How to write to sqlite files

2010-10-19 Thread lord12
In R, I know how to write ti csv files. However, how do I write to database files? -- View this message in context: http://r.789695.n4.nabble.com/How-to-write-to-sqlite-files-tp3002586p3002586.html Sent from the R help mailing list archive at Nabble.com. ___

[R] could not find function "hmatplot"

2010-10-19 Thread Grzesiek
I need a picture like this: http://rwiki.sciviews.org/doku.php?id=graph_gallery:graph38 http://rwiki.sciviews.org/doku.php?id=graph_gallery:graph38 but when I try compile it require("hexbin") data(NHANES)# pretty large data set! good <- !(is.na(NHANES$Albumin) | is.na(NHANES$Transferin)) NH.var

Re: [R] Clustering with ordinal data

2010-10-19 Thread Steve_Friedman
Thanks Phil, I'll do so now. Much appreciated. Steve Steve Friedman Ph. D. Spatial Statistical Analyst Everglades and Dry Tortugas National Park 950 N Krome Ave (3rd Floor) Homestead, Florida 33034 steve_fried...@nps.gov Office (305) 224 - 4282 Fax (305) 224 - 4147

Re: [R] Chron object in time series plot

2010-10-19 Thread Manta
Thanks Phil, it is exactly what I was looking for. David, I took into account how to make valid math operations, so I understand your concern about it. I will definitely change all my scripts and functions to considered the time as character, but as I need a clear output soon (deadline is close)

Re: [R] Problems with a specific calculate.

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 6:38 AM, Toni López Mayol wrote: Hello friends of R, My name is Toni, i'm 25 and I'm working on the Meteorological Investigation team from Balearic Islands. I had contact to you because I have a problem: I done a file for every day since 1912 about precipitation. That

Re: [R] Clustering with ordinal data

2010-10-19 Thread Phil Spector
Steve - Take a look at daisy() in the cluster package. - Phil Spector Statistical Computing Facility Department of Statistics UC Be

[R] Clustering with ordinal data

2010-10-19 Thread Steve_Friedman
Hello I've been asked to help evaluate a vegetation data set, specifically to examine it for community similarity. The initial problem I see is that the data is ordinal. At best this only captures a relative ranking of abundance and ordinal ranks are assigned after data collection.I've been

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-19 Thread Dieter Menne
Ottorino-Luca Pantani wrote: > > The areas I would like to have in gray, are confidence bands > > This link is my starting point > http://tolstoy.newcastle.edu.au/R/e2/help/07/04/15595.html > > Thanks for the code example and for all the work you already put into it! I think this is an over

[R] R script help needed for RFC 2104 HMAC algorithm

2010-10-19 Thread Larry D'Agostino
I'm trying to create an R script that will execute the HMAC algorithm for key-hashing messages. My hope is to use this script for some web authentication via R. The algorithm is found at http://www.ietf.org/rfc/rfc2104.txt Here is some example code that I have done that does not work for HMAC-MD

Re: [R] Chron object in time series plot

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 1:30 PM, Phil Spector wrote: The following will create a POSIXlt object using the current date: strptime(sprintf('%06d',breaks),'%H%M%S') [1] "2010-10-19 07:00:00" "2010-10-19 07:15:00" "2010-10-19 07:30:00" [4] "2010-10-19 07:45:00" "2010-10-19 08:00:00" "2010-10-19 08:1

Re: [R] How to read only ten rows from a SAS dataset (read.ssd)?

2010-10-19 Thread Phil Spector
I've verified that David's solution will work, but a) since if is a reserved word, you must use the full name of the argument, namely ifs b) the argument passed through ifs= should be a full subsetting if statement. So adding ifs='if _n_ <= 10' to your sas.get call will retur

Re: [R] How to read only ten rows from a SAS dataset (read.ssd)?

2010-10-19 Thread johannes rara
I have previously tried to use Hmisc's sas.get function, but I have had problems with it. I think I go with your last suggestion. -J 2010/10/19 David Winsemius : > > On Oct 19, 2010, at 1:31 PM, johannes rara wrote: > >> Thanks David, >> >> Yes, my code really works (using the foreign package), b

Re: [R] could not find function "hmatplot"

2010-10-19 Thread Dieter Menne
Grzesiek wrote: > > I need a picture like this: > http://rwiki.sciviews.org/doku.php?id=graph_gallery:graph38 > http://rwiki.sciviews.org/doku.php?id=graph_gallery:graph38 > > .. follows code from the web site > > I get an error: > Error: could not find function "hmatplot" > > What is wron

Re: [R] How to read only ten rows from a SAS dataset (read.ssd)?

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 1:31 PM, johannes rara wrote: Thanks David, Yes, my code really works (using the foreign package), but when handling a SAS file which contains > 500 000 rows and > 100 cols it is not really fun anymore. My intention was do some preliminary research from the data and the who

Re: [R] Sample in R

2010-10-19 Thread Darin A. England
No. > ?sample to see what sample() does. On Tue, Oct 19, 2010 at 02:59:05AM -0700, emj83 wrote: > > Hi, > > Please can someone tell me if using sample() in R is actually a quick way of > doing the Inverse Transform Sampling Method? > > Many thanks Emma > -- > View this message in context

Re: [R] How to read only ten rows from a SAS dataset (read.ssd)?

2010-10-19 Thread johannes rara
Thanks David, Yes, my code really works (using the foreign package), but when handling a SAS file which contains > 500 000 rows and > 100 cols it is not really fun anymore. My intention was do some preliminary research from the data and the whole dataset was not needed. After all, I could not fin

Re: [R] Chron object in time series plot

2010-10-19 Thread Phil Spector
The following will create a POSIXlt object using the current date: strptime(sprintf('%06d',breaks),'%H%M%S') [1] "2010-10-19 07:00:00" "2010-10-19 07:15:00" "2010-10-19 07:30:00" [4] "2010-10-19 07:45:00" "2010-10-19 08:00:00" "2010-10-19 08:15:00" [7] "2010-10-19 08:30:00" "2010-10-19 08:45

Re: [R] Chron object in time series plot

2010-10-19 Thread Manta
I do not think that importing the time as character will help me, as I need to perform several operation with them. Again, maybe I am not able to express clearly enough. Let's just focus on this series: > breaks [1] 7 71500 73000 74500 8 81500 83000 84500 9 91500 93000 94

Re: [R] head.matrix() unintelligent

2010-10-19 Thread Patrick Burns
You want the 'corner' function. It isn't (yet) in an R package but you can find it to 'source' it in near the bottom of the 'Public Domain Code' page of www.burns-stat.com Your case is precisely the reason that 'corner' came into being. On 19/10/2010 17:10, brbell01 wrote: Hi Just a simple qu

Re: [R] separate elements of a character vector

2010-10-19 Thread Thomas Stewart
You may want to try something like this: x1<-rnorm(500) plot(x1) test<-seq(1987, 2002, by=1) test_2<-seq(2003, 2006, by=1) test<-format(c(test, test_2), width=5) xxx<-seq(1,500,length=length(test)) axis(1,at=xxx,labels=test,line=1,col=0) You'll need to specify where you want the labels (in this c

Re: [R] separate elements of a character vector

2010-10-19 Thread Joshua Wiley
Dear Simon, I think the main issue is that mtext() is designed to work with a single character string, not a character vector. Here is one approach collapsing using paste with some space: x1<-rnorm(500) plot(x1) test<-seq(1987, 2002, by=1) test_2<-seq(2003, 2006, by=1) mtext(paste(c(test, test_2

Re: [R] nls & optimize

2010-10-19 Thread Thomas Stewart
Let f be your estimated function. Suppose we have a root function, say root(). You are looking for b = root(f-a) where a is some constant. Now suppose we consider the inverse of f, call it f.inv. Then the following holds: a = root(f.inv-b). In your code, you find b = root(f-a) and c = ro

[R] separate elements of a character vector

2010-10-19 Thread Simon Kiss
Dear colleagues, this seems like an easy problem, and I found some suggestions which I've incorporated in the help list, but I can't quite get it right. I want to add a series of years to a second x-axis category label. I generate them with test and test_2 below, format them with some spacing (

Re: [R] Chron object in time series plot

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 12:19 PM, Manta wrote: David Winsemius wrote: You seen to be under the mistaken impression that the internal representation of DateTime classes of 08:00 would be 8. Since the internal representation of time is in seconds, the even number hours would be at integer mu

Re: [R] head.matrix() unintelligent

2010-10-19 Thread Duncan Murdoch
On 19/10/2010 12:10 PM, brbell01 wrote: Hi Just a simple question really. I´ve got these large 2d matrices that I´d like to inspect, but not from start to finish. The head() command is convenient when columns are few. For large nxn matrices, however, head() and head.matrix() are still cumbersom

[R] De: information

2010-10-19 Thread saidi helmi
Dear all, My name is Saidi Helmi and I'm a PhD student at Sassari University (Italy). I want to ask if there is any package for the estimation of the parameters of "Two Component Extreme Value"(TCEV) distribution. Thank you, best regards, Saidi Helmi [[alternative HTML version deleted]

[R] head.matrix() unintelligent

2010-10-19 Thread brbell01
Hi Just a simple question really. I´ve got these large 2d matrices that I´d like to inspect, but not from start to finish. The head() command is convenient when columns are few. For large nxn matrices, however, head() and head.matrix() are still cumbersome. Is there a simple way of viewing both

[R] superpose.polygon, panel.polygon and their colors

2010-10-19 Thread ottorino
Dear R-helpers, the problem I'm facing today is to convince lattice to paint some areas in gray. The areas I would like to have in gray, are confidence bands I've googled around in the mailing list archives and eventually find some clues. This link is my starting point http://tolstoy.newcastle.ed

Re: [R] Chron object in time series plot

2010-10-19 Thread Manta
David Winsemius wrote: > > > You seen to be under the mistaken impression that the internal > representation of DateTime classes of 08:00 would be 8. Since the > internal representation of time is in seconds, the even number hours > would be at integer multiples of 60*60. In addition

Re: [R] Chron object in time series plot

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 11:25 AM, Manta wrote: Dear R users, I have the following script to create bins of specified time intervals bin_end=60/bin_size bin_size=bin_size*100 h=seq(07,18,by=1) breaks=c() for (i in h) { for (j in 0:(bin_end-1)) {

Re: [R] Incorrect positioning of raster images on Windows

2010-10-19 Thread Sharpie
Paul Murrell-2 wrote: > > Hi > > This is a rounding (truncation) problem. > Working on a fix. > > Paul > > Sharpie wrote: >> >> Michael Sumner-2 wrote: >>> I think there's something about the "discrete cell" versus "centre >>> value" >>> interpretation here, and you are pushing the "pixels"

[R] Chron object in time series plot

2010-10-19 Thread Manta
Dear R users, I have the following script to create bins of specified time intervals bin_end=60/bin_size bin_size=bin_size*100 h=seq(07,18,by=1) breaks=c() for (i in h) { for (j in 0:(bin_end-1)) { value=i+(bin_size)*j b

Re: [R] using optimize with two unknowns, e.g. to parameterize a distribution with given confidence interval

2010-10-19 Thread Ravi Varadhan
You cannot use `optimize' when there are two or more parameters to be optimized. I don’t know if other have suggested any solution to this, but here are 2 approaches: # Estimating LCL and UCL separately using `optimize'. prior.lcl <- function(x, alpha, mean, var) { a <- abs(plnorm(x, mean, var

Re: [R] points(x,y), mean and standard deviation

2010-10-19 Thread Dennis Murphy
lines(1:5, means.cl) HTH, Dennis On Tue, Oct 19, 2010 at 7:13 AM, ashz wrote: > > Hi, > > Thanks for the tip. > > I run this script: > means.cl <- c(82, 79, 110, 136,103) > stderr.cl <- c(8.1,9.2,7.4,1.6,7.6) > plotCI(x = means.cl , uiw = stderr.cl, pch=24) > > But how can I connect the mean t

Re: [R] points(x,y), mean and standard deviation

2010-10-19 Thread Joshua Wiley
Hi, Here is an example using ggplot2. For future reference, it would be convenient if you provided sample data. This is actually pretty easy to do: dput(yourdata) or if your data is very large: dput(head(yourdata)). At any rate, here is an example with the means plotted as points and connected

Re: [R] points(x,y), mean and standard deviation

2010-10-19 Thread ashz
Hi, Thanks for the tip. I run this script: means.cl <- c(82, 79, 110, 136,103) stderr.cl <- c(8.1,9.2,7.4,1.6,7.6) plotCI(x = means.cl , uiw = stderr.cl, pch=24) But how can I connect the mean triangles with a line? Thanks -- View this message in context: http://r.789695.n4.nabble.com/poin

Re: [R] Lattice: type="p" stopped working in panel.average

2010-10-19 Thread Alexandr Malusek
Dear Deepayan, I had to swap "x" and "y" (see below), but otherwise it worked perfectly. Thank you for your help. mypanel.average <- function(x, y, FUN = mean, ...) { aa <- aggregate(x ~ as.numeric(y), data = environment(), FUN = FUN) panel.points(aa[[2]], aa[[1]], ...) } plot <- bwplot(year

Re: [R] Part time equity tick data high frequency trading research

2010-10-19 Thread Ista Zahn
Hi Chris, There is a jobs mailing list: https://stat.ethz.ch/mailman/listinfo/r-sig-jobs -Ista On Tue, Oct 19, 2010 at 10:10 AM, aquatrade wrote: > > Hi, > > There seems to be no subsection for work related postings, so please excuse > me if this is in the wrong place. > > I am looking for an En

Re: [R] Error: object 'short' not found

2010-10-19 Thread Ivan Calandra
Hi, R tells you that you don't have any object called "short" in your workspace. From your question, I would guess that you don't plan to have it. What do you want the output of paste(...) to look like? Which parts are supposed to be called through objects (that contain characters), which o

Re: [R] Error: object 'short' not found

2010-10-19 Thread Ista Zahn
Hi Viki, On Tue, Oct 19, 2010 at 10:03 AM, Viki S wrote: > > Hi guys, > Can anyone tell me what is the meaning of following command ? > > paste(execDir,paste(short,"myfile",sep="_"),sep="\") The command means paste together the values in the variable execDir with the pasted-together values in sh

Re: [R] Error: object 'short' not found

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 10:03 AM, Viki S wrote: Hi guys, Can anyone tell me what is the meaning of following command ? paste(execDir,paste(short,"myfile",sep="_"),sep="\") R gives me an error : Error: object 'short' not found I tried to find help about 'short' in R, but could not find any such

[R] Part time equity tick data high frequency trading research

2010-10-19 Thread aquatrade
Hi, There seems to be no subsection for work related postings, so please excuse me if this is in the wrong place. I am looking for an English speaking person with very strong R Language, statistics and some financial math knowledge to do statistical research into USA stock tick data. You proba

[R] Error: object 'short' not found

2010-10-19 Thread Viki S
Hi guys, Can anyone tell me what is the meaning of following command ? paste(execDir,paste(short,"myfile",sep="_"),sep="\") R gives me an error : Error: object 'short' not found I tried to find help about 'short' in R, but could not find any such function/ object. Viki

Re: [R] readLines: how to make a data.frame?

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 7:27 AM, johannes rara wrote: I have a text file containing data: Som text :: asdf @ 1 ds $ 5. /*Edmp */ @ 8 asu $ 3. /*daf*/ @ 8 asdala $ 2. /*asdfa*/ @ 13 astun $ 11. /*daf */ @ 26 dft $ 3. /*asdf */ @ 31 dsfp $ 2. /*asdf */ asjk asdfö My intent

Re: [R] How to read only ten rows from a SAS dataset (read.ssd)?

2010-10-19 Thread David Winsemius
On Oct 19, 2010, at 6:47 AM, johannes rara wrote: I'm trying to read SAS datasets on Windows: sashome <- "C:/Program Files/SAS/SAS 9.1" fold <- "C:/temp" g <- read.ssd(fold, "sasfile", sascmd = file.path(sashome, "sas.exe")) And this was successful? How to get only e.g first ten rows into

Re: [R] nls & optimize

2010-10-19 Thread Ravi Varadhan
You can do this. dsm = c(800,600,NA,525,NA,450,400,NA,NA,NA,0) s3 = seq(0.05,1.05,0.1) plot(s3,dsm,col="blue",las=1,xlab="fraction",ylab="distance (km)") fc <- function(x,a,b){a*exp(-b*x)} fm <- nls(dsm~fc(s3,a,b),start=c(a=800,b=0)) co <- coef(fm) curve(fc(x,a=co[1],b=co[2]),add=TRUE,col="bla

Re: [R] Tif image to 8bit colour matrix.

2010-10-19 Thread Michael Sumner
This requires the rgdal and sp packages to be installed, and assumes a 3-bandfile called image.tif ## (untested) library(rgdal) x <- readGDAL("image.tif") ## first band red <- as.image.SpatialGridDataFrame(x[1])$z ## second green <- as.image.SpatialGridDataFrame(x[2])$z ## third blue <- as.image

[R] Re : [R 2.12] install.packages() with no lib argument does not work

2010-10-19 Thread vincent chouraki
It seems indeed that it is a locale issue : > Sys.getlocale() [1] "LC_CTYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=fr_FR.UTF-8;LC_COLLATE=fr_FR.UTF-8;LC_MONETARY=C;LC_MESSAGES=fr_FR.UTF-8;LC_PAPER=fr_FR.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=fr_FR.UTF-8;LC_IDENTIFICATION=C" > inst

[R] points( .... pch=2) substitue pch with image

2010-10-19 Thread Knut Krueger
Hi to all, is there any function where I can substitute the characters with an (jpg) image ? Kind regards Knut __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.or

[R] Problems with a specific calculate.

2010-10-19 Thread Toni López Mayol
Hello friends of R, My name is Toni, i'm 25 and I'm working on the Meteorological Investigation team from Balearic Islands. I had contact to you because I have a problem: I done a file for every day since 1912 about precipitation. That file has the following structure: > str(Ast) Loading req

Re: [R] Question of "Quantile Regression for Longitudinal Data"

2010-10-19 Thread ywh123
Thanks for your help RKoenker I want to deal with the problem through bootstrap.so I can get p-value and T-statistics. Do you think so? -- View this message in context: http://r.789695.n4.nabble.com/Question-of-Quantile-Regression-for-Longitudinal-Data-tp883458p3001875.html Sent from the R he

[R] Tif image to 8bit colour matrix.

2010-10-19 Thread Roger Gill
Dear listers, I have a collection of tif images that I would like to convert, in R, to a matrix containing the values of the 8bit colour. Ideally, I would like a matrix for each of the colour channels (red, blue and green). I have 'googled' and searched the help list but have yet to find a solu

[R] Part time equity tick data high frequency trading research

2010-10-19 Thread aquatrade
Hi, There seems to be no subsection for work related postings, so please excuse me if this is in the wrong place. I am looking for an English speaking person with very strong R Language, statistics and some financial math knowledge to do statistical research into USA stock tick data. You are p

Re: [R] ANOVA stuffs_How to save each result from FOR command?

2010-10-19 Thread Liviu Andronic
Hello On Tue, Oct 19, 2010 at 12:16 PM, BumSeok Jeong wrote: > Dear R experts, > > I'm new in R and a beginner in terms of statistics. > It should be simple question, but definitely difficult to solve it by > myself. > > I'd like to see main effect of group(gender: sample size is > different(M:F=

Re: [R] Lattice: type="p" stopped working in panel.average

2010-10-19 Thread Deepayan Sarkar
On Tue, Oct 19, 2010 at 4:18 PM, Alexandr Malusek wrote: > Hi, > > The behavior of panel.average has changed.  In March 2010, I plotted > the attached r_plotViolinOfAnnualE_old.eps. (I don't know the version > of R). Today, I plotted the attached r_plotViolinOfAnnualE_new.eps > using R version 2.1

Re: [R] points(x,y), mean and standard deviation

2010-10-19 Thread Jim Lemon
On 10/19/2010 07:41 PM, ashz wrote: Hi, I have a data set with 3 rows (X=date, Y1=arithmetic mean and Y2=standard deviation). How can I create a graph(e.g., points) which will show the +-stdev as well (similar to excel). Hi ashz, See FAQ 7.38. Jim ___

Re: [R] [R 2.12] install.packages() with no lib argument does not work

2010-10-19 Thread Prof Brian Ripley
Looks like this may be a problem in the French translations. Please try with LANGUAGE=en. On Tue, 19 Oct 2010, vincent chouraki wrote: Dear R users, I have just upgraded R from 2.11 to 2.12 on Ubuntu 9.04 (see more informations at the end) from the cran apt-get repository. One of the new thi

  1   2   >