Re: [R] Bayesian cox model: spBayesSurv package

2016-12-28 Thread radhika sundar
if you do so, please at least > post a link to the stackoverflow address for the duplicate question. > > Sent from my iPhone > > > On Dec 27, 2016, at 6:52 AM, radhika sundar > wrote: > > > > I am going through R's function indeptCoxph in the spBayesSurv package &

[R] Bayesian cox model: spBayesSurv package

2016-12-27 Thread radhika sundar
I am going through R's function indeptCoxph in the spBayesSurv package which fits a bayesian Cox model. I am confused by some of the input parameters to this function. What is the role of the "prediction" input parameter? Should it not only contain the predictor covariates? In the R code example,

[R] (no subject)

2010-11-13 Thread sundar
Gud evening sir ,I want do the cluster analysis algorithm in r software can u guide me sir My mail id is :sundars...@gmail.com And I want the brief explanation to for,do.while,if etc loops and conditions. Thank you sir. -- __ R-help@r-project.o

Re: [R] Do loop

2010-11-13 Thread sundar
Gud evening sir ,I want do the cluster analysis algorithm in r software can u guide me sir My mail id is :sundars...@gmail.com And I want the brief explanation to for,do.while,if etc loops and conditions. Thank you sir. [[alternative HTML version deleted]] ___

Re: [R] sapply, lattice functions

2010-03-20 Thread Sundar Dorai-Raj
You're right. It's necessary for xyplot though to prevent grouping. On Mar 20, 2010 10:43 AM, "Dieter Menne" wrote: Sundar Dorai-Raj-2 wrote: > > Or perhaps more clearly, > > histogram(~a1 + b1 + c1, data = aa, o... Why outer=TRUE? Looks same for me witho

Re: [R] sapply, lattice functions

2010-03-19 Thread Sundar Dorai-Raj
Or perhaps more clearly, histogram(~a1 + b1 + c1, data = aa, outer = TRUE) --sundar On Fri, Mar 19, 2010 at 3:50 PM, Gabor Grothendieck wrote: > Try this: > > histogram(~ values | ind, stack(aa)) > > > On Fri, Mar 19, 2010 at 5:44 PM, Santosh wrote: > > Dear R-gurus

Re: [R] Source code for the t-distribution

2010-03-09 Thread Sundar Dorai-Raj
Here it is. https://svn.r-project.org/R/trunk/src/nmath/pt.c --sundar On Tue, Mar 9, 2010 at 4:24 AM, Ravi Kulkarni wrote: > > I have tried looking for the source code for the pt() function in > > https://svn.r-project.org/R/trunk/src/library/stats/ > > and am unable to

Re: [R] capturing errors in Sweave

2010-03-02 Thread Sundar Dorai-Raj
What I ended up using was: cat(unclass(tmp)) --sundar On Tue, Mar 2, 2010 at 8:58 AM, Berwin A Turlach wrote: > G'day Sundar, > > On Tue, 2 Mar 2010 01:03:54 -0800 > Sundar Dorai-Raj wrote: > > > Thanks, Berwin. That works just great! > > You are welcome. &g

Re: [R] capturing errors in Sweave

2010-03-02 Thread Sundar Dorai-Raj
Thanks, Berwin. That works just great! --sundar On Tue, Mar 2, 2010 at 12:57 AM, Berwin A Turlach wrote: > G'day Sundar, > > On Mon, 1 Mar 2010 23:46:55 -0800 > Sundar Dorai-Raj wrote: > > > Thanks for the input, but I don't want "try" in the Sweave o

Re: [R] capturing errors in Sweave

2010-03-01 Thread Sundar Dorai-Raj
Thanks for the input, but I don't want "try" in the Sweave output. I want the output to look just like it does in the console, as if an uncaptured error really did occur. --sundar On Mon, Mar 1, 2010 at 11:42 PM, Sharpie wrote: > > > Sundar Dorai-Raj-2 wrote: > >

[R] capturing errors in Sweave

2010-03-01 Thread Sundar Dorai-Raj
#x27; is missing with no default > MySqrt("a") Error in MySqrt("a") : 'x' should only be numeric > MySqrt(-2) Error in MySqrt(-2) : 'x' should be non-negative > MySqrt(2) [1] 1.414214 I.e. I want the Error statements to print in the tex file a

Re: [R] How do I juxtapose two lattice graphs with common X axes such that the X axes line up?

2010-01-20 Thread Sundar Dorai-Raj
Try googling "latticeExtra x.same" for some examples. Here's one: http://www.mail-archive.com/r-help@r-project.org/msg39048.html On Wed, Jan 20, 2010 at 9:44 AM, George Chen wrote: > Hello, > > I would like to juxtapose two lattice graphs with common X axes such that > the X axes line up. I am

Re: [R] Dynamic arguments in "rbind" function

2010-01-04 Thread Sundar Dorai-Raj
t;- read.delim(import.files[i], sep = "", header = TRUE) } combined <- do.call("rbind", imp) HTH, --sundar On Mon, Jan 4, 2010 at 4:31 PM, Steven Kang wrote: > Hi, all > > Basically, I have unknown number of data that need to be imported and > collapsed row-w

