Displaying 20 results from an estimated 10000 matches similar to: "Lost backslashes in parse()"
2002 Apr 29
2
Lost Tcl/Tk support
In prior versions, as recent as R-1.5.0pre (2002-04-08), Tcl/Tk support worked
just fine, with "configure" (no flags) finding /usr/local/lib/tclConfig.sh and
/usr/local/lib/tkConfig.sh. In Monday's official release of R-1.5.0, Tcl/Tk
support now fails for me (under Solaris 2.6):
...
checking for tclConfig.sh... no
checking for tclConfig.sh in library (sub)directories... no
2013 Apr 10
1
Issue with Control-Z in a text file on Windows - readLines() appears to truncate
Working on Windows I have had to deal with CSV files that,
unfortunately, contain embedded Control-Zs, i.e. ASCII character 26 in
decimal, and the readLines() function in R on Windows (2.15.2 and
3.0.0) appears to truncate at the control-Z. There is no problem at
all on Ubuntu Linux with R 3.0.0.
Am I mistaken or is this genuine?
# Create a small file with embedded Control-Z
h3 <-
2020 May 15
3
edit() doubles backslashes when keep.source=TRUE
Is it just my installation or does edit() (or fix(), etc.) in R-4.0.0
double all the backslashes when options(keep.source=TRUE)? E.g.,
> options(keep.source=TRUE)
> f <- function(x) { cat("\t", x, "\n", sep="") }
> edit(f) # exit the editor without making any changes
The editor (vi or notepad) shows doubled backslashes
function(x) {
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
>
2001 Sep 27
5
Reading and writing to S-like databases
Hi,
I asked this question 2 years ago, and would like to know if the answer has
changed.
In S-Plus, I build databases of many large objects. In any given analysis,
I only need a few of those objects, but attach'ing the whole database is fine
since objects are only read as needed. How can I do the same thing in R,
without reading the entire database?
One possibility is to treat
2001 Sep 14
1
rowsum dimnames (PR#1092)
The result of rowsum() in R doesn't have the dimnames I'd expect, e.g.:
> rowsum(matrix(1:12, 3,4), c("Y","X","Y"))
[,1] [,2] [,3] [,4]
1 2 5 8 11
2 4 10 16 22
whereas S-Plus gives the more useful result:
[,1] [,2] [,3] [,4]
X 2 5 8 11
Y 4 10 16 22
This is because R's rowsum() code gives the
2015 Jan 02
3
Benchmark code, but avoid printing
Dear all,
I am trying to benchmark code that occasionally prints on the screen
and I want to
suppress the printing. Is there an idiom for this?
If I do
sink(tempfile)
microbenchmark(...)
sink()
then I'll be also measuring the costs of writing to tempfile. I could
also sink to /dev/null, which is probably fast, but that is not
portable.
Is there a better solution? Is writing to a
2006 Jan 06
2
sudoku
Any doubts about R's big-league status should be put to rest, now that
we have a
Sudoku Puzzle Solver. Take that, SAS! See package "sudoku" on CRAN.
The package could really use a puzzle generator -- contributors are
welcome!
-- David Brahm (brahm at alum.mit.edu)
[[alternative HTML version deleted]]
_______________________________________________
R-packages mailing list
2006 Jan 06
2
sudoku
Any doubts about R's big-league status should be put to rest, now that
we have a
Sudoku Puzzle Solver. Take that, SAS! See package "sudoku" on CRAN.
The package could really use a puzzle generator -- contributors are
welcome!
-- David Brahm (brahm at alum.mit.edu)
[[alternative HTML version deleted]]
_______________________________________________
R-packages mailing list
2005 Jul 06
4
Tempfile error
Dear List:
I am encountering an error that I can't resolve. I'm looping through
rows of a dataframe to generate individual tex files using Sweave. At
random points along the way, I encounter the following error
Error in file() : cannot find unused tempfile name
At which point Sweave halts. There isn't a logical pattern that I can
identify in terms of why the program stops at
2006 Apr 28
1
as.character.factor when the factor contains "NA"
as.character.factor contains this line (where cx=levels(x)[x]):
if ("NA" %in% levels(x)) cx[is.na(x)] <- "<NA>"
Is it possible that this is no longer the desired behavior? These
two results don't seem very consistent:
> as.character(as.factor(c("AB", "CD", NA)))
[1] "AB" "CD" NA
> is.na(.Last.value)[3]
[1] TRUE
2005 Jul 06
2
Graphics: calling par(mar) after frame()
The following code produces 6 plots on a page, but the first is
distorted and different from the others:
par(mfrow=c(3,2), las=2)
for (i in 1:6) {
frame()
par(mar=c(7, 7, 1, 1))
axis(2); box(); abline(h=seq(0,1,.5), col=2:4)
}
The first plot's axes are mis-aligned with the plotting area implied
by the box. It seems to be a result of calling par(mar) after frame().
Is this expected
2013 Mar 19
1
source, sys.source and error line numbers
Hi,
is there a way to retrieve the line number of where en error occurred when
sourcing a file in a tryCatch statement? Is it stored somewhere accessible?
It is not found in the error object.
Consider the following code/output and note the difference in the traceback
between source (has line number) and sys.source (has no line number).
Thank you,
Renaud
########
# code
########
codefile <-
2002 Feb 20
1
Bug in "[<-.matrix"? (Was: Feature Request: "matrix[1:10,1:10, block=F] <- 1:10")
Thanks to David Meyer [david.meyer@ci.tuwien.ac.at] and David Brahm
[brahm@alum.mit.edu] who suggested:
m[ cbind(index.i, index.j) ] <- vals
This works fine for the example I gave.
Unfortunately, this approach doesn't extend to using the row and column
names to make assignments:
> m <- matrix("",ncol=3,nrow=3)
> dimnames(m) <-
2004 Dec 22
2
outer(-x, x, pmin) cannot allocate
R> x <- 0. + 1:8000
R> y <- outer(-x, x, pmin)
Error: cannot allocate vector of size 1000000 Kb
Why does R need to allocate a gigabyte to create an 8000 x 8000 matrix?
It doesn't have any trouble with outer(-x, x, "+"). Thanks.
-- David Brahm (brahm at alum.mit.edu)
Version:
platform = i686-pc-linux-gnu
arch = i686
os = linux-gnu
system = i686, linux-gnu
status =
2006 Aug 18
2
Floating point imprecision in sum() under R-2.3.1?
After upgrading to R-2.3.1 on Linux Redhat, I was suprised by this:
R> x <- c(721.077, 592.291, 372.208, 381.182)
R> sum(x) - 2066.758
[1] 4.547474e-13
Now I understand that floating point arithmetic is not precise, but
1) the result is exactly 0 in R-2.2.1 (patched) on the same machine,
2) .Machine$double.eps = 2.2e-16, so the error seems quite large.
Also note I get the same
2002 Jan 07
1
Is r-announce alive?
I sent a message to <r-announce at stat.math.ethz.ch> last Thursday ("New package:
colSums"), and still haven't seen it echoed on r-help or on the web archive (in
fact there is no r-announce web archive for 2002). Is something broken? Did I
need to use <r-announce at lists.R-project.org> instead?
--
-- David Brahm (brahm at alum.mit.edu)
2005 Sep 02
2
Superassignment (<<-) and indexing
In a clean environment under R-2.1.0 on Linux:
> x <- 1:5
> x[3] <<- 9
Error: Object "x" not found
Isn't that odd? (Note x <<- 9 works just fine.)
Why am I doing this? Because I'm stepping through code that
normally lives inside a function, where "<<-" is appropriate.
-- David Brahm (brahm at alum.mit.edu)
2003 Oct 22
3
Subsetted 1-D arrays (PR#4110)
In R-patched_2003-10-20, subsetted 1-D arrays no longer get converted to
vectors. The NEWS file documents this change, as an indirect result of bug
report 4110. I just wanted to mention this can break code in some rather
obscure ways, such as this toy example:
R> x <- sort(tapply(1:8, rep(1:4,2), sum)) # Was vector, now is 1D array
R> y <- matrix(1:4, 1,4) #
2002 Mar 08
4
ARMA and ARIMA modeling
I'd like to play with ARIMA models of stock prices, but I am a complete novice.
Could some kind soul explain the relationship among packages "ts", "tseries",
"dse", "dse2", and "fracdiff"? Are they 'competing' products or does one
depend on another? Where would be the best place for a novice to begin?
Thanks for any advice.
PS. I