Re: [R] Including Java files in R Package

2008-04-16 Thread Tobias Verbeke
Duncan Murdoch wrote: > On 15/04/2008 7:20 PM, Hongshu Chen wrote: >> Hi, >> >> I am building a package which contains some Java class files. I am planning >> to create a subdirectory "inst/Java/" in the source directory and put Java >> files in it, therefore after installing the package, those fil

Re: [R] Displaying Grahics to the X Window when calling R from command line

2008-04-16 Thread Prof Brian Ripley
The issue is that the X11() device is the default device only in interactive use, and further than the event loop is only run in interactive use. You need to 1) make use of R 2.7.0 RC 2) call R with R --vanilla --interactive 3) arrange for your script to wait for something so the plot remains u

Re: [R] a question of alphabetical order

2008-04-16 Thread Hans-Joerg Bibiko
Hi, as already mentioned, sorting could be a pain. My solution to that is to write my own "order" routine for a given language. The idea is to transform the UTF-8 string into ASCII in such a way that the built-in order routine outputs the desired result. But this could be a very stony way.

[R] X 11

2008-04-16 Thread Tommi Viitanen
Hi, I would like to have at least 2 x11 windows open and make many graphs into them. I wonder how to draw the graph in a certain device so that the new graph will be in the place of the old one. For example I have open x11 with device numbers 1 and 2. I want to make plot to the device 1 without d

Re: [R] Matched pairs with two data frames

2008-04-16 Thread Daniel Malter
Hi, sorry for jumping in here, but to me your description of why you want to have only the needed data rows remains ambiguous. If you just want to select the data you indicate then you do: selected.data=data[ , needed=="yes"] where "data" is the name of your long dataset (13 obs). As I see it, y

[R] Logistic regression

2008-04-16 Thread Guillaume Brutel
Here is the original dataset I am working on: > myTime Time Series: Start = 0 End = 1066 Frequency = 0.0769230769230769 [1]0 13 26 39 52 65 78 91 104 117 130 143 156 169 182 [16] 195 208 221 234 247 260 273 286 299 312 325 338 351 364 377 [31] 390 403

Re: [R] Matched pairs with two data frames

2008-04-16 Thread Udo
Patrick, my intention was, to perform a one-to-one exact match, which pairs each treated unit with ONE control unit (without replacement), using my two confounders (age, school) for matching. Patrick Connolly schrieb: On Mon, 14-Apr-2008 at 08:37AM +0200, Udo wrote: |> Zitat von Peter Alspach <[

[R] transposition problem

2008-04-16 Thread Geoff Russell
Hi use Rs, I have a csv file: "1989-90","1990-91" Barley,23,34 Oats,15,16 Which I want to turn into: year, Barley, Oats 1 "1989-90", 23, 15 2 "1990-91",34,16 Transpose doesn't quite do it, is there a standard way? Cheers, Geoff Russell __ R-he

Re: [R] X 11

2008-04-16 Thread Ted Harding
On 16-Apr-08 10:21:00, Tommi Viitanen wrote: > Hi, > I would like to have at least 2 x11 windows open and make > many graphs into them. I wonder how to draw the graph in > a certain device so that the new graph will be in the place > of the old one. > > For example I have open x11 with device numb

Re: [R] X 11

2008-04-16 Thread Prof Brian Ripley
?dev.set (on the same page as dev.off). On Wed, 16 Apr 2008, Tommi Viitanen wrote: > Hi, > > I would like to have at least 2 x11 windows open and make many graphs into > them. I wonder how to draw the graph in a certain device so that the new > graph will be in the place of the old one. > > For e

Re: [R] Load the shared object/DLL

2008-04-16 Thread Prof Brian Ripley
On Wed, 16 Apr 2008, Guohui Ding wrote: > Dear All, > > I have written a function in c (in a file named 'a.c') as follows, *PLEASE* don't claim credit for the work of others (in this case it is me that you owe the apology and retraction to). That is from 'S Programming' p. 126, and 'Writing R

[R] save a graph in horizontal way (using pdf())

2008-04-16 Thread Josué Polanco
Hello everybody, I want to save a graphic using the "pdf environment", everything in order, but I can not to save the graph in "horizontal" way. I have read the manual (to plot, par), the FAQ, google, but nothing I found that can help me. Anyone can say me a hint? Thanks a lot, -- Josue

[R] Load the shared object/DLL

2008-04-16 Thread Guohui Ding
Dear All, I have written a function in c (in a file named 'a.c') as follows, void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++) ab[i] = 0.0; for(i = 0; i < *na; i++) for(j = 0; j < *nb; j++) ab[i + j] += a

Re: [R] X 11

