[R] Color scale graphic

2010-06-06 Thread Diogo_Silva
Hello Recently, I've been dealing with a seemingly simple problem. I have a table with two columns filled with values from a test I made (say, amount of precipitation and Months measured). Now, instead of plotting a typical linear graphic with precipitation on the y-axis and the months in the

[R] spatstat sub-selection

2010-06-06 Thread Tom_R
Fellow Users, In Spatstat, if you have a ppp object with, say 100 points, how do you create another ppp containing a random selection, N, of the original? You can tell the function 'rthin' to make a sub-selection of points, i.e. every point is removed with probability 0.5 but you CAN'T set N

Re: [R] How to get the closing price from the the GOOGLE FINANCE site for NSEINDIA stocks

2010-06-06 Thread ivan popivanov
Try getSymbols(RCOM.NS, from=1900-01-01) instead. It looks like google has removed the ability to download csv (not much business providing it;)). In any case, Yahoo historical prices go way back than googles. For instance, getSymbols(^DJI, from=1900-01-01) ; head(get(DJI)) shows the first

[R] Onequestion

2010-06-06 Thread Xiongqing Zhang
Dear Mr. or Ms.,   I used the R-software to run the zero-inflatoin negative binomial model, but I could not get the results. And the error message is solve.default(as.matrix(fit$gaussian)) . In the model, I introduced 3 dummy variables. I do not know the reasons fully.   I will be very

Re: [R] tapply help

2010-06-06 Thread Mark Ebbert
That was very clever. Worked perfectly, thanks! And thanks to everyone else who provided feedback. On Jun 5, 2010, at 5:46 AM, jim holtman wrote: It this what you are looking for: set.seed(1) # create range for each possible class # 'name' the values so you can use them in the 'sapply'

[R] log likelihood and deviance