Re: [R] makefile for sweave

2009-11-26 Thread Sundar Dorai-Raj
Is texi2dvi in your PATH? What happens if you open a CMD window and type texi2dvi at the prompt? --sundar On Thu, Nov 26, 2009 at 6:14 AM, Wolfgang Raffelsberger wrote: > Dear all, > > I can't get texi2dvi working right. Basically I'd like to convert a .lex to > .pdf wi

Re: [R] Why F value and Pr are not show in summary() of an aov() result?

2009-11-22 Thread Sundar Dorai-Raj
if there are non-zero residual degrees of freedom. So if you do df.residual(afit), is it >0? --sundar On Sun, Nov 22, 2009 at 7:19 AM, Peng Yu wrote: > I have the following code. I'm wondering why summary() doesn't show F > value and Pr? > > Rscript multi_factor.R &g

Re: [R] denoting max value in ylim

2009-11-20 Thread Sundar Dorai-Raj
ylim = c(0, max(log10(D10$Part.P))) Make sure you remove any 0s or NAs before computing the max though. --sundar On Fri, Nov 20, 2009 at 6:12 AM, helene frigstad wrote: > > Hi, > > is there any way to set the ylim range from zero to whatever is the max > value in that dataset

Re: [R] lapply() not converting columns to factors (no error message)

2009-11-16 Thread Sundar Dorai-Raj
tallation, > because the same thing's worked for me too before but won't do now. > > I tried to reinstall it (base), but R says its there already which I > expected it to be anyway. > > I don't quite know where the issue is. Very odd. > > > --On 16 November

Re: [R] lapply() not converting columns to factors (no error message)

2009-11-16 Thread Sundar Dorai-Raj
Works for me: x <- read.csv(url("http://dc170.4shared.com/download/153147281/a5c78386/Testvcomp10.csv?tsid=20091116-075223-c3093ab0";)) names(x) x[2:13] <- lapply(x[2:13], factor) > levels(x$P1L55) [1] "0" "1" > is.factor(x$P1L96) [1] TRUE > sessionInfo() R version 2.10.0 (2009-10-26) i386-appl

Re: [R] Trellis settings get lost when printing to pdf

2009-11-13 Thread Sundar Dorai-Raj
t(plot.symbol = list(col = "red")) trellis.device(pdf, file = "tmp.pdf") xyplot(1 ~ 1, par.settings = my.theme) dev.off() HTH, --sundar 2009/11/13 Joel Fürstenberg-Hägg : > > Hi all, > > > > I've got some problems when changing the trellis settings for t

Re: [R] Issue with %in% - not matching identical rows in data frames

2009-11-03 Thread Sundar Dorai-Raj
e, sep = "::")) table <- do.call("paste", c(today.sequence, sep = "::")) x[7] %in% table I'm not sure if this is what you want/need, but it does match your example. HTH, --sundar On Tue, Nov 3, 2009 at 7:53 AM, Kaushik Krishnan wrote: > Hi folks > > I ha

Re: [R] tapply function

2009-11-03 Thread Sundar Dorai-Raj
you must have missing values in "data". Try tapply(data, group, mean, na.rm = TRUE) If that's not the case, read the bottom of this email about the posting guide. HTH, --sundar On Tue, Nov 3, 2009 at 5:28 AM, FMH wrote: > Hi, > > I tried to use tapply function to find

Re: [R] How can I run a function to a piece of text?

2009-10-16 Thread Sundar Dorai-Raj
fortune("parse()") HTH, --sundar On Fri, Oct 16, 2009 at 11:39 AM, Javier PB wrote: > > Dear users, > > I got really stuck trying to apply a function to a piece of code that I > created using different string functions. > > To make things really easy, this is a wee example

Re: [R] List mappings and variable creation

