Displaying 20 results from an estimated 10000 matches similar to: "using bquote to construct function"
2008 Oct 30
3
using yscrollcommand in tkcanvas crashes R (PR#13231)
Full_Name: Sundar Dorai-Raj
Version: 2.8.0
OS: Windows
Submission from: (NULL) (76.220.41.126)
The following code crashes R:
library(tcltk)
tt <- tktoplevel()
tc <- tkcanvas(tt, yscrollcommand = function(...) tkset(ts, ...))
> sessionInfo()
R version 2.8.0 (2008-10-20)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
2008 Oct 27
1
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 <- tclVar()
## I don't know if I'm even calling it correctly
cb <- ttkcombobox(p, values = letters[1:4], textvariable = l)
tkpack(cb)
1. How do I know when the value of the combobox has
2009 Jan 17
2
DierckxSpline segfault
I've just encountered a segfault when using DierckxSpline::percur
function. Below is the minimal example which triggers the error:
---
library(DierckxSpline)
x <- 1:10
y <- rep(0, 10)
pspline <- percur(x, y)
---
*** caught segfault ***
address (nil), cause 'memory not mapped'
Traceback:
1: .Fortran("percur", iopt = as.integer(iopt), m = as.integer(m),
x =
2004 Sep 30
1
Vectorising and loop (was Re: optim "a log-likelihood function")
>From: Sundar Dorai-Raj <sundar.dorai-raj at PDF.COM>
>Reply-To: sundar.dorai-raj at PDF.COM
>To: Zhen Pang <nusbj at hotmail.com>
>CC: r-help at stat.math.ethz.ch
>Subject: Vectorising and loop (was Re: [R] optim "a log-likelihood
>function")
>Date: Wed, 29 Sep 2004 18:21:17 -0700
>
>
>
>Zhen Pang wrote:
>
>>
>>I also use
2005 Jul 11
2
building packages on Windows
Hi, all,
I just recently upgraded my computer though I'm using the same OS (XP).
But now I'm having difficulty building packages and I cannot seem to
solve the problem. I'm using R-2.1.1pat on Windows XP.
Here is what I tried:
D:\Users\sundard\slib\sundar\R>R CMD CHECK sundar
* checking for working latex ... OK
* using log directory
2010 May 07
0
A fix that for 'bquote' that may work (PR#14031)
--- On Fri, 6/11/09, tlumley at u.washington.edu <tlumley at u.washington.edu> wrote:
> From: tlumley at u.washington.edu <tlumley at u.washington.edu>
> Subject: Re: [Rd] A fix that for 'bquote' that may work? (PR#14031)
> To: suharto_anggono at yahoo.com
> Cc: r-devel at stat.math.ethz.ch, R-bugs at r-project.org
> Date: Friday, 6 November, 2009, 11:42 PM
>
2009 Oct 29
0
In the result of applying 'bquote' to function definition with 2 or more arguments, first function argument disappears (PR#14031)
Full_Name: Suharto Anggono
Version: 2.8.1
OS: Windows
Submission from: (NULL) (125.165.81.124)
Sorry for repost. There is already PR#9602, but the problem is still there.
There is also a post "Re: [R] using bquote to construct function" in R-help
2008-10-02.
This illustrates the problem.
C:\Program Files\R\R-2.8.1\bin>R --vanilla
R version 2.8.1 (2008-12-22)
Copyright (C) 2008
2002 Apr 22
2
lattice help
I'm new to lattice and can't figure out what the problem is with the
following example:
#########################
> library(lattice)
Loading required package: grid
Attaching package `lattice':
The following object(s) are masked _by_ .GlobalEnv :
xyplot
The following object(s) are masked from package:base :
levels
> test.data <- data.frame(x=rnorm(100),
+
2003 Feb 06
5
options(chmhelp = TRUE)
Hi all,
Here's a curosity I ran into since upgrading to 1.6.2 (precompiled
for Windows). When using the chm help I get the following warning. I saw
a recent post regarding this as a new warning (``dyn.load warning
message in R1.6.2 on Windows XP'' dated 1/28/03), but not in the context
of the help system. The warning only appears once and does not prevent
the chm file from
2004 Jan 27
8
distance between two matrices
Hi all,
Say I have a matrix A with dimension m x 2 and matrix B with
dimension n x 2. I would like to find the row in A that is closest to
the each row in B. Here's an example (using a loop):
set.seed(1)
A <- matrix(runif(12), 6, 2) # 6 x 2
B <- matrix(runif(6), 3, 2) # 3 x 2
m <- vector("numeric", nrow(B))
for(j in 1:nrow(B)) {
d <- (A[, 1] - B[j, 1])^2 + (A[,
2009 Jul 30
3
update.formula and backticked colons
I just noticed the following in update.formula and I'm wondering if
this behavior is the intention of the developers. Here's an example:
update(`a: b` ~ x, ~ . + y)
Note now that the response has no backticks and is interpreted as a:b
(i.e. ":" is now an operator). This is because in update.formula the
call to terms.formula uses simplify = TRUE. I'm working with data that
2007 May 30
5
determining a parent function name
Hi, All,
I'm writing a wrapper for stop that produces a popup window using tcltk.
Something like:
error <- function(...) {
msg <- paste(..., sep = "")
if(!length(msg)) msg <- ""
if(require(tcltk, quiet = TRUE)) {
tt <- tktoplevel()
tkwm.title(tt, "Error")
tkmsg <- tktext(tt, bg = "white")
tkinsert(tkmsg,
2006 Aug 01
2
deleting a directory
Hi, all,
I'm looking a utility for removing a directory from within R. Currently,
I'm using:
foo <- function(...) {
mydir <- tempdir()
dir.create(mydir, showWarnings = FALSE, recursive = TRUE)
on.exit(system(sprintf("rm -rf %s", mydir)))
## do some stuff in "mydir"
invisible()
}
However, this is assumes "rm" is available. I know of
2006 Jun 20
1
changes to terms.formula in 2.3.x
Hi, all,
I just recently noticed a change in terms.formula from 2.2.1 to 2.3.1
(possibly 2.3.0, but I didn't check). Here's the problem:
## 2.2.1
> update(~ x | y, z ~ .)
z ~ x | y
## 2.3.1
> update(~ x | y, z ~ .)
z ~ (x | y)
and in the NEWS for 2.3.1
o terms.formula needed to add parentheses to formulae with
terms containing '|'. (PR#8462)
So, there must be
2004 Nov 01
2
stacking imported data
Hi all,
I have a question that I don't have a good answer for (note the word
"good"; I have an answer, but I consider it not "good"). Take the
following data in a single tab-delimited text file:
<text>
A
Labels Value SE 2.5% 97.5%
R90 0.231787 1.148044 0.035074 1.531779
R0 0.500861 0.604406 0.185336 1.353552
B
Labels Value SE 2.5% 97.5%
(Intercept) 1.367514
2009 May 06
2
convert large integers to hex
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 character
as.integer(x) # warning about inaccurate conversion
2004 Oct 25
2
Revision: post on Intro to R lecture
Hi All:
This follows my earlier post on webized slides on lecture presentation on introducing R. I learned that in Mozilla (Firefox) browsers, the slides did not show up. Sorry for the no show. As a reluctant windows user, I kind of carelessly clicked through Powerpoint to convert the presentation file to its html form, unwittingly leading to the mess.
See if it got corrected now (I do not have
2005 May 05
6
Need some quick help with lattice - barchart
For the following code below, the x-axis ticks are 1,2,3,4,5,6,7 when I was expection them to be 1,2,8,9,10,11,12. Please help me figure out where is the mistake.
library(lattice)
testdata <- as.data.frame(t(structure(c(
1,2005,9.24,6.18,634,
2,2005,8.65,6.05,96,
8,2004,6.81,6.51,16,
9,2004,9.0,7.29,8,
10,2004,8.84,6.18,524,
11,2004,8.54,6.35,579,
12,2004,9.97,6.3,614,
12,2005,8.75,5.84,32,
2004 May 19
7
Help with hclust() and plot()
Hi
When I use plot(hclust(dist..)...)...) etc to create a dendrogram of a
hierarchial cluster analysis, I end up with a vertical tree. What do I
need to do to get a horizontal tree?
Also, my users are used to seeing trees who's leaves all "end" at the
same place (eg. Like in minitab). Is this possible in R?
Thanks
Mick
Michael Watson
Head of Informatics
Institute for Animal
2006 Jul 28
3
scatter plot with axes drawn on the same scale
Dear useRs,
I'd like to produce some scatter plots where N units on the X axis are
equal to N units on the Y axis (as measured with a ruler, on screen or
paper). This approach
x <- sample(10:200,40) ; y <- sample(20:100,40)
windows(width=max(x),height=max(y))
plot(x,y)
is better than plot(x,y) but doesn't solve the problem because of the
other parameters (margins etc). Is