2008-04-16 Thread Hans-Joerg Bibiko
On 16 Apr 2008, at 12:21, Tommi Viitanen wrote: > For example I have open x11 with device numbers 1 and 2. I want to > make > plot to the device 1 without doing anythin to the 2 and not making a > new > x11. Something like ?: Do you mean something like dev.set(DEVICENUMBER) ? Have a look at

[R] Data envelopment analysis and FEAR

2008-04-16 Thread ramelan thiagarajah
Hi I would like to know whether it is possible to implement the concept of  "weak disposability" in FEAR package for Data envelopment analysis. Weak disposability means equality constraint with warm regards Ramelan ___ Yahoo! For Go

Re: [R] heavy graphs

2008-04-16 Thread Jim Lemon
Georg Ehret wrote: > Dear R community,I am creating large graphs with hundreds of > thousands of datapoints. My usual way for output was pdf, but now I am > getting file sizes of >30Mb that do not open well (or at all) in Adobe. Is > there a way to reduce the resolution or get rid of overla

Re: [R] = vs. ==?

2008-04-16 Thread Alberto Monteiro
Ted Harding wrote: > > One is that "NA" is not a value. Its logical status is, > in effect, "value not known". Therefore, when 'y' is "NA", > "x==y" cannot have a definite resolution, since it is > possible for the unkown value of 'y' to be equal to the > value of 'x'; and equally possible that

Re: [R] a question of alphabetical order

2008-04-16 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Hans! Hans-Joerg Bibiko wrote: > Hi, > > as already mentioned, sorting could be a pain. > > My solution to that is to write my own "order" routine for a given > language. > The idea is to transform the UTF-8 string into ASCII in such a way > that the built-in order routine outputs the des

Re: [R] transposition problem

2008-04-16 Thread Henrique Dallazuanna
Try this: x <- read.table(textConnection("\"1989-90\",\"1990-91\" Barley,23,34 Oats,15,16"), sep = ",", header = T, check.names = FALSE) t(x) or if you want year as column and not rownames: data.frame(Year = names(x), t(unname(x))) On Wed, Apr 16, 2008 at 7:27 AM, Geoff Russell <[EMAIL PROTEC

Re: [R] save a graph in horizontal way (using pdf())

2008-04-16 Thread Henrique Dallazuanna
See in ?pdf function, 'paper' argument. On Wed, Apr 16, 2008 at 7:56 AM, Josué Polanco <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I want to save a graphic using the "pdf environment", everything in > order, > but I can not > to save the graph in "horizontal" way. I have read the manual (

Re: [R] transposition problem

2008-04-16 Thread Geoff Russell
Many thanks -- the "unname" makes all the difference. Geoff. On 4/16/08, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote: > Try this: > > x <- read.table(textConnection("\"1989-90\",\"1990-91\" > Barley,23,34 > Oats,15,16"), sep = ",", header = T, check.names = FALSE) > > t(x) > > or if you want y

[R] What objects will save.image saves ? And how to specify objects to be saved..

2008-04-16 Thread Ng Stanley
Hi, I have a R script that loads an image R.data, does some operations, then save to the R.data again. Suppose I have done some computation before loading the R script, will all the objects before the R script execution be saved to R.data ? If yes, how can I specify save.image to save only those o

Re: [R] What objects will save.image saves ? And how to specify objects to be saved..

2008-04-16 Thread Henrique Dallazuanna
See ?save On Wed, Apr 16, 2008 at 8:46 AM, Ng Stanley <[EMAIL PROTECTED]> wrote: > Hi, > > I have a R script that loads an image R.data, does some operations, then > save to the R.data again. Suppose I have done some computation before > loading the R script, will all the objects before the R scr

Re: [R] What objects will save.image saves ? And how to specify objects to be saved..

2008-04-16 Thread Ng Stanley
Read and reread, can't make out. Will try an experiment later On Wed, Apr 16, 2008 at 7:51 PM, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote: > See ?save > > On Wed, Apr 16, 2008 at 8:46 AM, Ng Stanley <[EMAIL PROTECTED]> > wrote: > > > Hi, > > > > I have a R script that loads an image R.

Re: [R] Displaying Grahics to the X Window when calling R from command line

2008-04-16 Thread Pologruto, Thomas
Thank you for your response. I tried searching the archives but did not know that it was called X11() device. Can this be done in version 2.6.2 or do I need to have version 2.7.0 running? Also, when you say wait in my script, I need to put a sleep or something in the script or else it will delet

Re: [R] Load the shared object/DLL

2008-04-16 Thread Guohui Ding
:) Thanks. I owe you an apology and retract it, as I copied the codes from others and did not check the origin of these codes. 2008/4/16, Prof Brian Ripley <[EMAIL PROTECTED]>: > > On Wed, 16 Apr 2008, Guohui Ding wrote: > > Dear All, > > > > I have written a function in c (in a file named 'a.c')

Re: [R] looking for a string

2008-04-16 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Mark! Mark Leeds wrote: > Hi Ricardo: you can look at ?regexpr but I'm pretty sure that below returns > a vector of TRUES and FALSES depending on whether the condition ( is Jalapa > contained in unidad ) is TRUE. So, wherever the vector is TRUE is where > Jalapa was contained in unidad. So,

Re: [R] Brown-Forsythe F* Statistic

2008-04-16 Thread Richard M. Heiberger
The Brown-Forsyth test is included in the HH library in function hov(). hov is "homogeneity of variance". Use hov(y ~ x, data=mydata) and plot.hov(y ~ x, data=mydata) Rich __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

Re: [R] looking for a string

2008-04-16 Thread [Ricardo Rodriguez] Your XEN ICT Team
Charles C. Berry wrote: > > Like this: > > conaguaMexicoSub <- subset(conagua, > regexpr("Jalapa", as.character( unidad ) ) != -1 > select = c(equipo,X101:X309)) > > But it looks like you have to sort out some issues concerning dueling > locales first. > > Chuck > > > Far clear! Thanks

Re: [R] looking for a string

2008-04-16 Thread [Ricardo Rodriguez] Your XEN ICT Team
Mark Leeds wrote: > Hi Ricardo: I'm glad it helped but check > > regexpr("Jalapa", as.character( unidad ) ) != -1 > > because I think it should be > > regexpr("Jalapa", as.character( DF$unidad ) ) != -1 > > if unidad is a column of DF. Checked! attach(DF) did the trick! :-) Greetings, Ricardo

[R] SVG format from any R graphic GUI?

2008-04-16 Thread Agustin Lobo
I have problems with emf files because OpenOffice does a poor job at importing figures in this format. On the other hand, imported eps figures are not displayed, just printed. Is there any R graphic gui able to export as SVG (or other vector format)? I've tried JGR, iplots and svGUI. Thanks! Agus

[R] identical scales per panel with relation="free"

2008-04-16 Thread Andreas Krause
Using xyplot, I am plotting observed versus predicted values conditional to the values of a third variable. I would thus like to have an aspect ratio of 1 and the same axis range. Since the range of the values differs substantially between panels, the axis ranges shall be different for each pane

Re: [R] a question of alphabetical order

2008-04-16 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hans-Joerg Bibiko wrote: > Hola, > > Muchas gracias! > This is new to me. I learnt Spanish a bit - well - 20 years ago ;) > But this simplifies it. This change happens just 14 years ago! You you are not guilty! > > > Recuerdos > > Hans > Saludos cordiales! "Read" you in Spanish whenever you want!