2009-10-12 Thread Sundar Dorai-Raj
Hi, Michael, Seems like all you need is aggregate and rbind: x <- aggregate(saw.aggr.data["value"], saw.aggr.data[c("conversion.type", "filteredID", "metric")], sum) x$bucketID <- "combined" y <- rbind(saw.a

Re: [R] Error in family$family : $ operator is invalid for atomic vectors

2009-10-11 Thread Sundar Dorai-Raj
Check to see if you have an old workspace being loaded. You might have an object called 'family' which you might need to remove. --sundar On Oct 11, 2009 12:15 PM, "romunov" wrote: Thank you Jorge and Barry for your input. I've fiddled around a bit and as a result, am

Re: [R] How to speed up R with version 2.9.2?

2009-10-02 Thread Sundar Dorai-Raj
Another possibility is a very large .RData file in the directory where you're starting R. You can try Rgui --no-restore (I don't have windows, so I'm not sure if this an option with RGui, though I know it is with R.) --sundar On Fri, Oct 2, 2009 at 8:50 AM, Gabor Grothendiec

Re: [R] Skipping missing files when importing data

2009-09-20 Thread Sundar Dorai-Raj
Try ?file.exists. if (file.exists(fxxx)) { read.table(fxxx) } else { cat("\"", fxxx, "\" is missing\n", sep = "") } HTH, --sundar On Sun, Sep 20, 2009 at 9:28 PM, jiangrm wrote: > Trying to import a bunch of data files named like f001, f002,

Re: [R] xyplot: Can I identify groups but not use them for regression?

2009-09-18 Thread Sundar Dorai-Raj
panel = function(x, y, ...) { panel.superpose(x, y, ...) panel.lmline(x, y, ...) }, groups = treatment) HTH, --sundar On Fri, Sep 18, 2009 at 3:42 PM, Seth W Bigelow wrote: > I wish to identify groups representing different treatments, but to plot > them and

Re: [R] Help with nls and error messages singular gradient

2009-08-25 Thread Sundar Dorai-Raj
ata.frame(time = seq(1, 11, length = 100)) lines(newdata$time, predict(model, newdata)) HTH, --sundar On Tue, Aug 25, 2009 at 10:05 AM, Sundar Dorai-Raj wrote: > Hi, Michael, > > I think the SPSS answer is wrong. Your starting values are way off. > Look at this plot for verification:

Re: [R] Help with nls and error messages singular gradient

2009-08-25 Thread Sundar Dorai-Raj
You might want to look at package nls2 which allows a brute force grid search to find some starting values. Or rethink the equation you're trying to fit. HTH, --sundar On Tue, Aug 25, 2009 at 9:10 AM, Michael Pearmain wrote: > Hi All, > > I'm trying to run nls on the data from the

Re: [R] Lattice graph tweaking

2009-08-25 Thread Sundar Dorai-Raj
ot;white")) to your call (e.g. xyplot(..., par.settings = ...)). To see what other parameters you can set in par.settings, try: str(trellis.par.get()) HTH, --sundar On Tue, Aug 25, 2009 at 6:14 AM, Wallis, David wrote: > To: silwood-r > Subject: Removing lattice graph gridlines an

Re: [R] how to check if ... is empty

