similar to: Converting numbers to and from raw

Displaying 20 results from an estimated 11000 matches similar to: "Converting numbers to and from raw"

2011 Nov 24
1
capture.output(eval(..., envir)) not evaluate in the expected(?) environment
I've noticed the following oddity where capture.output() prevents eval() from evaluating an expression in the specified environment. I'm not sure if it is an undocumented feature or a bug. It caused me many hours of troubleshooting. By posting it here, it might save someone else from doing the same exercise. Start by defining foo() which evaluates an expression locally in a given
2019 Mar 05
0
Development version of R fails tests and is not installed
>>>>> Berwin A Turlach >>>>> on Tue, 5 Mar 2019 16:54:09 +0800 writes: > G'day all, > I have daily scripts running to install the patched version of the > current R version and the development version of R on my linux box > (Ubuntu 18.04.2 LTS). > The last development version that was successfully compiled and >
2018 Dec 04
3
patch to support custom HTTP headers in download.file() and url()
The patch below adds support for custom HTTP headers in download.file() and url(). My main motivation for this is performing basic http authentication. Some web sites do not support embedding the credentials into the URI itself, they only work if the username and password are sent in the HTTP headers. In fact specifying the username and password in the URI has been
2009 Jun 19
3
Floating point precision / guard digits? (PR#13771)
Full_Name: D Kreil Version: 2.8.1 and 2.9.0 OS: Debian Linux Submission from: (NULL) (141.244.140.179) Group: Accuracy I understand that most floating point numbers are approximated due to their binary storage. On the other hand, I thought that modern math CPUs used guard digits to protect against trivial underflows. Not true? # integers, no problem > 1+1+1==3 [1] TRUE # binary floating
2009 Jun 19
3
Floating point precision / guard digits? (PR#13771)
Full_Name: D Kreil Version: 2.8.1 and 2.9.0 OS: Debian Linux Submission from: (NULL) (141.244.140.179) Group: Accuracy I understand that most floating point numbers are approximated due to their binary storage. On the other hand, I thought that modern math CPUs used guard digits to protect against trivial underflows. Not true? # integers, no problem > 1+1+1==3 [1] TRUE # binary floating
2019 Mar 05
3
Development version of R fails tests and is not installed
G'day all, I have daily scripts running to install the patched version of the current R version and the development version of R on my linux box (Ubuntu 18.04.2 LTS). The last development version that was successfully compiled and installed was "R Under development (unstable) (2019-02-25 r76159)" on 26 February. Since then the script always fails as a regression test seems to
2008 Nov 10
1
Preparing data for display
I have a dataset of about 10^6 rows, each consisting of a timestamp, several factors, a string, some integers, and some floats. I'd like to graph this data in various ways, including straightforward ones (how many events per week over the past year for each of 4 values of some factor), some less straightforward. I've managed to do this by brute force, but I'd like to learn how to do
2008 Nov 29
2
Using grep() to subset lines of text
I have two vectors, a and b. b is a text file. I want to find in b those elements of a which occur at the beginning of the line in b. I have the following code, but it only returns a value for the first value in a, but I want both. Any ideas please. a = c(2,3) b = NULL b[1] = "aaa 2 aaa" b[2] = "2 aaa" b[3] = "3 aaa" b[4] = "aaa 3 aaa"
2016 Jun 04
0
factors with non-unique ("duplicated") levels have been deprecated since 2009 -- are *more* deprecated now -- and why you should be hesitant misusing suppressWarnings()
>From this bug report (it's a proposal for speedup only, not a bug), https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16895#c6 the fact that you can construct factors with non-unique aka "duplicated" levels in R has been re-raised. As mentioned there, we had a small discussion here (on 'R-devel') a bit more than 7 years ago, where I had said that indeed R core had
2019 Mar 07
0
stopifnot
By not using 'withCallingHandler' or 'tryCatch', the state is like 'stopifnot' in R 3.4.x. If 'stopifnot' becomes faster than in R 3.4.x when the expressions given to 'stopifnot' are all TRUE, it is because 'match.call' is not called. Credit is to https://github.com/HenrikBengtsson/Wishlist-for-R/issues/70 for the idea. Speaking about
2019 Apr 14
0
stopifnot
In current definition of function 'stopifnot' in stop.R in R 3.6.0 beta (https://svn.r-project.org/R/branches/R-3-6-branch/src/library/base/R/stop.R) or R devel (https://svn.r-project.org/R/trunk/src/library/base/R/stop.R), if 'exprs' is specified, cl[[1]] is quote(stopifnot) . To be more robust, quote(base::stopifnot) may be used instead. Also, in current definition of function
2011 Nov 15
0
Quantstrat; error with applyStrategy()
I'm testing out quantstrat using a simple one-indicator strategy. The error I get after applyStrategy(...) is Error in .xts(e, .index(e1), .indexCLASS = indexClass(e1), .indexFORMAT = indexFormat(e1), : index length must match number of observations In addition: Warning messages: 1: In match.names(column, colnames(data)) : all columns not located in roc_15 for STOXX.Open STOXX.High
2019 Mar 31
3
stopifnot
Ah, with R 3.5.0 or R 3.4.2, but not with R 3.3.1, 'eval' inside 'for' makes compiled version behave like non-compiled version. options(error = expression(NULL)) library(compiler) enableJIT(0) f <- function(x) for (i in 1) {x; eval(expression(i))} f(is.numeric(y)) # Error: object 'y' not found fc <- cmpfun(f) fc(is.numeric(y)) # Error: object 'y' not found
2017 May 15
0
stopifnot() does not stop at first non-TRUE argument
Hi, On 05/15/2017 10:41 AM, luke-tierney at uiowa.edu wrote: > This is getting pretty convoluted. > > The current behavior is consistent with the description at the top of > the help page -- it does not promise to stop evaluation once the first > non-TRUE is found. That seems OK to me -- if you want sequencing you > can use > > stopifnot(A) > stopifnot(B) > > or
2017 May 16
0
stopifnot() does not stop at first non-TRUE argument
On Tue, 16 May 2017, Martin Maechler wrote: >>>>>> Herv? Pag?s <hpages at fredhutch.org> >>>>>> on Mon, 15 May 2017 16:54:46 -0700 writes: > > > Hi, > > On 05/15/2017 10:41 AM, luke-tierney at uiowa.edu wrote: > >> This is getting pretty convoluted. > >> > >> The current behavior is consistent
2019 Feb 27
1
stopifnot
My points: - The 'withCallingHandlers' construct that is used in current 'stopifnot' code has no effect. Without it, the warning message is the same. The overridden warning is not raised. The original warning stays. - Overriding call in error and warning to 'cl.i' doesn't always give better outcome. The original call may be "narrower" than 'cl.i'. I
2019 Jan 05
1
unsorted - suggestion for performance improvement and ALTREP support for POSIXct
I believe the performance of isUnsorted() in sort.c could be improved by calling REAL() once (outside of the for loop), rather than calling it twice inside the loop. As an aside, it is implemented in the faster way in doSort() (sort.c line 401). The example below shows the performance improvement for a vectors of double of moving REAL() outside the for loop. # example as implemented in
2019 May 30
2
stopifnot
Here is a patch to function 'stopifnot' that adds 'evaluated' argument and makes 'exprs' argument in 'stopifnot' like 'exprs' argument in 'withAutoprint'. --- stop.R 2019-05-30 14:01:15.282197286 +0000 +++ stop_new.R 2019-05-30 14:01:51.372187466 +0000 @@ -31,7 +31,7 @@ .Internal(stop(call., .makeMessage(..., domain = domain))) }
2019 Mar 05
0
stopifnot
>>>>> Suharto Anggono Suharto Anggono >>>>> on Tue, 5 Mar 2019 17:29:20 +0000 writes: > Another possible shortcut definition: > assert <- function(exprs) > do.call("stopifnot", list(exprs = substitute(exprs), local = parent.frame())) Thank you. I think this is mostly a matter of taste, but I liked your version using eval()
2009 Feb 10
1
Variable/function namespaces WAS: Bug in subsetting data frame (PR#13515)
On Tue, Feb 10, 2009 at 10:11 AM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote: > Stavros Macrakis wrote: >> On Tue, Feb 10, 2009 at 8:31 AM, Duncan Murdoch <murdoch at stats.uwo.ca>wrote: >>> The evaluator recognizes the context of usage and will get the >>> function for a function call.... >> Can you point me to chapter and verse in the language