2010-06-06 Thread Yunteng Lao
Hi Prof Brain Ripley, If we know the residual of the model, how could we calculate the Log likelihood? Thanks for your help, Yunteng Lao [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Color scale graphic

2010-06-06 Thread Jim Lemon
On 06/06/2010 10:02 AM, Diogo_Silva wrote: Hello Recently, I've been dealing with a seemingly simple problem. I have a table with two columns filled with values from a test I made (say, amount of precipitation and Months measured). Now, instead of plotting a typical linear graphic with

Re: [R] SciViews-K / Komodo as editor on the Mac [was: StatET plot problem]

2010-06-06 Thread Bunny, lautloscrew.com
Philippe, ad 2) I totally agree that alt+f1 is the better and more comfortable option here. The main reason I tried to test some of the functionality that is typically display outside the R console, such as plotting and ?topic (and honestly, I did not realize from the start that alt+f1 was

Re: [R] SciViews-K / Komodo as editor on the Mac [was: StatET plot problem]

2010-06-06 Thread Philippe Grosjean
On 06/06/10 10:45, Bunny, lautloscrew.com wrote: Philippe, ad 2) I totally agree that alt+f1 is the better and more comfortable option here. The main reason I tried to test some of the functionality that is typically display outside the R console, such as plotting and ?topic (and honestly, I

Re: [R] log likelihood and deviance

2010-06-06 Thread Arnaud Le Rouzic
Hi, If we know the residual of the model, how could we calculate the Log likelihood? It depends on the model (lm? glm? nls?). Why not using directly the logLik function? x - rnorm(100, 10) y - rnorm(100, 10) model1 - lm(y ~ x) logLik(model1) model2 - glm(y ~ x, family=gaussian) logLik(model2)

Re: [R] Error Bar Issues

2010-06-06 Thread Joris Meys
On Sun, Jun 6, 2010 at 12:51 AM, beloitstudent schu...@beloit.edu wrote: Thanks for the suggestion...but R still doesn't like it.  Now I have 3 error messages.  It seems to dislike my *err=y* command.  I'm going to continue trying.  Thanks for your help!  If you happen to spot anything else,

Re: [R] spatstat sub-selection

2010-06-06 Thread Joris Meys
You can't specify it in rthin, which I can understand for the simple reason that this violates the independence of the sampling. If you put a fixed limit on your resampling, the chance of being selected depends on when some point is selected. You could do it by hacking the object : rthin.exact -

[R] R CMD in 2.11.1 error

2010-06-06 Thread Andy Zhu
Hi, I have a set of user defined package which I have installed in 2.8.1 for quite some time. I installed 2.11.0 and 2.11.1 a couple of days ago while still having 2.8.1 version in my system. For the package, package.skeleton works fine in R 2.11. However, it comes problem when I run Rcmd

[R] I need help in analyzing

2010-06-06 Thread wojak121
I'm sory for my weak english. I need to analyze this subject : x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 y 0 0 1 0 0 1 0 0 1 0 czarne 1 1 0 0 0 0 1 0

Re: [R] textbox in lattice

2010-06-06 Thread baptiste auguie
Hi, I've just added width/heightDetails methods following Paul's suggestion. I kept a duplicate of all on-the-fly grob size calculations; it is necessary to ensure that the table cells adjust to the content which can be subsequently edited (e.g changing the colnames to plotmath expressions).

Re: [R] I need help in analyzing

2010-06-06 Thread Joris Meys
This help list is not intended for solving your assignments. But you're honest about it, so I'll describe for you shortly what the output is. How to interprete that output is up to you. see inline comments. On Sun, Jun 6, 2010 at 12:38 PM, wojak121 rotworm...@op.pl wrote: I'm sory for my weak

[R] Loading an image/picture (png/jpeg/...) to screen...

2010-06-06 Thread oliver
Hello, how can I load an external picture/image file to screen? I want to use locator() then to get coordinates of that picture... ...in other words I want to use R to do some measurements on a picture. Therefore I need to load the image into R display, and that displaying needs to work

Re: [R] Loading an image/picture (png/jpeg/...) to screen...

2010-06-06 Thread baptiste auguie
Hi, Try this, library(png) example(readPNG) HTH, baptiste On 6 June 2010 13:46, oliver oli...@first.in-berlin.de wrote: Hello, how can I load an external picture/image file to screen? I want to use locator() then to get coordinates of that picture... ...in other words I want to use R

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-06 Thread John Fox
Dear Anita and Joris, Please see https://stat.ethz.ch/pipermail/r-help/2010-March/230280.html, posted to r-help in March. Regards, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton,

[R] Cumulative frequency percentage and library (equate)

2010-06-06 Thread ying_chen wang
Does anyone know how to get cumulative frequency percentage and how to access library (equate)? Thanks. Grace [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] I need help in analyzing

2010-06-06 Thread wojak121
Thanks very much for helping me, i will think about what you've write : thanks again. : -- View this message in context: http://r.789695.n4.nabble.com/I-need-help-in-analyzing-tp2244886p2244921.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] R CMD in 2.11.1 error

2010-06-06 Thread Duncan Murdoch
Andy Zhu wrote: Hi, I have a set of user defined package which I have installed in 2.8.1 for quite some time. I installed 2.11.0 and 2.11.1 a couple of days ago while still having 2.8.1 version in my system. For the package, package.skeleton works fine in R 2.11. However, it comes problem

Re: [R] Cumulative frequency percentage and library (equate)

2010-06-06 Thread Joris Meys
For cumulative frequencies, see ?cumsum https://stat.ethz.ch/pipermail/r-help/2007-September/141499.html To access the _package_ equate, you have to install it first. Then, you just use library(equate). Cheers Joris On Sun, Jun 6, 2010 at 3:26 PM, ying_chen wang gracedrop.w...@gmail.com wrote:

Re: [R] Wrong symbol rendering in plots (Ubuntu)

2010-06-06 Thread Ben Bolker
Yvonnick NOEL yvonnick.noel at uhb.fr writes: Hello, I have the very same problem. Plotting code that used to work before I upgraded to Ubuntu Lucid Lynx does not work anymore. For example: plot(1:10) text(6,4,expression(pi)) The 'pi' greek letter appear as a \neq (different from

[R] Merge usage to update data.frame

2010-06-06 Thread Mario Valle
Good morning! I have two datasets with the same structure, one containing all my values and the second one that update same of these values (see example below). I want to create a data.frame with all the values of the first dataset except when an entry is present in the second dataset, in

[R] prettyR

2010-06-06 Thread Iasonas Lamprianou
Hi all, does anyone have any practical examples of how this command can be used in prettyR? add.value.labels(x,value.labels) I mean, can we have the SPSS style of using numbers and/or labels if we want to? Thank you for your time Jason Dr. Iasonas Lamprianou Assistant Professor

[R] Why did TukeyHSD not work when I used it for post-hoc for 2way within-subjects anova?

2010-06-06 Thread Xiao He
Dear R people, I have a couple of questions about post-doc analyses for 2 by 2 within subjects ANOVA. I conducted a psycholinguistic study that combined a 2 by 2 design and a latin square design. Specifically, I had 32 items each of which generated 4 conditions. Participants saw each of the 32

[R] Creating pdf report

2010-06-06 Thread bjlwilkinson
I'm looking for a way to create a pdf report that contains multiple graphs on one page as well as tables (ideally with some lines below categories etc.) . I have used the pdf(filename) followed by dev.off() to date but this prints one graph per page and does not seem to have functionality for

[R] Howto modify a drawn graph with igraph

2010-06-06 Thread Etienne Cuvelier
Hello, I am using the igraph package, and I wonder how to add or modify informations on a drawn graph. Example: library(igraph) M - matrix( nc=12, nr=12 , 0) M[ 1,]=c(0,1,0,0,1,1,0,0,0,0,0,0) M[ 2,]=c(1,0,1,1,1,0,0,0,0,0,0,0) M[ 3,]=c(0,1,0,0,0,1,1,0,0,0,0,0) M[ 4,]=c(0,1,0,0,0,1,0,0,0,0,0,0)

[R] fitting multinomial logistic regression

2010-06-06 Thread suman dhara
Sir, I want to fit a multinomial logistic regression in R.I think mlogit() is the function for doing this. mlogit () is in packege globaltest.But, I can not install this package. I use the following: install.packages(globaltest) Can you help me? Regards, Suman Dhara [[alternative HTML

[R] Generalized DCC GARCH ML estimation

2010-06-06 Thread drinky_1
-- View this message in context: http://r.789695.n4.nabble.com/Generalized-DCC-GARCH-ML-estimation-tp2245125p2245125.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Generalized DCC GARCH ML estimation

2010-06-06 Thread drinky_1
Hi everyone, I want to do a maximum likelihood estimation for the Generalized Dynamic Conditional Correlation (GDCC) Model of Hafner and Franses (2009), but I don't know how exactly. I hope you can help me. This is what I have so far. Well first of all Hafner models the conditional covariance

Re: [R] R2HTML problem

2010-06-06 Thread RGtk2User
Which editor could I use on Windows? The program that already works with TinnR... will work with this new editor? Thanks! On Sat, Jun 5, 2010 at 11:40 PM, Joris FA Meys [via R] ml-node+2244582-437396255-277...@n4.nabble.comml-node%2b2244582-437396255-277...@n4.nabble.com wrote: Tinn-R is

Re: [R] Creating pdf report

2010-06-06 Thread Philippe Grosjean
On 06/06/10 19:26, bjlwilkin...@gmail.com wrote: I'm looking for a way to create a pdf report that contains multiple graphs on one page as well as tables (ideally with some lines below categories etc.) . I have used the pdf(filename) followed by dev.off() to date but this prints one graph per

Re: [R] geom_ribbon removes missing values

2010-06-06 Thread Karsten Loesing
Hi Hadley, On 5/31/10 9:51 PM, Hadley Wickham wrote: There's no easy way to do this because behind the scenes geom_ribbon uses grid.polygon. A possible workaround might be to have grid.polygon draw multiple polygons, one for each interval. We can do this by constructing vectors with

Re: [R] Why did TukeyHSD not work when I used it for post-hoc for 2way within-subjects anova?

2010-06-06 Thread Xiao He
Sorry, that in the last message the tables were messed up. Here is a link to the tables http://www-scf.usc.edu/~hex/data.txt http://www-scf.usc.edu/~hex/data.txtThanks! On Sun, Jun 6, 2010 at 10:18 AM, Xiao He praguewaterme...@gmail.com wrote: Dear R people, I have a couple of questions

Re: [R] Creating pdf report

2010-06-06 Thread Jannis
For multiple figures on one page have a look at An introduction to R (pdf, downloadable from the net), page 72 For printing the data have a look at: library(gplots) help(textplot) HTH Jannis bjlwilkin...@gmail.com schrieb: I'm looking for a way to create a pdf report that contains

Re: [R] fitting multinomial logistic regression

2010-06-06 Thread Ben Bolker
suman dhara suman.dhara89 at gmail.com writes: I want to fit a multinomial logistic regression in R.I think mlogit() is the function for doing this. mlogit () is in packege globaltest.But, I can not install this package. I use the following: install.packages(globaltest) Can you help me?

Re: [R] fitting multinomial logistic regression

2010-06-06 Thread sayan dasgupta
To install this package, start R and enter: source(http://bioconductor.org/biocLite.R;) biocLite(globaltest) Hope that helps On Mon, Jun 7, 2010 at 12:15 AM, Ben Bolker bol...@ufl.edu wrote: suman dhara suman.dhara89 at gmail.com writes: I want to fit a multinomial logistic

Re: [R] prettyR

2010-06-06 Thread Arun.stat
Sorry if I could not understand your problem properly. Are you looking for this type of example? assign(paste(x, 1, level, sep=), 4) x1level [1] 4 Thanks, -- View this message in context: http://r.789695.n4.nabble.com/prettyR-tp2245115p2245210.html Sent from the R help mailing list archive

Re: [R] geom_ribbon removes missing values

2010-06-06 Thread Karsten Loesing
On 6/6/10 7:46 PM, Karsten Loesing wrote: Hi Hadley, On 5/31/10 9:51 PM, Hadley Wickham wrote: There's no easy way to do this because behind the scenes geom_ribbon uses grid.polygon. A possible workaround might be to have grid.polygon draw multiple polygons, one for each interval. We can

Re: [R] fitting multinomial logistic regression

2010-06-06 Thread Achim Zeileis
On Sun, 6 Jun 2010, suman dhara wrote: Sir, I want to fit a multinomial logistic regression in R.I think mlogit() is the function for doing this. mlogit () is in packege globaltest.But, I can not install this package. I use the following: To add to some of the previously given advice: -

Re: [R] Creating pdf report

2010-06-06 Thread baptiste auguie
Hi, ggplot2 and lattice also provide convenient ways to arrange multiple plots on a page. For tables, there's also a function based on Grid graphics in the gridExtra package. A typical dummy example might be, library(ggplot2) library(gridExtra) p = qplot(Sepal.Length, Petal.Length, data=iris,

Re: [R] sem R: singular and Could not compute QR decomposition of Hessian

2010-06-06 Thread John Fox
Dear Ana, I copy here the response that I sent to you directly, for the other people reading this thread on r-help: I've now had a chance to look at your model. Because of its unusual structure, it's hard for me to know its identification status. For example, you specify that almost all of the

Re: [R] Merge usage to update data.frame

2010-06-06 Thread jim holtman
try this: a V1 V2 1 AAA 1 2 BBB 2 3 CCC 3 u V1 V2 1 BBB 22 a$V2[match(u$V1, a$V1)] - u$V2 a V1 V2 1 AAA 1 2 BBB 22 3 CCC 3 On Sun, Jun 6, 2010 at 12:41 PM, Mario Valle mva...@cscs.ch wrote: Good morning! I have two datasets with the same structure, one containing all my

Re: [R] Loading an image/picture (png/jpeg/...) to screen...

2010-06-06 Thread Oliver
baptiste auguie baptiste.auguie at googlemail.com writes: Hi, Try this, library(png) example(readPNG) [...] If rasterImage would be available, I think this would be the right hint. But it isn't. So I can load the pic, but not display it. :( Ciao, Oliver

[R] separating data into columns

2010-06-06 Thread sheck
Hi All- I have been trying to separate data into columns - specifically the date - and then aggregate the rest of the data to calculate summer hourly means. However, now I would like to calculate hourly means just over one day at a time. And, I am not able to figure out how to do this. I

Re: [R] separating data into columns

2010-06-06 Thread Gabor Grothendieck
This calculates hourly means: aggregate(z, trunc(time(z), 01:00:00), mean) Precip mphDeg DegF Fuel Rel volts DegMx mphgust wm (06/01/06 00:00:00) 0 2.375 97.625 40.8 NA 37.00833NANA 2.708333 0.3 (06/01/06 01:00:00) 0 1.800 97.700 38.6 NA

Re: [R] separating data into columns

2010-06-06 Thread Jannis
I am sure there is a more sophisticated way, but I would do it like this: hourindex - round(as.numeric(YYMMDDHHmm)/100,digits=0) hourly.means - aggregate(dataset,hourindex,mean) For aggregate you just need an index with the length of the amount of rows that your dataset has, that assigns a

[R] paste together a string object later to be utilized in a function

2010-06-06 Thread moleps
Dear r-listers, I need to pass a string to a function. However the length of the string is dependent on the length of a vector. b-length(h) v-paste(rep(names(ts$a[,1:b,]),ts$a[,1:b,]),sep=) Is it possible somehow to pass this as an argument to a function later on ? Regards, //M

Re: [R] paste together a string object later to be utilized in a function

2010-06-06 Thread Joris Meys
Wild guess, but it looks like you are looking at : ts - list(a=1:5) names(ts$a) - letters[1:5] v-paste(rep(names(ts$a[,1:b,]),ts$a[,1:b,]),sep=) sapply(v,function(x){eval(parse(,text=x))}) $`rep(names(ts$a[1]),ts$a[1])` [1] a $`rep(names(ts$a[2]),ts$a[2])` [1] b b

Re: [R] Loading an image/picture (png/jpeg/...) to screen...

2010-06-06 Thread Joris Meys
There might be a way doing that in R, but if you really need to take measures of a picture in some standardized way, I suggest you take a look at ImageJ. More than R that seems the right tool for the job. Some people have been experimenting with connecting ImageJ and R, but even without connection

Re: [R] prettyR

2010-06-06 Thread Joris Meys
Very simple as explained in the help files: X - 1:5 X [1] 1 2 3 4 5 add.value.labels(X,letters[1:5]) [1] 1 2 3 4 5 attr(,value.labels) a b c d e 1 2 3 4 5 X [1] 1 2 3 4 5 X didn't change. X - add.value.labels(X,letters[1:5]) X [1] 1 2 3 4 5 attr(,value.labels) a b c d e 1 2 3 4 5 X

Re: [R] R2HTML problem

2010-06-06 Thread Joris Meys
Take a look at eclipse : http://www.splusbook.com/R_Eclipse_StatET.pdf And yes, your program should work. The editor doesn't do anything else but sending your code to R. It is R that decides what to do with it. Cheers Joris On Sun, Jun 6, 2010 at 7:25 PM, RGtk2User iagoco...@gmail.com wrote:

[R] Computing day-over-day log return for a matrix containing multiple time series

2010-06-06 Thread Anyi Zhu
Hi all, Thanks a lot for anyone's help in advance. I am trying to find a way to compute the day-to-day return (log return) from a n x r matrix containing, n different stocks and price quotes over r days. The time series of prices are already split by using unstack function. For the

[R] how can I control the x-axis tick labels

2010-06-06 Thread mauede
I am trying to generate a plot whose x-axis values are the following: data_out[,1] [1] 1979 1958 1937 1916 1895 1874 1853 1832 1811 1790 1769 1748 1727 1706 1685 1664 1643 1622 1601 1580 1559 [22] 1538 1517 1496 1475 1454 1433 1412 1391 1370 1349 1328 1307 1286 1265 1244 1223 1202 1181 1160

Re: [R] how can I control the x-axis tick labels

2010-06-06 Thread Don MacQueen
Try: plot(, xaxt='n', ) axis(1, at=c(1,2,3,4,5, ... all the rest of them ...) ) You might also need to use the label argument to axis() -Don At 5:18 AM +0200 6/7/10, mau...@alice.it wrote: I am trying to generate a plot whose x-axis values are the following: data_out[,1] [1]

Re: [R] Merge usage to update data.frame

2010-06-06 Thread Mario Valle
That is! Match, not merge is the solution. Ahhh, memory, memory... Thanks a lot! mario On 07-Jun-10 0:09, jim holtman wrote: try this: a V1 V2 1 AAA 1 2 BBB 2 3 CCC 3 u V1 V2 1 BBB 22 a$V2[match(u$V1, a$V1)]- u$V2 a V1 V2 1 AAA 1 2 BBB 22 3 CCC 3

Re: [R] Loading an image/picture (png/jpeg/...) to screen...

2010-06-06 Thread baptiste auguie
On 7 June 2010 01:16, Oliver oli...@first.in-berlin.de wrote: baptiste auguie baptiste.auguie at googlemail.com writes: Hi, Try this, library(png) example(readPNG) [...] If rasterImage would be available, I think this would be the right hint. It is available when you use the latest