2009-07-16 Thread Sundar Dorai-Raj
Try dots <- list(...) if (length(dots) == 0) { ## do something } On Thu, Jul 16, 2009 at 6:46 AM, Thomas Roth (geb. Kaliwe) wrote: > Hi, > > I was wondering what would be the best way to check if the three dots > argument contains any arguments (i.e. does ... contain any arguments or not? > ) >

Re: [R] Lattice group colors?

2009-06-22 Thread Sundar Dorai-Raj
ist(superpose.line = list(col = c("darkred", "darkblue"), lty = 1:2)) xyplot(y ~ x, data = mydata, groups = g, par.settings = my.theme, auto.key = list(points = FALSE, lines = TRUE)) HTH, --sundar On Mon, Jun 22, 2009 at 6:30 AM, Fredrik Karlsson wrote: > Dear list, > >

Re: [R] reading in multiple files

2009-06-09 Thread Sundar Dorai-Raj
You could try: do.call("rbind", lapply(list.files("path/to/files", full = TRUE), read.csv)) And add more arguments to lapply if the files are not csv, have no header, etc. --sundar On Tue, Jun 9, 2009 at 11:18 AM, Erin Hodgess wrote: > Dear R People: > > I have a

Re: [R] find a sequence of characters in a vector

2009-06-05 Thread Sundar Dorai-Raj
use gregexpr and paste > aze <- paste(c("a", "z", "e"), collapse = "") > sequence <- paste(c("a","z","e","r","t","a","z","a","z","e",&qu

Re: [R] error message re: max(i), but code and output seen O.K.

2009-05-20 Thread Sundar Dorai-Raj
on-missing arguments to max; returning -Inf HTH, --sundar On Wed, May 20, 2009 at 11:23 AM, Kirsten Miles wrote: > I have a researcher who is consistently get the warning message: > > In max(i) : no non-missing arguments to max; returning -Inf > > Best as I can tell the code is wo

Re: [R] what is wrong with this code?

2009-05-19 Thread Sundar Dorai-Raj
You're missing a ")" off end of the first line. You should consider using an editor (e.g. ESS/Emacs) that does parentheses matching. I found this in less than 5 sec (less time than I'm taking to write you a note) by cut and pasting in Emacs. --sundar On Tue, May 19, 2009

Re: [R] convert large integers to hex

2009-05-07 Thread Sundar Dorai-Raj
Thanks for both answers. In the end I decided to use Gabor's bc package. Thanks, --sundar On Thu, May 7, 2009 at 5:10 AM, Gabor Grothendieck wrote: > There is an interface between R and bc -- not on CRAN but available > from its home page here: > http://r-bc.googlecode.com >

[R] convert large integers to hex

2009-05-06 Thread Sundar Dorai-Raj
if anybody already has a solution. Basically, I would like the functionality of format.hexmode on arbitrarily large integers. Thanks, --sundar __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] setting trellis auto.key color values

2009-05-05 Thread Sundar Dorai-Raj
auto.key and barchart. Also, you can simplify your code by removing "gator_IR$" and including "data = gator_IR". I.e. barchart(MEAN ~ Hydro | as.factor(IR_ID), data = gator_IR, layout = c(4, 1), groups = Rain, ylim = c(0, 1), ...) HTH, --sunda

Re: [R] evaluate a expression

2009-05-02 Thread Sundar Dorai-Raj
Hi, Ning, Try: eval(parse(text = expr)) HTH, --sundar On Sat, May 2, 2009 at 5:39 AM, Ning Ma wrote: > Hi, > > I am new to R. Can anyone tell me how to evaluate an expression stored > in a string? > such as: >> expr <- "3*5" > I want to get

Re: [R] problem about finding power in test about variances

2009-04-30 Thread ati sundar
ics, but how do I solve this ? Ati --- On Thu, 4/30/09, Uwe Ligges wrote: > From: Uwe Ligges > Subject: Re: [R] problem about finding power in test about variances > To: atisun...@yahoo.com > Cc: r-help@r-project.org > Date: Thursday, April 30, 2009, 4:37 PM > ati sundar

[R] problem about finding power in test about variances

2009-04-30 Thread ati sundar
Hello All I am new to this list. I have a problem where for a single sample drawn from normal population, null hypothesis is that variance = k (say). Alternative hypothesis is variance > k. Now if we know the true variance, then I would like to calculate the sample size required to produce cer

[R] need some help finding power in test about variances

2009-04-28 Thread ati sundar
Hello All I am new to this list. I have a problem where for a single sample drawn from normal population, null hypothesis is that variance = k (say). Alternative hypothesis is variance > k. Now if we know the true variance, then I would like to calculate the sample size required to produce cer

Re: [R] Cannot clean infinite values

2009-04-26 Thread Sundar Dorai-Raj
Use ?is.infinite inf <- is.infinite(data) data[inf] <- 0.3 * sign(data[inf]) On Sun, Apr 26, 2009 at 5:44 PM, Nigel Birney wrote: > > Hello all, > > I have to import numeric data from file but found it contains Infinite > values which need to be eliminated. I tried to replace them in this way: >

Re: [R] Flipping axes of qqnorm

2009-04-26 Thread Sundar Dorai-Raj
Try (re)reading ?qqnorm. Use datax = TRUE. --sundar On Sun, Apr 26, 2009 at 4:37 PM, Chris_d wrote: > > Hi all, >       I have just started using R to produce qqnorm plots. I am trying to > switch the x and y axes so that the theoretical values are plotted on the y > axis and m

Re: [R] Setting lattice par parameters

2009-04-23 Thread Sundar Dorai-Raj
barchart(..., par.settings = my.theme) so the settings are only changed for the current plot and not globally. HTH, --sundar On Thu, Apr 23, 2009 at 6:25 AM, wrote: > > Hello > > I'm plotting a large suite of barcharts and need to modify the size of the > text for both the yaxis and

Re: [R] question on using lattice panel plots

2009-04-16 Thread Sundar Dorai-Raj
strip.names = TRUE, ...) }, layout = c(3,1)) Not sure how to do this with strip.custom. --sundar On Thu, Apr 16, 2009 at 1:20 PM, Sundar Dorai-Raj wrote: > Try: > > z <- cbind(rep(c("BIC", "hist"), each = 150), rep(rep(c(5, 10, 30), > each = 50),2))

Re: [R] question on using lattice panel plots

2009-04-16 Thread Sundar Dorai-Raj
trip.custom(var.name = sigmaExpr, strip.levels = FALSE, strip.names = TRUE), layout = c(3,1)) HTH, --sundar On Thu, Apr 16, 2009 at 12:43 PM, Ranjan Maitra wrote: > Hi, > > I think this question is best explained using the following > self-contained toy example: > &

Re: [R] Changing the y-axis units of a lattice histogram

