You're right. It's necessary for xyplot though to prevent grouping.
On Mar 20, 2010 10:43 AM, Dieter Menne dieter.me...@menne-biomed.de
wrote:
Sundar Dorai-Raj-2 wrote:
Or perhaps more clearly,
histogram(~a1 + b1 + c1, data = aa, o...
Why outer=TRUE? Looks same for me without:
Dieter
Or perhaps more clearly,
histogram(~a1 + b1 + c1, data = aa, outer = TRUE)
--sundar
On Fri, Mar 19, 2010 at 3:50 PM, Gabor Grothendieck ggrothendi...@gmail.com
wrote:
Try this:
histogram(~ values | ind, stack(aa))
On Fri, Mar 19, 2010 at 5:44 PM, Santosh santosh2...@gmail.com wrote:
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 ravi.k...@gmail.com 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 find
Thanks, Berwin. That works just great!
--sundar
On Tue, Mar 2, 2010 at 12:57 AM, Berwin A Turlach
ber...@maths.uwa.edu.auwrote:
G'day Sundar,
On Mon, 1 Mar 2010 23:46:55 -0800
Sundar Dorai-Raj sdorai...@gmail.com wrote:
Thanks for the input, but I don't want try in the Sweave output. I
What I ended up using was:
cat(unclass(tmp))
--sundar
On Tue, Mar 2, 2010 at 8:58 AM, Berwin A Turlach ber...@maths.uwa.edu.auwrote:
G'day Sundar,
On Tue, 2 Mar 2010 01:03:54 -0800
Sundar Dorai-Raj sdorai...@gmail.com wrote:
Thanks, Berwin. That works just great!
You are welcome.
I
Hi,
I'm writing a manual using Sweave and I want to be able to print errors from
bad code. Here's an example:
Function-4a=
MySqrt - function(x) {
if (missing(x)) {
stop('x' is missing with no default)
}
if (!is.numeric(x)) {
stop('x' should only be numeric)
}
if (x 0) {
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 ch...@sharpsteen.net wrote:
Sundar Dorai-Raj-2 wrote:
Hi,
I'm
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 glc...@stanford.edu wrote:
Hello,
I would like to juxtapose two lattice graphs with common X axes such that
the X axes
Use a list instead of assign then do.call(rbind, thelist).
import.files - c(a.txt, b.txt, c.txt, d.txt, e.txt)
imp - vector(list, length(import.files))
for (i in 1:length(import.files)) {
imp[[i]] - read.delim(import.files[i], sep = , header = TRUE)
}
combined - do.call(rbind, imp)
HTH,
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 wr...@igbmc.fr wrote:
Dear all,
I can't get texi2dvi working right. Basically I'd like to convert a .lex to
.pdf without having to
It's hard to read your code, so I won't comment on your specific
example. So when all else fails read the documentation for
?summary.aov:
They have columns ‘Df’, ‘Sum Sq’, ‘Mean
Sq’, as well as ‘F value’ and ‘Pr(F)’ if there are non-zero
residual degrees of freedom.
So if you do
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
helenefrigs...@hotmail.com wrote:
Hi,
is there any way to set the ylim range from zero to whatever is the max
value in that
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)
,
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 2009 04:59 -0800 Sundar Dorai-Raj sdorai...@gmail.com
wrote
Did you make the changes before or after starting the device:
library(lattice)
## before doesn't change the settings on the device:
trellis.par.set(plot.symbol = list(col = red))
trellis.device(pdf, file = tmp.pdf)
xyplot(1 ~ 1)
dev.off()
## after does
trellis.device(pdf, file = tmp.pdf)
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 kagba2...@yahoo.com wrote:
Hi,
I tried to use tapply function to find the mean
?%in% says x and table must be vectors. You supplied
data.frames. So %in% is coercing your today.sequence to a vector using
as.character(today.sequence)
Perhaps you should paste the columns together first:
x - do.call(paste, c(sequence, sep = ::))
table - do.call(paste, c(today.sequence, sep =
Based solely on what you told us, this can be done using eval(parse(text=...))
cmd - sprintf(mean(%s), script)
eval(parse(text = cmd))
However, with more context, there may be a better solution. See, for example,
install.packages(fortunes)
library(fortunes)
fortune(parse())
HTH,
--sundar
On
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 romu...@gmail.com wrote:
Thank you Jorge and Barry for your input.
I've fiddled around a bit and as a result, am even more
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 Grothendieck
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 jian...@gmail.com wrote:
Trying to import a bunch of data files named like f001, f002, f999. Some
of the files may be
I think this ought to work for you:
library(lattice)
set.seed(42)
d - data.frame(year = c(rep(2007,12), rep(2008,12)),
treatment = rep(LETTERS[1:3], each = 4, times = 2))
d$cover - rnorm(nrow(d))
d$variable - rnorm(nrow(d))
xyplot(variable ~ cover | year, d,
panel =
A reproducible example would be nice.
Try grid = FALSE for the first question, though I'm unaware which
lattice plot you are using where the default is TRUE. So I can't
guarantee that will even work.
For your second question, add
par.settings = list(strip.background = list(col = white))
to
Hi, Michael,
I think the SPSS answer is wrong. Your starting values are way off.
Look at this plot for verification:
con - textConnection(time bod
11 0.47
22 0.74
33 1.17
44 1.42
55 1.60
67 1.84
79 2.19
8 11 2.17)
mydata - read.table(con, header = TRUE)
close(con)
Another alternative is to use SSlogis which is very similar to the
model you're fitting except with one additional parameter:
Asym - 3
xmid - 0
scal - 10
model - nls(bod ~ SSlogis(time, Asym, xmid, scal), data = mydata)
summary(model)
plot(bod ~ time, mydata)
newdata - data.frame(time = seq(1,
Try
dots - list(...)
if (length(dots) == 0) {
## do something
}
On Thu, Jul 16, 2009 at 6:46 AM, Thomas Roth (geb.
Kaliwe)hamstersqu...@web.de 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
Look at show.settings() and str(trellis.par.get()). This will show you
what the default settings are. The group colors are set by the
superpose.* elements (e.g. superpose.line is for group lines). To set
them, I usually create a list and pass it to par.settings. For
example,
my.theme -
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 Hodgesserinm.hodg...@gmail.com wrote:
Dear R People:
I have about 6000 files
use gregexpr and paste
aze - paste(c(a, z, e), collapse = )
sequence - paste(c(a,z,e,r,t,a,z,a,z,e,c), collapse =
)
gregexpr(aze, sequence, fixed = TRUE)
[[1]]
[1] 1 8
attr(,match.length)
[1] 3 3
HTH,
--sundar
On Fri, Jun 5, 2009 at 6:22 AM, Ptit_Bleuptit_b...@yahoo.fr wrote:
Hello,
This error is thrown if the argument to max is either NULL or length zero:
[~] Rscript -e max(NULL)
[1] -Inf
Warning message:
In max(NULL) : no non-missing arguments to max; returning -Inf
[~] Rscript -e max(numeric(0))
[1] -Inf
Warning message:
In max(numeric(0)) : no non-missing arguments to
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 at 12:52 PM, deanj2k
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
x=6595137340052185552
obase=16
x
5B86A277DEB9A1D0
You can call this from R.
On Wed, May 6, 2009 at 3:26 PM, Sundar Dorai-Raj sdorai
Hi,
I'm wondering if someone has solved the problem of converting very
large integers to hex. I know about format.hexmode and as.hexmode, but
these rely on integers. The numbers I'm working with are overflowing
and losing precision. Here's an example:
x - 6595137340052185552 # stored as
Set the colors in graph.sets and not auto.key.
graph.sets - list(axis.text = list(cex = 0.65),
par.ylab.text = list(cex = 1.25),
par.xlab.text = list(cex = 1.25),
superpose.polygon = list(col = 3:5))
Then remove the col = 3:5 from auto.key and barchart.
Hi, Ning,
Try: eval(parse(text = expr))
HTH,
--sundar
On Sat, May 2, 2009 at 5:39 AM, Ning Ma pnin...@gmail.com 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 the result 15.
Thanks in advance.
Try (re)reading ?qqnorm. Use datax = TRUE.
--sundar
On Sun, Apr 26, 2009 at 4:37 PM, Chris_d dewhurstch...@gmail.com 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
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 na...@cam.ac.uk 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
Because you're not calling trellis.par.set correctly. It should be:
trellis.par.set(par.ylab.text = list(cex = 0.65), par.xlab.text =
list(cex = 0.65))
However, I usually do things like this:
my.theme - list(par.ylab.text = list(cex = 0.65), par.xlab.text =
list(cex = 0.65))
barchart(...,
Try:
z - cbind(rep(c(BIC, hist), each = 150), rep(rep(c(5, 10, 30),
each = 50),2))
z - as.data.frame(z)
z - cbind(z, runif(300))
names(z) - c(Method, sigma, Error)
z$sigma - factor(z$sigma, c(5, 10, 30))
library(lattice)
sigma - as.numeric(levels(z$sigma))
sigmaExprList - lapply(sigma,
, ...)
},
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 sdorai...@gmail.com wrote:
Try:
z - cbind(rep(c(BIC, hist), each = 150), rep(rep(c(5, 10, 30),
each = 50),2))
z - as.data.frame(z)
z - cbind(z, runif(300
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 jur...@yahoo.com wrote:
Hello,
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, steve_fried...@nps.gov wrote:
I am using windows XP with R 2.8.1
I am generating a
?predict.glm has no interval argument. Perhaps you're thinking of
?predict.lm, which is different.
To get intervals in glm, I've used:
example(predict.glm)
pr - predict(budworm.lg, se.fit = TRUE)
family - family(budworm.lg)
lower - family$linkinv(pr$fit - qnorm(0.95) * pr$se.fit)
upper -
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
ted.hard...@manchester.ac.uk wrote:
On 30-Mar-09 22:13:04, Jim Porzak wrote:
Next week Wednesday evening, April 8th,
For the first question, add a groups argument. E.g.
barchart(HSI ~ Scenario | Region, Wbirdsm, groups = HydroState)
Also note that using Wbirdsm$HSI makes your call less readable, so I
added the data argument.
For your second question, setting the key does not set the color
theme. You want to
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:54 AM, AllenL allen.laroc...@gmail.com wrote:
Hello R
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 sdorai...@gmail.com wrote:
Convert Plot to factor:
xyplot(AbvBioAnnProd ~ Year | Plot, type = c(b, r), pch = 16)
Also note that using the type
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
etienn...@gmail.com wrote:
I would like to get the name of the user form the system. Is it possible ?
Something like
system.user()
returning
. 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, 2009 at 3:04 PM, Etienne Bellemare Racine
etienn...@gmail.com wrote:
I would like to get the name
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 s...@colostate.edu 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 version of
, thanks.
But I guess I was looking for something more similar to MatLab, I'm really
surprised R doesn't have a preset command for this (?)
Thanks again,
Stu
On 11 • Mar • 2009, at 5:49 PM, Sundar Dorai-Raj wrote:
Does this help?
A - matrix(0, 6, 6)
vec - 1:5
A[row(A) == col(A) + 1] - vec
Try this:
xyplot(y ~ x, temp, groups = groups,
par.settings = list(
superpose.symbol = list(
cex = c(1, 3),
pch = 19,
col = c(blue, red
See:
str(trellis.par.get())
for other settings you might want to change.
Also, you should drop the ;
= temp$cex, col = temp$col, pch = 19);
Once I introduce groups, I lose the ability to customize individual
data-points and seem only to be able to customize entire groups.
Paul
-Original Message-
From: Sundar Dorai-Raj [mailto:sdorai...@gmail.com]
Sent: Tuesday, March 10, 2009 5:49
Convert Year to a factor and both problems will be solved.
--sundar
On Tue, Mar 10, 2009 at 3:48 PM, jimdare jamesdar...@gmail.com 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 from the top
I don't believe Elena's suggestion will work. However, the following will:
xyplot(..., scales = list(y = list(at = seq(5, 25, 5
though you may need to extend the limits a little as well:
xyplot(..., ylim = lattice:::extend.limits(c(0, 30)))
and add the scales argument from the first
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 drdi...@yahoo.com wrote:
Hi R users,
I have a factor variable
(Sorry for the repeat. Forgot to copy R-help)
Try,
test = data.frame(expand.grid(c(1:10), c(1:10)))
z = test[,1] + test[,2]
test = cbind(test, z)
names(test) = c(x, y, z)
require(lattice)
wireframe(z ~ x*y, data = test,
par.settings = list(axis.line = list(col = transparent)),
par.box = c(col
To reorder the y-labels, simply reorder the factor levels:
df - data.frame(x_label = factor(x_label),
y_label = factor(y_label, rev(y_label)),
values = as.vector(my.data))
Not sure about putting the strips at the bottom. A quick scan of
?xyplot and
The only way I can figure out to do this is to use two calls to
panel.contourplot:
library(lattice)
x - seq(-2, 2, length = 20)
y - seq(-2, 2, length = 20)
grid - expand.grid(x=x, y=y)
grid$z - dnorm(grid$x) * dnorm(grid$y)
contourplot(z ~ x * y, grid,
panel = function(at, lty, col,
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
anjan.purkayas...@gmail.com wrote:
I need to uninstall R 2.7.1 from my Mac. What is the best way to
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)
},
xlab=ABC, ylab=FBG)
Also note that you removed your with call and give coplot a data argument.
HTH,
--sundar
On
, Sundar Dorai-Raj sdorai...@gmail.com 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)
},
xlab=ABC, ylab=FBG)
Also note that you removed your with call and give
!
Dimitri
On Wed, Feb 11, 2009 at 12:46 PM, Sundar Dorai-Raj sdorai...@gmail.com
wrote:
Pass a list to xlab and main for the font sizes:
barchart(..., xlab = list(x-axis, cex = 2), main = list(title, cex = 2))
For value labels and a grid you'll need a custom panel function:
barchart(..., panel
Try
x - diag(n)
x[upper.tri(x)] - 1
On Wed, Feb 11, 2009 at 1:22 PM, Dale Steele dale.w.ste...@gmail.com 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)
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
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
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, rkevinbur...@charter.net wrote:
Let me get more specific. I think it this can be answered then I can
translate the information to
Try this:
dados - data.frame(varsep = factor(rep(1:2,10)),
i = runif(20))
library(lattice)
font.settings - list(
font = 2,
cex = 2,
fontfamily = serif)
my.theme - list(
box.umbrella = list(col = red),
box.rectangle = list(col =
You'll need a custom panel function. It would also help if you
provided a reproducible example:
xyplot (
SnowLineElevation ~ Year | Model,
data = data,
panel = function(x, y, col, ...) {
col - ifelse(panel.number() == 1, red, green)
panel.xyplot(x, y, col = blue, ...)
Elevation [m]'
)
-Original Message-
From: Sundar Dorai-Raj [mailto:sdorai...@gmail.com]
Sent: Monday, February 02, 2009 11:43 AM
To: Hutchinson,David [PYR]
Cc: r-help@r-project.org
Subject: Re: [R] xyplot with lowess curves
You'll need a custom panel function. It would also help if you
It's always best to do this with list operations (e.g. lapply) rather
than a loop:
DF1 - split(DF, DF$male)
DF2 - lapply(DF1, function(x) {
x2 - t(as.matrix(x[3:5], dimnames = list(levels(x$age), NULL)))
as.data.frame(x2)
})
Then DF2[[0]] and DF2[[1]] are the data.frames you want.
HTH,
://perl.plover.com/FAQs/Buffering.html
Sundar Dorai-Raj wrote:
Hi,
I have an application in perl that prints some output to either stderr
or stdout.
Here's an example:
# tmp.pl
print STDERR starting iterator\n;
for(my $i = 0; $i 100; $i++) {
print $i . \n;
}
# tmp.R
con - pipe(perl
Hi,
I have an application in perl that prints some output to either stderr
or stdout.
Here's an example:
# tmp.pl
print STDERR starting iterator\n;
for(my $i = 0; $i 100; $i++) {
print $i . \n;
}
# tmp.R
con - pipe(perl tmp.pl)
r - readLines(con, n = -1)
close(con)
However, the
the plot finishes).
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain 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
Hi,
I'm dealing with a lattice plot inserted into a tk widget and would like
to know when a user has clicked on the plot area of a plot (i.e. inside
the axes). For example,
library(tkrplot)
library(lattice)
tt - tktoplevel()
makePlot - function() print(xyplot(1 ~ 1))
printCoords -
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/2008 5:56 PM:
Hi,
I'm
Hi,
I'm posting yet another question about tcltk since I'm still struggling
with the package. I'm trying to create a tklistbox and a ttkcombobox on
the same parent and am having a problem. Here's an example:
library(tcltk)
tt - tktoplevel()
tcl1 - tclVar()
tcl2 - tclVar()
tclObj(tcl1) -
Hi, all,
(sessionInfo at the end)
I've been struggling with the tcltk package and can't seem to get the
ttkcombobox to work. Here's an example:
library(tcltk)
p - tktoplevel()
l - tclVar()
## I don't know if I'm even calling it correctly
cb - ttkcombobox(p, values = letters[1:4],
] On Behalf Of Sundar Dorai-Raj
Sent: Monday, October 27, 2008 3:02 PM
To: r-help@r-project.org
Subject: [R] ttkcombobox
Hi, all,
(sessionInfo at the end)
I've been struggling with the tcltk package and can't seem to get the
ttkcombobox to work. Here's an example:
library(tcltk)
p - tktoplevel()
l
)})
function(x) {x^.(z)}
bquote(function(x, y) { x^.(z) + y})
function(x, y) { x^.(z) + y}
R.version.string # Vista
[1] R version 2.7.2 (2008-08-25)
Try it this way:
z - 2
f - function(x, y) {}
body(f) - bquote({ x^.(z) + y })
eval(f)(2, 3)
On Thu, Oct 2, 2008 at 1:14 AM, Sundar Dorai-Raj
Hi, R-help,
(sessionInfo at the end)
I'm trying to construct a function using bquote and running into a
strange error message. As an example, what I would like to do is this:
z - 2
eval(bquote(function(x, y) { x^.(z) + y }))(2, 3)
However, I get the following:
Error in eval(expr, envir,
Nanye Long said the following on 8/18/2008 3:00 PM:
Hi all,
I want to do plot() in a loop to make 10 graphs, so I have some code like
for (i in 1:10) {
plot(... ... , xlab = expression(g[i]) )
}
I expect g_1, g_2, and so on appear on x labels, but it simply prints
g_i for each graph.
Iasonas Lamprianou said the following on 5/2/2007 8:25 AM:
Hi I am using R version 2.4.1. How can I upgrade to version 2.5 without
having to install all the packages again?
Thanks
Jason
You may find the following link relevant.
[EMAIL PROTECTED] said the following on 5/14/2008
12:40 PM:
Using R 2.6.2, say I have the following list of lists, comb:
data1 - list(a = 1, b = 2, c = 3)
data2 - list(a = 4, b = 5, c = 6)
data3 - list(a = 3, b = 6, c = 9)
comb - list(data1 = data1, data2 = data2, data3 = data3)
So that all
Erin Hodgess said the following on 3/24/2008 10:39 AM:
Hi again R People:
This works fine:
library(tcltk)
a - tclVar(4.5)
as.numeric(tclvalue(a))
[1] 4.5
#But if you have:
b - tclVar(pi)
as.numeric(tclvalue(b))
[1] NA
Warning message:
NAs introduced by coercion
Is anyone aware
Park, Kyong H Mr ECBC said the following on 3/14/2008 12:25 PM:
Classification: UNCLASSIFIED
Caveats: NONE
Dear R users,
I'm interested in finding a random effect of the Block in the data shown
below, but 'lme' does not work without the random effect. I'm not sure how
to group the
Andrew McFadden said the following on 3/12/2008 1:47 PM:
Hi all
I am trying to determine the distances between two datasets of x and y
points. The number of points in dataset One is very small i.e. perhaps
5-10. The number of points in dataset Two is likely to be very large
i.e.
Or my personal favorite if the length of mySigma is variable:
mySigma - 2:3
plot(1:10, dnorm(1:10, sd = mySigma[1]), type = 'l')
lines(dnorm(1:10,sd = mySigma[2]),lty = 2)
leg - as.expression(lapply(mySigma, function(x) bquote(sigma == .(x
legend(x = topright, lty = c(1,2),legend = leg)
Marlin Keith Cox said the following on 2/15/2008 11:39 AM:
Dear R Users, close to the end of this I used wireframe to create a 3D plot
from a matrix. The x and y axis tick labels (1-6) for each were created
from the matrix being a 6X6 matrix. I need the axis tick labels to be the
row and
[Ricardo Rodriguez] Your XEN ICT Team said the following on 2/12/2008
12:23 AM:
Hi all,
We are facing a problem while introducing ourselves to Reshape package
use. Melt seems to work fine, but cast fails when we use mean as
fun.aggregate. As you see here, length and sum work fine, but
Stefan Grosse said the following on 1/11/2008 10:04 AM:
Dear useR's,
I have a problem with the lattice plotting of some symbols:
library(lattice)
test-data.frame(x=c(2,3,1,5),u=c(rep(1,2),rep(2,2)),g=c(rep(c(1,2),2)))
xyplot(x~u,groups=g,
data=test,
par.settings=list(
[EMAIL PROTECTED] said the following on 1/7/2008 2:59 PM:
Hello everyone,
I have an overlay plot it's nice but you can't see all the data. I would
like to know if there is a way to get a plot that gives a side by side
plot so that each plot would be next to each other. The two plots have
marcg said the following on 1/5/2008 3:48 AM:
hello
could anyone tell my, why I do not suceed with mfrow?
par(mfrow=c(4,4))
for (i in 5:17){
levelplot(maxwater[,i]~maxwater$V1*maxwater$V2, col.regions=whiteblue(5),
xlab=, cuts=4)
}
Thanks
Marc
--
Because par
get(x)
This is a FAQ:
http://cran.cnr.berkeley.edu/doc/FAQ/R-FAQ.html#How-can-I-turn-a-string-into-a-variable_003f
--sundar
Shubha Vishwanath Karanth said the following on 12/28/2007 8:38 AM:
Hi R,
x=A
A=5
I need to get the value of A using x only. How do I do this?
francogrex said the following on 11/29/2007 1:00 PM:
suppose I have this equation:
(x^2+y^2+3z^3)/(5*z^2*x^3)=0
and I want to find x in relation to the other variables which actually is:
x=sqrt(-3*z^3-y^2) or x=-sqrt(-3*z^3-y^2)
Can R give me this expression solution? I know there is
threshold said the following on 11/3/2007 4:41 AM:
Hi, my problem belongs to the basic ones. I want to get cumulated sum over
the matrix columns by one command (if such exists). Ordinary R's cumsum(x)
when x is:
[,1] [,2]
[1,]15
[2,]26
[3,]37
[4,]48
Radek John said the following on 10/28/2007 5:53 AM:
Hello everybody!
I am trying to plot glm with family=binomial and can`t work it out. My Data
are:
mort
temp num numdead
132 7 0
232 8 0
332 8 0
437 15 3
537 15 1
637
subura said the following on 10/15/2007 12:04 PM:
Care to explain how i can use a wildcard expression to source all files
ending with .R in a subdirectory ? I've tried something like this
'source(glob2rx(*.R))' without success.
Thank you
Try
R.files - list.files(my.path, pattern =
runner said the following on 10/12/2007 4:46 PM:
There is a dataset 'm', which has 3 columns: 'index', 'old1' and 'old2';
I want to create 2 new columns: 'new1' and 'new2' on this condition:
if 'index'==i, then 'new1'='old1'+add[i].
'add' is a vector of numbers to be added to old columns,
Hi, all,
(version info at end)
I'm running a script which takes input files, does some analysis, and
writes the output to csv files. Last night I ran the script (it took
~6.5 hours) thinking all would go well since it ran on a subset of the
data without issue. However, when I returned this
1 - 100 of 101 matches
Mail list logo