Re: [R] Displaying Grahics to the X Window when calling R from command line

2008-04-16 Thread Prof Brian Ripley
On Wed, 16 Apr 2008, Pologruto, Thomas wrote: > Thank you for your response. I tried searching the archives but did not > know that it was called X11() device. > > Can this be done in version 2.6.2 or do I need to have version 2.7.0 Flag --interactive is only in 2.7.0. There is no simple way to

Re: [R] SVG format from any R graphic GUI?

2008-04-16 Thread Stefan Grosse
On Wed, 16 Apr 2008 13:20:35 +0200 Agustin Lobo wrote: AL>I have problems with emf files because OpenOffice does AL>a poor job at importing figures in this format. On the other AL>hand, imported eps figures are not displayed, just printed. AL>Is there any R graphic gui able to export as SVG (or AL>

Re: [R] Displaying Grahics to the X Window when calling R from command line

2008-04-16 Thread Pologruto, Thomas
Thank you very much. Most appreciated. Please follow the attached hyperlink to an important disclosure: http://www.credit-suisse.com/legal/marketcommentary -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 16, 2008 8:52 AM To: Pologruto, T

Re: [R] SVG format from any R graphic GUI?

2008-04-16 Thread Prof Brian Ripley
R 2.7.0 RC has an svg() device on Unix-alikes, and there are RSvgDevice and RSVGTipsDevice packages on CRAN. I've seen so many problems with SVG renderers (especially related to fonts) that I would prefer not to rely on it. If this is Windows, the preferred route seems to be to use EPS with a

Re: [R] a question of alphabetical order

2008-04-16 Thread [Ricardo Rodriguez] Your XEN ICT Team
Prof Brian Ripley wrote: > > Yes, but only for the same character set. I believe R.app assumes > UTF-8, and I would not expect to be able to change charset on a > running console. > > Please do use R-sig-mac for MacOS-specific issues. I've not a clear idea yet about the relationship between loc

Re: [R] SVG format from any R graphic GUI?

2008-04-16 Thread Agustin Lobo
Thanks, I know about saving to file via the graphic devices, and I do use the cairoSVG for example. But I'm looking for a minimum interactivity, such in the windows Gui where you resize your graphic and when you like it you click on "save as..." The problem is that you only have emf as vector optio

Re: [R] Displaying Grahics to the X Window when calling R from command line

2008-04-16 Thread Prof Brian Ripley
I've just tried the following in 2.6.2 auk% cat x11.R X11() interactive() plot(1:10) locator() q() explicitly launch a device. It seems to be responsive enough (at least on my system) and will stay up until you middle- or right-click on the device surface. In earlier threads others have repor

Re: [R] Questions related to plotting boxplots of time series data

2008-04-16 Thread Stephan Kolassa
Hi Thomas, > I have looked through several R books and searched the web to find > answers to my questions with no results. I have an ensemble of time > series data (what are essentially Monte Carlo simulations) which I would > like to summarize as a time series of boxplots, by date/time at 6-hr

[R] sensitivity analysis

2008-04-16 Thread Eleni Christodoulou
Hello list, I am performing a sensitivity analysis using the package ROCR. I am using the class "prediction" in this aim. My question is, could anyone tell me what the vector "cutoffs" represent in the result? Thank you all, Eleni [[alternative HTML version deleted]] ___

[R] New Special Interest Group Mailing List - R-sig-ecology

2008-04-16 Thread Hollister . Jeff
All, A new Special Interest Group devoted to the use or R in ecology has been created. The list came about through a very thorough and scientific survey that identified a need (i.e. I chatted with Sarah Goslee at a recent conference and she agreed that this might be a good idea). Myself and Sara

Re: [R] sensitivity analysis

2008-04-16 Thread Dieter Menne
Eleni Christodoulou gmail.com> writes: > I am performing a sensitivity analysis using the package ROCR. I am using > the class "prediction" in this aim. My question is, could anyone tell me > what the vector "cutoffs" represent in the result? > As the docs say: cutoffs: A list in which each

Re: [R] Blank windows in Rcmdr

2008-04-16 Thread John Fox
Dear Fehmi, Curiously, I check the Rcmdr package on an up-to-date Ubuntu 7.10 system running R 2.6.2. I've just checked again after updating both Ubuntu and all R packages, and I can't duplicate your problem -- the "Tools -> Load packages" menu works fine for me, as does everything else that I che

Re: [R] = vs. ==?

2008-04-16 Thread Ted Harding
On 16-Apr-08 11:13:40, Alberto Monteiro wrote: > > Ted Harding wrote: >> >> One is that "NA" is not a value. Its logical status is, >> in effect, "value not known". Therefore, when 'y' is "NA", >> "x==y" cannot have a definite resolution, since it is >> possible for the unkown value of 'y' to b

[R] Don't understand error-message (from lattice, I think)

2008-04-16 Thread Michael Kubovy
> mypal <- trellis.par.get('superpose.line')$col[1:2] > mycol <- mypal[1] > trellis.par.set(list(dot.symbol = list(pch = 16, cex = 1.5))) > dotplot(1:6 ~ audRating, data = txtA.ci, + scales = list(y = list(at = 1:6, labels = txtA.ci$pitchAud, col = 'black', cex = 1.1)), + ylab = '

Re: [R] Blank windows in Rcmdr

2008-04-16 Thread Barry Rowlingson
John Fox wrote: > Dear Fehmi, > > Curiously, I check the Rcmdr package on an up-to-date Ubuntu 7.10 > system running R 2.6.2. I've just checked again after updating both > Ubuntu and all R packages, and I can't duplicate your problem -- the > "Tools -> Load packages" menu works fine for me, as doe

Re: [R] identical scales per panel with relation="free"

2008-04-16 Thread Deepayan Sarkar
On 4/16/08, Andreas Krause <[EMAIL PROTECTED]> wrote: > > Using xyplot, I am plotting observed versus predicted values conditional to > the values of a third variable. > I would thus like to have an aspect ratio of 1 and the same axis range. > Since the range of the values differs substantially

[R] Post hoc tests with lme

2008-04-16 Thread Gang Chen
Using the "ergoStool" data cited in Mixed-Effects Models in S and S-PLUS by Pinheiro and Bates as an example, we have > library(nlme) > fm <- lme(effort~Type-1, data=ergoStool, random=~1|Subject) > summary(fm) Linear mixed-effects model fit by REML Data: ergoStool AIC BIC

[R] ARAR Time Series Analysis in R

2008-04-16 Thread Tom La Bone
Does R have a function for doing an ARAR analysis of a time series? Tom -- View this message in context: http://www.nabble.com/ARAR-Time-Series-Analysis-in-R-tp16722577p16722577.html Sent from the R help mailing list archive at Nabble.com. __ R-help@

[R] Confidence intervals of log transformed data

2008-04-16 Thread tom soyer
Hi I have a general statistics question on calculating confidence interval of log transformed data. I log transformed both x and y, regressed the transformed y on transformed x: lm(log(y)~log(x)), and I get the following relationship: log(y) = alpha + beta * log(x) with se as the standard error

Re: [R] SVG format from any R graphic GUI?

2008-04-16 Thread Marc Schwartz
A reasonable question here might be, what do you intend to do with the SVG file, once you have it. OO.org does not natively import SVG files and the only import filter that I am aware of for it: http://wiki.services.openoffice.org/wiki/SVG_Import_Filter is an incomplete implementation. This me

Re: [R] linear regression "group by"

2008-04-16 Thread Michael Dewey
At 18:03 14/04/2008, Ryan Lauritsen wrote: >Hi all. I'm brand new to R. > >My dataset (stored in MySQL) is a list of weather stations in rows by >year with various weather variables in columns, for example: >STNID YEAR TEMP DEWP >station11990 54 50 >station11991 23 10

Re: [R] sign() in R ?

2008-04-16 Thread Martin Maechler
As alluded, I've got several off-line replies and suggestions, notably Tobias Verbeke mentioning Matlab code {as an example of "pseudo code" :-) } by Burkhardt on the web, and Barry Rowlinson providing code similar to Peter Dalgaard's, see below. I've found myself python code on the web, unfortunat

Re: [R] Confidence intervals of log transformed data

2008-04-16 Thread Rubén Roa-Ureta
tom soyer wrote: > Hi > > I have a general statistics question on calculating confidence interval of > log transformed data. > > I log transformed both x and y, regressed the transformed y on transformed > x: lm(log(y)~log(x)), and I get the following relationship: > > log(y) = alpha + beta * l

Re: [R] SVG format from any R graphic GUI?

2008-04-16 Thread Marc Schwartz
See comments inline: Agustin Lobo wrote: > Thanks for your answers, let me summarize the situation: > > 1. I've tested the SVG import for OO, it's not great > but it is much better than what you get for EMF. I know > nothing about SVG, though, perhaps it is not the > best graphics format. In the

Re: [R] SVD of a variance matrix

2008-04-16 Thread Ravi Varadhan
No. The relationship U = V doesn't have to hold for positive-semidefinite matrices, just as it doesn't for an indefinite matrix (i.e. a matrix with both positive and negative eigenvalues), since you can have u_i = +/- (v_i )^T corresponding to the zero eigenvalue. You may refer to, for example,

Re: [R] What objects will save.image saves ? And how to specify objects to be saved..

2008-04-16 Thread Tony Plate
save.image() is a wrapper for save() (Type 'save.image' (without quotes) at the prompt to see the code for the function.) Try something like this (not tested): > load("oldvars.RData") > old.vars <- ls(all=TRUE) > ... computation ... > save(list=setdiff(ls(all=TRUE), old.vars), file="newvars.RDat

Re: [R] Confidence intervals of log transformed data

2008-04-16 Thread Tobias Verbeke
Rubén Roa-Ureta wrote: > tom soyer wrote: >> Hi >> >> I have a general statistics question on calculating confidence interval of >> log transformed data. >> >> I log transformed both x and y, regressed the transformed y on transformed >> x: lm(log(y)~log(x)), and I get the following relationship:

Re: [R] Brown-Forsythe F* Statistic

2008-04-16 Thread Peter Dalgaard
Richard M. Heiberger wrote: > The Brown-Forsyth test is included in the HH library in function hov(). > hov is "homogeneity of variance". > Use >hov(y ~ x, data=mydata) > and >plot.hov(y ~ x, data=mydata) > > Are you guys talking about the same thing? One seems to be talking about a mod

[R] Meaning of /, :, and %in% in lmer

2008-04-16 Thread Claus Wilke
Hello, I asked this question a little while ago ( https://stat.ethz.ch/pipermail/r-help/2008-April/158761.html ) but got no response. Can anybody explain to me the difference between /, :, and %in% in the definition of random effects in lmer, such as: (1|A/B), (1|A:B), (1|B %in% A)? My underst

Re: [R] Formula with no intercept

2008-04-16 Thread Doran, Harold
R may not be giving you what you want, but it is doing the right thing. You can change what the base category is through contrasts but you can't get the marginal effects for every level of all factors because this creates a linear dependence in the model matrix. > -Original Message- > Fro

Re: [R] SVG format from any R graphic GUI?

2008-04-16 Thread Agustin Lobo
Thanks for your answers, let me summarize the situation: 1. I've tested the SVG import for OO, it's not great but it is much better than what you get for EMF. I know nothing about SVG, though, perhaps it is not the best graphics format. 2. I need the figure displayed on the screen, I'm using Impre

[R] memory issues

2008-04-16 Thread Dave Depew
Hi all, I've read the R for windows FAQ and am a little confused re: memory.limit and memory.size to start using R 2.6.2 on WinXP, 2GB RAM, I have the command line "sdi --max-mem-size=2047M" Once the Rgui is open, memory.limit() returns 2047, memory.size() returns 11.315, and memory.size(max=T)

Re: [R] basehaz and newdata

2008-04-16 Thread mah
Survfit returns an "Error in temp[, 1] : incorrect number of dimensions" error message when I attempt to use newdata to validate my models. The syntax I am using is "sfit <- survfit(mod1, newdata=testd, individual=T)". The dataframe testd has two columns and 39 rows (see below). The rows are th

[R] memory issues

2008-04-16 Thread Dave Depew
Hi all, I've read the R for windows FAQ and am a little confused re: memory.limit and memory.size to start using R 2.6.2 on WinXP, 2GB RAM, I have the command line "sdi --max-mem-size=2047M" Once the Rgui is open, memory.limit() returns 2047, memory.size() returns 11.315, and memory.size(max=T)

[R] Weekdays only on x-axis

2008-04-16 Thread rsan
Hi All, I am a relative newbie at R and I am trying to plot some intraday price data over a long period of time. I would like to use a weekday(only) scale for x-axis. Can anyone tell me how to go about this? When I plot just the prices it looks fine, but when I add in the Dates/Times vs prices

Re: [R] [R-sig-ME] Post hoc tests with lme

2008-04-16 Thread Robert Kushler
At the risk of annoying Doug Bates, I'll point out that "glht" in the multcomp package works with lmer objects. In fact, you can supply your own degrees of freedom value via the "df" argument (a fact which is not immediately obvious in the glht help page). If you don't supply a df value, it will

[R] efficiently replacing values in a matrix

2008-04-16 Thread Matthew Keller
Hello all, I should probably know this by now... Anyway: I have a large matrix (dim(data) is 3000 18000). In each element are one of the following character strings "0/0", "1/1", "1/2", "2/2". I wanted to replace "0/0" with NA and the other three with 0,1,2 respectively. To accomplish just the f

[R] Weekdays only on x-axis

2008-04-16 Thread rsan
Hi All, I am a relative newbie at R and I am trying to plot some intraday price data over a long period of time. I would like to use a weekday(only) scale for x-axis. Can anyone tell me how to go about this? When I plot just the prices it looks fine, but when I add in the Dates/Times vs prices

Re: [R] Formula with no intercept

2008-04-16 Thread Prof Brian Ripley
On Wed, 16 Apr 2008, Doran, Harold wrote: > R may not be giving you what you want, but it is doing the right thing. > You can change what the base category is through contrasts but you can't > get the marginal effects for every level of all factors because this > creates a linear dependence in the

Re: [R] save a graph in horizontal way (using pdf())

2008-04-16 Thread Patrick Connolly
You might find the width and height arguments useful also. HTH On Wed, 16-Apr-2008 at 08:19AM -0300, Henrique Dallazuanna wrote: |> See in ?pdf function, 'paper' argument. |> |> On Wed, Apr 16, 2008 at 7:56 AM, Josu? Polanco <[EMAIL PROTECTED]> wrote: |> |> > Hello everybody, |> > |> > I want

Re: [R] efficiently replacing values in a matrix

2008-04-16 Thread Rolf Turner
On 17/04/2008, at 7:52 AM, Matthew Keller wrote: > Hello all, > > I should probably know this by now... Anyway: > > I have a large matrix (dim(data) is 3000 18000). In each element are > one of the following character strings "0/0", "1/1", "1/2", "2/2". I > wanted to replace "0/0" with NA and th

Re: [R] efficiently replacing values in a matrix

2008-04-16 Thread Charles C. Berry
On Thu, 17 Apr 2008, Rolf Turner wrote: > > On 17/04/2008, at 7:52 AM, Matthew Keller wrote: > >> Hello all, >> >> I should probably know this by now... Anyway: >> >> I have a large matrix (dim(data) is 3000 18000). In each element are >> one of the following character strings "0/0", "1/1", "1/2"

Re: [R] efficiently replacing values in a matrix

2008-04-16 Thread Rolf Turner
On 17/04/2008, at 9:33 AM, Charles C. Berry wrote: > I'll lay odds that Matthew's 'matrix' is actually a data.frame, and > I'll not be surprised if the columns are factors. I suspect that you're right. ***Why*** can't people distinguish between data frames and matrices? If

Re: [R] memory issues

2008-04-16 Thread Prof Brian Ripley
I think the clue is that the message you quote comes from gstat, which does not use R's memory allocator. It is gstat and not R that has failed to allocate memory. Try re-reading the help page for memory.size. 'max=T' does not indicate the limit (that is the job of memory.limit()), but the ma

Re: [R] efficiently replacing values in a matrix

2008-04-16 Thread Matthew Keller
Yes Chuck, you're right. Thanks for the help. It was a data.frame not a matrix (I had called as.matrix() in my script much earlier but that line of code didn't run because I misnamed the object!). My bad. Thanks for the help. And I'm VERY relieved R isn't that inefficient... Matt On Wed, Apr 16

Re: [R] Weekdays only on x-axis

2008-04-16 Thread Gabor Grothendieck
If z is your zoo object then you plot it like this: plot(zoo(coredata(z)), xaxt = "n") and then add a custom axis using axis or Axis. Also the quantmod package has this type of graphics built in. On Wed, Apr 16, 2008 at 3:57 PM, rsan <[EMAIL PROTECTED]> wrote: > > Hi All, > > I am a relative ne

Re: [R] memory issues

2008-04-16 Thread Rubén Roa-Ureta
I think any geostatistical program/R package would have trouble handling 12000 observations on a PC. The empirical variogram would be built with the combinations of 12000 over 2 pairs, nearly 72 millions pairs, and during kriging, if you didn't restrict the search neighbourhood, interpolation w

[R] package update

2008-04-16 Thread Phil taylor
Hi folks, when trying to update packages in version 2.6.1 I recuieve the following error messages: Warning: unable to access index for repository http://www.sourcekeg.co.uk/cran/bin/windows/contrib/2.6 Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows

[R] Instantaneous hazard of an event i.e. death

2008-04-16 Thread Andrew McFadden
Hi all I am trying to calculate the instantaneous hazard (rather than cumulative hazard) for an event "bird death". Some sample data is as follows: year<-c(rep(2003,10),rep(2004,10)) time<-c(5,10,5,15,20,10,15,15,25,25,5,15,15,5,25,10,25,15,35,25) event<-c(1,0,1,1,0,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0

Re: [R] Brown-Forsythe F* Statistic

2008-04-16 Thread Paul Lynch
You're right-- I think we're not talking about the same thing. It looks to me like the hov() function in the HH package is a test for whether or not the variances are different. What I was looking for was a test (also by Brown-Forsyth, and referred to as the F* statistic in my textbook) for testi

Re: [R] memory issues

2008-04-16 Thread ddepew
Oddly enough, the variogram modelling is rather quick in Surfer, but one cannot compute the standard errors. I restricted the search to the approximate the range of the variogram model (2000m). I can get R to compute with 12079 observations, but 13453 and I run into the gstat error message.

[R] Problems with R2WinBUGS

2008-04-16 Thread isabella
Hello, I am trying to use R2WinBUGS to conduct a mixed treatment comparison (MTC) analysis. On the surface, it seems to me that I am following the correct steps: (1) reading the data into R, (2) specifying initial values for the parameters in the model and (3) fitting the model

[R] Converting from encapsulated postscript to encapsulated pdf

2008-04-16 Thread Frank E Harrell Jr
I have several old encapsulated postscript graphics generated by R that I want to include in a LaTeX Beamer presentation so I want them in pdf. Under Ubuntu linux typing convert z.eps z.pdf (to use ImageMagick) results in a nice looking graphic but the bounding box is lost. Doing convert z.

Re: [R] Converting from encapsulated postscript to encapsulated pdf

2008-04-16 Thread Marc Schwartz
Frank E Harrell Jr wrote: > I have several old encapsulated postscript graphics generated by R that > I want to include in a LaTeX Beamer presentation so I want them in pdf. > Under Ubuntu linux typing > > convert z.eps z.pdf (to use ImageMagick) > > results in a nice looking graphic but the

Re: [R] Problems with R2WinBUGS

2008-04-16 Thread Ben Bolker
ghement.ca> writes: > > >Hello, > >I am trying to use R2WinBUGS to conduct a mixed treatment comparison (MTC) >analysis. >Thank you in advance for any help you may be able to provide! > Can you please provide your model.bug file? Ben Bolker __

[R] how to connect dots by passing NA

2008-04-16 Thread DinoDragon
This maybe a silly question. I'm trying to figure out a way to draw a line from a data set which contain NA. Say, I have a set of data as: x <- c(1.1 2.2 NA 4.4 5.5) ; y <- c(1:5) # as x,y of point a, b, c, d, and e. I would like to plot this to a line by using dot-line to connect the two adjac

[R] Suggestions: Terminology & Pkgs for following spectra over time

2008-04-16 Thread Bryan Hanson
Hi Folks... No code to troubleshoot here. I need some suggestions about the right terminology to use in further searching, and any suggestions about R pkgs that might be appropriate. I am in the planning stages of a project in which IR, NMR and other spectra (I'm a chemist) would be collected on

Re: [R] Converting from encapsulated postscript to encapsulated pdf

2008-04-16 Thread Frank E Harrell Jr
Marc Schwartz wrote: > Frank E Harrell Jr wrote: >> I have several old encapsulated postscript graphics generated by R >> that I want to include in a LaTeX Beamer presentation so I want them >> in pdf. Under Ubuntu linux typing >> >> convert z.eps z.pdf (to use ImageMagick) >> >> results in a n

Re: [R] how to connect dots by passing NA

2008-04-16 Thread Rolf Turner
On 17/04/2008, at 12:56 PM, DinoDragon wrote: > This maybe a silly question. I'm trying to figure out a way to draw > a line from a data set which contain NA. Say, I have a set of data as: > > x <- c(1.1 2.2 NA 4.4 5.5) ; y <- c(1:5) # as x,y of point a, b, > c, d, and e. > > I would like to

Re: [R] [R-sig-ME] Post hoc tests with lme

2008-04-16 Thread Simon Blomberg
Try glht in package multcomp. Simon. On Wed, 2008-04-16 at 12:00 -0400, Gang Chen wrote: > = 1), c(TypeT2 = 1))) : > Only defined for lm,glm objec -- Simon Blomberg, BSc (Hons), PhD, MAppStat. Lecturer and Consultant Statistician Faculty of Biological and Chemical Sciences The University of

[R] Constrained Nelder-Mead

2008-04-16 Thread jangarita
Dear Mr, I saw by the web your request about the code in Language C of the method Nelder-Mead with constraints, I would like if you got the program, it's posible you can help us to get the code in C, I'm grateful for your support, Regards, Jorge Angarita [[alternative HTML version de

[R] NA problem when use paste function

2008-04-16 Thread Lu, Jiang
Dear R helpers, I was doing a genetic project with two datasets X and Y. There are some IDs in both data sets, and others in either data set. I used "merge(x,y,by="ID",all=TRUE)". The data set Y contains a variable (a genotype) which is also in data X. When I merge X with Y, these two variables we

Re: [R] how to connect dots by passing NA

2008-04-16 Thread Gabor Grothendieck
Try this which interpolates the NAs using na.approx from zoo drawing the interpolated series with lty=3 and then overwrites solid lines with the gaps using lines. library(zoo) plot(y ~ x, as.data.frame(na.approx(zoo(cbind(x, y, lty = 3, type = "l") lines(y ~ x) On Wed, Apr 16, 2008 at 8:56 P

[R] Error in Design package: dataset not found for options(datadist)

2008-04-16 Thread Gad Abraham
Hi, Design isn't strictly an R base package, but maybe someone can explain the following. When lrm is called within a function, it can't find the dataset dd: > library(Design) > age <- rnorm(30, 50, 10) > cholesterol <- rnorm(30, 200, 25) > ch <- cut2(cholesterol, g=5, levels.mean=TRUE) >

Re: [R] NA problem when use paste function

2008-04-16 Thread Prof Brian Ripley
On Wed, 16 Apr 2008, Lu, Jiang wrote: > Dear R helpers, > > I was doing a genetic project with two datasets X and Y. There are > some IDs in both data sets, and others in either data set. I used > "merge(x,y,by="ID",all=TRUE)". The data set Y contains a variable (a > genotype) which is also in dat

[R] Fwd: A problem with jointprior

2008-04-16 Thread Suhaila Zainudin
Greetings all, I am trying to use Deal to learn a Bayesian Network for discrete data. I came across the following problem with jointprior function. >library(deal) > a <- read.csv("prepared.cluster1.csv") > fit <- network(a) > fit.prior <- jointprior(fit) Error in array(1, Dim) : 'dim' specifies t

[R] 3-D-Plot

2008-04-16 Thread Edwin Sendjaja
Hello, I've got some problems. I hope someone can help me. First question: I am trying to get grid on scatterplot3d (from scatterplot3d package). It seems that scatterplot3d draw on grip on X and Z side. Is it possible to get Grid on the whole Box? Second question: Is it possible to use the st

  1   2   >