2009-04-03 Thread Sundar Dorai-Raj
Try: library(lattice) histogram( ~ height | voice.part, data = singer, type = "c", scales = list(y = list(at = seq(0, 20, 5), labels = seq(0, 200, 50 HTH, --sundar On Fri, Apr 3, 2009 at 2:01 PM, Judith Flores wrote: > > Hel

Re: [R] Can not get a prediction interval from Predict

2009-03-31 Thread Sundar Dorai-Raj
norm(0.95) * pr$se.fit) upper <- family$linkinv(pr$fit + qnorm(0.95) * pr$se.fit) Note that these are "confidence" limits and not "prediction" limits. The latter would require more thought. You could also try RSiteSearch("glm interval"). HTH, --sundar On Tue, Mar 31

Re: [R] labeling panels in lattice plots

2009-03-31 Thread Sundar Dorai-Raj
Try converting year to a factor xyplot(min + max + ave ~ month | factor(year), data = rain.stats, ...) Also, notice the inclusion of the "data" argument. HTH, --sundar On Tue, Mar 31, 2009 at 6:28 AM, wrote: > > I am using windows XP with R 2.8.1 > > > I am gen

Re: [R] use R Group SFBA April meeting reminder; video of Feb k

2009-03-30 Thread Sundar Dorai-Raj
Could be that you have some sort of ad filter in your browser that's blocking the video? It appears just fine for me in Firefox 3. On Mon, Mar 30, 2009 at 3:55 PM, Ted Harding wrote: > On 30-Mar-09 22:13:04, Jim Porzak wrote: >> Next week Wednesday evening, April 8th, Mike Driscoll will be talkin

Re: [R] Requesting help with lattice again

2009-03-25 Thread Sundar Dorai-Raj
set the colors using par.setting. E.g. dotplot(HSI ~ Scenario | Region, Wbirdsm, groups = HydroState, par.settings = list(superpose.symbol = list(col = c("red", "green", "blue"))), auto.key = list(space = "right")) Then use

Re: [R] Get user system name

2009-03-16 Thread Sundar Dorai-Raj
y string. Is there a > workaround or another solution ? > > -- > Etienne > > Sundar Dorai-Raj a écrit : > > Assuming "USER" is defined on your system then > > Sys.getenv("USER") > > ought to work. > > --sundar > > On Mon, Mar 16, 20

Re: [R] Get user system name

2009-03-16 Thread Sundar Dorai-Raj
Assuming "USER" is defined on your system then Sys.getenv("USER") ought to work. --sundar On Mon, Mar 16, 2009 at 3:04 PM, Etienne Bellemare Racine wrote: > I would like to get the name of the user form the system. Is it possible ? > Something like >  >system.u

Re: [R] XYplot simple question

2009-03-16 Thread Sundar Dorai-Raj
Sorry, I should have xyplot(AbvBioAnnProd ~ Year | factor(Plot), type = c("b", "r"), pch = 16) On Mon, Mar 16, 2009 at 6:17 AM, Sundar Dorai-Raj wrote: > Convert "Plot" to factor: > > xyplot(AbvBioAnnProd ~ Year | Plot, type = c("b", "r&quo

Re: [R] XYplot simple question

2009-03-16 Thread Sundar Dorai-Raj
Convert "Plot" to factor: xyplot(AbvBioAnnProd ~ Year | Plot, type = c("b", "r"), pch = 16) Also note that using the "type" argument with multiple values prevents the necessity of a custom panel function. HTH, --sundar On Mon, Mar 16, 2009 at 5:5

Re: [R] Matrix Construction; Subdiagonal

2009-03-11 Thread Sundar Dorai-Raj
You can always write your own function: myDiag <- function(x, vec, k) { x[row(x) == col(x) - k] <- vec x } myDiag(A, vec, -1) Of course, you should probably do some input checking too. --sundar On Wed, Mar 11, 2009 at 4:57 PM, Stu Field wrote: > Sure, that'll work fine, t

Re: [R] Matrix Construction; Subdiagonal

2009-03-11 Thread Sundar Dorai-Raj
Does this help? A <- matrix(0, 6, 6) vec <- 1:5 A[row(A) == col(A) + 1] <- vec --sundar On Wed, Mar 11, 2009 at 4:42 PM, Stu Field wrote: > I'm trying to enter a vector into the subdiagonal of a matrix but > cannot find a command in R which corresponds to the MatLab vers

Re: [R] 2 Simple Lattice Plot Questions

2009-03-10 Thread Sundar Dorai-Raj
the first example to place explicit tick marks rather than let xyplot do so. HTH, --sundar On Tue, Mar 10, 2009 at 7:04 PM, Elena Wilson wrote: > Have you tried specifying the levels of y's you want to display, e.g. > ylim=c(0,5,10,15,20,30)? > >  -Original Message-

Re: [R] 2 Simple Lattice Plot Questions

2009-03-10 Thread Sundar Dorai-Raj
Convert Year to a factor and both problems will be solved. --sundar On Tue, Mar 10, 2009 at 3:48 PM, jimdare wrote: > > Hi, > > I have created the plot below and have a few questions about changes. > > 1) How do I change the "Year" title of each plot so it reads

Re: [R] Lattice: Customizing point-sizes with groups

2009-03-10 Thread Sundar Dorai-Raj
uot;, "red", "green", "purple" On Tue, Mar 10, 2009 at 8:11 AM, Paul C. Boutros wrote: > Hi Sundar, > > Thanks for your help!  Unfortunately your code seems to give the same > result.  Compare this: > > temp <- data.frame( >       x = 1:10, >

Re: [R] Lattice: Customizing point-sizes with groups

2009-03-10 Thread Sundar Dorai-Raj
you should drop the ";" from all your scripts. HTH, --sundar On Mon, Mar 9, 2009 at 6:49 PM, Paul Boutros wrote: > Hello, > > I am creating a scatter-plot in lattice, and I would like to customize the > size of each point so that some points are larger and others smaller. &g

Re: [R] Date conversion

2009-03-05 Thread Sundar Dorai-Raj
Hi, There are possibly several ways to do this. My approach would be: dates <- strptime(as.character(DATE), "%d%b%Y") year <- dates$year + 1900 week <- floor(dates$yday/365 * 52) HTH, --sundar On Thu, Mar 5, 2009 at 8:58 AM, Pele wrote: > > Hi R users, > >

Re: [R] lattice: remove box around a wireframe

2009-03-04 Thread Sundar Dorai-Raj
ol = "transparent")), par.box = c(col = "transparent") ) --sundar On Wed, Mar 4, 2009 at 8:17 AM, Thomas Roth (geb. Kaliwe) wrote: > #Hi, > # > #somebody knows how to  remove the outer box around a wireframe and reduce > the height > # > # > > test =

Re: [R] levelplot help needed

2009-02-27 Thread Sundar Dorai-Raj
and ?strip.default suggests that this is not possible, but I'm sure Deepayan will correct me if I'm wrong (he often does). --sundar On Fri, Feb 27, 2009 at 5:51 AM, Antje wrote: > Hi there, > > I'm looking for someone who can give me some hints how to make a nice > levelplot. As an

Re: [R] lattice contourplot line types

2009-02-22 Thread Sundar Dorai-Raj
}, at = pretty(grid$z, 10)) HTH, --sundar On Sun, Feb 22, 2009 at 12:45 PM, Andrew Beckerman wrote: > Dear all - > > I would like to adjust the line type of specific contours in contourplot > from the lattice package, but it seems like lty does not take a list

Re: [R] difference between assignment syntax <- vs =

2009-02-21 Thread Sundar Dorai-Raj
Read the help page as to their differences: ?"<-" On Sat, Feb 21, 2009 at 7:30 AM, Thomas Mang wrote: > Hi, > > Both operators <- and = can be used to make an assignment. My question is: > Is there a semantic difference between these two? Some time ago, I remember > I have read that because of so

Re: [R] Uninstall question

2009-02-17 Thread Sundar Dorai-Raj
This is on the Mac FAQ: http://cran.cnr.berkeley.edu/bin/macosx/RMacOSX-FAQ.html#How-can-R-for-Mac-OS-X-be-uninstalled_003f HTH, --sundar On Tue, Feb 17, 2009 at 7:17 AM, ANJAN PURKAYASTHA wrote: > I need to uninstall R 2.7.1 from my Mac. What is the best way to uninstall > it? Simply

Re: [R] Adding abline in Lattice graph

2009-02-12 Thread Sundar Dorai-Raj
quot;FBG") On Thu, Feb 12, 2009 at 3:49 PM, Sundar Dorai-Raj wrote: > Try: > > coplot(lbxglu~lbxgh|eth, data = reg.dat.5, > panel= function(...) { >panel.smooth(...) >panel.abline(h = 126, col = "red") >panel.abline(v = 6.5, col = "blue")

Re: [R] Adding abline in Lattice graph

2009-02-12 Thread Sundar Dorai-Raj
h" call and give coplot a data argument. HTH, --sundar On Thu, Feb 12, 2009 at 3:41 PM, Veerappa Chetty wrote: > Hi,I would like add a horizontal line at 126 (col=red) and a vertical line > at 6.5 ( col= blue) in each panel .How should I use the panel.abline > function in the following code

Re: [R] Efficent way to create an nxn upper triangular matrix of one's

2009-02-11 Thread Sundar Dorai-Raj
Try x <- diag(n) x[upper.tri(x)] <- 1 On Wed, Feb 11, 2009 at 1:22 PM, Dale Steele wrote: > The code below create an nxn upper triangular matrix of one's. I'm > stuck on finding a more efficient vectorized way - Thanks. --Dale > > n <- 9 > data <- matrix(data=NA, nrow=n, ncol=n) > data > for (

Re: [R] changing settings on a barchart (lattice)

2009-02-11 Thread Sundar Dorai-Raj
Add the "adj" argument to panel.text to left (adj = 0) or right(adj = 1) justify the text. Add the "font" argument to change the font. See ?text. --sundar On Wed, Feb 11, 2009 at 1:25 PM, Dimitri Liakhovitski wrote: > Thanks a lot, Sundar. I experimented somewhat and

Re: [R] subsets problem

2009-02-08 Thread Sundar Dorai-Raj
you can try lapply(lapply(uniques, function(x) subset(df, date == x)), myfun) or possibly more accurate (subset may be finicky due to scoping): lapply(lapply(uniques, function(x) df[df$date == x, ]), myfun) or use ?split lapply(split(df, df$date), myfun) HTH, --sundar On Sun, Feb 8, 2009

Re: [R] sapply

2009-02-08 Thread Sundar Dorai-Raj
I'm not sure what you really want, so perhaps a simple example would help (i.e. what a sample of the input looks like and what the output you need looks like). My guess would be sapply(df, diff) but again, I'm not sure. --sundar On Sun, Feb 8, 2009 at 4:24 PM, glenn wrote: > Ne

Re: [R] Foreign function call

2009-02-04 Thread Sundar Dorai-Raj
You're missing that "R_TSConv" is an R object. You can use stats:::R_TSConv to see the value. Not sure how this helps you though. On Wed, Feb 4, 2009 at 10:08 AM, wrote: > Let me get more specific. I think it this can be answered then I can > translate the information to other calls. In the ari

Re: [R] color and fontfamily in lattice

2009-02-03 Thread Sundar Dorai-Raj
ove the "par.settings" from the call to "bwplot" and simply use: trellis.par.set(theme = my.theme) HTH, --sundar 2009/2/3 Leandro Marino : > > > > > Hi, > I am having some problems using bwplot(lattice) in my data. I want change > some parameters: >

Re: [R] Assigning colnames in loop

2009-02-02 Thread Sundar Dorai-Raj
ot;]] are the data.frames you want. HTH, --sundar On Mon, Feb 2, 2009 at 2:30 PM, Peter Jepsen wrote: > Dear R-listers, > > I am trying to assign colnames to a data frame within a loop, but I keep > getting a "target of assignment expands to non-language object"-error. I >

Re: [R] xyplot with lowess curves

2009-02-02 Thread Sundar Dorai-Raj
ength.out=n, by = 1), > SnowLineElevation = runif(n, 0, 100) >) > ) > } > > xyplot ( > SnowLineElevation ~ Year | Model, > data = d, > ylim = c(0,100), > type = c('p','smooth'), > col = 'blue', > pch = 21, > xlab =

Re: [R] xyplot with lowess curves

2009-02-02 Thread Sundar Dorai-Raj
groups = Model, type = c("p", "smooth")) if you want the points and the lines to be the same color. --sundar On Mon, Feb 2, 2009 at 10:20 AM, Hutchinson,David [PYR] wrote: > I am trying to change the attributes of the lowess lines fit to an > xyplot command, but have

Re: [R] capturing stderr/stdout

2008-11-21 Thread Sundar Dorai-Raj
which directs both stdout and stderr to "script.log" 2. Open another console and type: tail -f script.log This way I get both the script's log file and its current progress. I guess my question is: Is there a way to accomplish the "tail -f" command in R? Thanks, --su

[R] capturing stderr/stdout

2008-11-20 Thread Sundar Dorai-Raj
) == 0) break } Of course, this won't work since I'm not calling readLines appropriately. Answers must work on Windows but may include cygwin utilities if necessary. Any advice would be appreciated. Version info at the end if it matters. Thanks, --sundar > version _ pla

Re: [R] determining plot location in lattice

2008-11-08 Thread Sundar Dorai-Raj
ntermountain Healthcare [EMAIL PROTECTED] 801.408.8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] project.org] On Behalf Of Sundar Dorai-Raj Sent: Friday, November 07, 2008 12:43 PM To: r-help@r-project.org Subject: [R] determining plot location in lattice Hi,

[R] determining plot location in lattice

2008-11-07 Thread Sundar Dorai-Raj
ollowing question: Assuming the entire plot is on a unit square, what are the coordinates of the plotting area? This question is may seem unrelated to tkrplot, but outside of this context I may not get answers that work. I have been playing with both lattice::trellis.focus and grid::grid.lo

Re: [R] tklistbox selection

2008-10-29 Thread Sundar Dorai-Raj
I solved this problem by adding "exportselection = 0" to the call to tklistbox. I.e. tb1 <- tklistbox(tt, listvariable = tcl1, exportselection = 0, selectmode = "multiple") Thanks, --sundar Sundar Dorai-Raj said the following on 10/29/

[R] tklistbox selection

2008-10-29 Thread Sundar Dorai-Raj
e values in the list box. But when I select a value from the combo box, the selection from the list box is no longer highlighted. Is this a bug or am I missing something in the documentation? My goal is to allow highlighted text simultaneously in both widgets. Thanks, --sundar

Re: [R] ttkcombobox

2008-10-27 Thread Sundar Dorai-Raj
Hi, Greg, Yes, that helps immensely! Thanks, --sundar Greg Snow said the following on 10/27/2008 7:14 PM: Here is one example of using ttkcombobox, hopefully it helps: library(tcltk) have.ttk <- function () { # from Prof. Ripley as.character(tcl("info", "tcl

[R] ttkcombobox

2008-10-27 Thread Sundar Dorai-Raj
he default value to something of my choice? I've tried the "set" argument as described in the "Tcl/Tk 8.5 Manual" but I received an error: cb <- ttkcombobox(p, values = letters[1:4], textvariable = l, set = "b") Error in structure(.External("dot

Re: [R] using bquote to construct function

2008-10-01 Thread Sundar Dorai-Raj
Thanks, Gabor! This workaround fixes my immediate needs. --sundar Gabor Grothendieck said the following on 10/1/2008 10:42 PM: That may be a bug in R but I think there is another problem on top of that as I don't think bquote descends into function bodies: z <- 2 bquote(function(x

[R] using bquote to construct function

2008-10-01 Thread Sundar Dorai-Raj
e(text = ))? Thanks, --sundar > sessionInfo() R version 2.7.2 (2008-08-25) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats

Re: [R] use expression() in a loop

2008-08-18 Thread Sundar Dorai-Raj
-contained, reproducible code. Try: par(mfrow = c(2, 5)) for (i in 1:10) { plot(1, 1, xlab = bquote(g[.(i)])) } HTH, --sundar __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] upgrade to 2.5

2008-07-31 Thread Sundar Dorai-Raj
help02a/archive/75359.html HTH, --sundar __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, re

Re: [R] Accessing items in a list of lists

2008-05-14 Thread Sundar Dorai-Raj
ta1 1 2 data2 4 3 data3 3 Any help you can give would be greatly appreciated. Thanks. Try data.frame(names.comb = names(comb), finaldata = sapply(comb, "[[", "a")) HTH, --sundar

Re: [R] as.numeric with tclvalue redux

2008-03-24 Thread Sundar Dorai-Raj
is.character(x) && exists(x, ...)) { get(x) } else { x } } a <- tclVar("4.5") b <- tclVar("pi") c <- tclVar("abcd") eval.tclvalue(a) eval.tclvalue(b) eval.tclvalue(c) HTH, --sundar __ R-

Re: [R] Lme does not work without a random effect (UNCLASSIFIED)

2008-03-14 Thread Sundar Dorai-Raj
6.61 BN 2 12 6.86 BY 2 13 6.51 CN 2 14 6.90 CY 2 15 5.90 DN 2 16 6.97 DY 2"), header = TRUE) close(con) library(nlme) fit <- lme(LCU~ST1*SURF,random=~1|Block,data=z) fit0 <- lm(LCU~ST1*SURF,data=z) anova(fit, fit0) HTH, --sundar __ 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.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Distances between two datasets of x and y co-ordinates

2008-03-12 Thread Sundar Dorai-Raj
; package: library(class) nn <- knn1(data2, data1, 1:nrow(data2)) which gives you the rows in data1 closest to each row in data2. Then compute the distance: rowSums((data2[nn, ] - data1)^2)^0.5 HTH, --sundar __ R-help@r-project.org mailing list h

Re: [R] LaTeX in R

2008-03-07 Thread Sundar Dorai-Raj
lty = c(1,2),legend = leg) Thanks, --sundar Uwe Ligges said the following on 3/7/2008 8:15 AM: > You might want to read > Ligges, U. (2002): R Help Desk: Automation of Mathematical Annotation > in Plots. R News 2 (3), 32-34. > with an example at the end that meets your requirements:

Re: [R] wire.frame tick labels from matrix

2008-02-15 Thread Sundar Dorai-Raj
of Estimate", > rot=90), xlab="Resistance Error (%) ",ylab="Length Error > (%)",scale=list(arrows=FALSE)) > detach(z) > detach(sen) > > Try: mat.df <- data.frame(z = as.vector(mat.x)) mat.df$x <- rep(c(0,

Re: [R] fun.aggregate=mean in reshape

2008-02-12 Thread Sundar Dorai-Raj
le, base::mean) monthozone solar.r wind temp 1 5 23.61538 181.2963 11.622581 65.54839 2 6 29.4 190.1667 10.27 79.1 3 7 59.11538 216.4839 8.941935 83.90323 4 8 59.96154 171.8571 8.793548 83.96774 5 9 31.44828 167.4333 10.18 76.9 > find("mean") [1] ".GlobalEnv" "package:base" HTH, --sundar __ 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.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] maps and lattice

2008-02-05 Thread Sundar Dorai-Raj
, 41.5, 43.2, 42.8) fact <- c(1, 1, 2, 2) xyplot(lat ~ long | fact, panel = function(...) { panel.xyplot(...) mp <- map("state", "massachusetts", plot = FALSE) lpolygon(mp$x, mp$y) }) HTH, --sundar ___

  1   2   >