[Rd] POSIX <> character comparison is locale dependent

2016-08-19 Thread Vitalie Spinu
Hi Devs, In my UTC+1 timezone the following code returns TRUE t <- as.POSIXct("1999-12-31 23:50:00", tz = "UTC") t > "2000-01-01" ## TRUE For a person in US it would return FALSE. The reason for this is that timezone of the "t" object is ignored in base:::Ops.POSIXt. Could this

[Rd] How to read variable nr of chars from a Server Socket?

2014-11-24 Thread Vitalie Spinu
Hi, I am trying to implement messaging protocol that doesn't pre-specify the length of the message in the message header. In other words, I don't know in advance when I will reach the end of the message. I wrote C level parser for strings but when it came to reading from connections I got stuck

[Rd] Source location of currently evaluated code?

2013-08-13 Thread Vitalie Spinu
Hi, Is there a way to retrieve the parsed location of currently executed function? In other words, how to define a function "foo" such that when sourced from a file "file_with_foo.R" containing foo() at line 1, it should print: foo called in file_with_foo.R at line 1 Thanks, Vitalie

Re: [Rd] strange value in .Last.value

2013-06-05 Thread Vitalie Spinu
>> Duncan Murdoch >> on Wed, 5 Jun 2013 07:59:54 -0400 wrote: [...] >> As I take it, it is. Thus, ess/orgmode -- which relies on .Last.value >> for results handling and does not expect that $visible element -- should >> adapt and ignore that explicitly? > I think you'll need to ask on

Re: [Rd] Avoid entering {} evaluation in debugger

2013-05-06 Thread Vitalie Spinu
>> "Josh O'Brien" >> on Mon, 6 May 2013 15:29:39 -0700 (PDT) wrote: [...] > I believe that your sessionInfo() results leave out the most important > detail, which is that you're running R from Emacs/ESS. Is that right? Nope, I have reported it from R terminal. > I get this same, occasion

[Rd] Avoid entering {} evaluation in debugger

2013-05-05 Thread Vitalie Spinu
Hi, f1 <- function(){ browser() print("aaa") } f2 <- function(){ a <- 12 eval(envir = parent.frame(), bquote({ b <- .(a) })) } Now do, f1() and enter n RET and then {1+2}: Browse[2]> {1 + 2} debug at #1: 1 +

[Rd] Build fails with sysdata.rda in R dir

2012-06-15 Thread Vitalie Spinu
Hi, I am getting a strange error with 15.0 which I've not seen with previous versions of R. If sysdata.rda is included in R directory of the package I am getting: R CMD build betfairly.roxygen/ * checking for file ‘betfairly.roxygen/DESCRIPTION’ ... OK * preparing ‘betfairly’: * checking DESCR

Re: [Rd] enableJIT() prohibits usual R debugging

2012-03-21 Thread Vitalie Spinu
>>>> Vitalie Spinu >>>> on Wed, 21 Mar 2012 14:39:52 +0100 wrote: >>>> >>>> on Wed, 21 Mar 2012 07:46:21 -0500 wrote: >> I can't reproduce this in either 2.14.1 or R-devel. > Hm .. I cannot reproduce it, nor with the lat

Re: [Rd] enableJIT() prohibits usual R debugging

2012-03-21 Thread Vitalie Spinu
on Wed, 21 Mar 2012 07:46:21 -0500 wrote: > I can't reproduce this in either 2.14.1 or R-devel. Hm .. I cannot reproduce it, nor with the latest R-devel, nor with 2.14.2 anymore. Some local glitch or something ... Vitalie. __ R-devel@r-pr

[Rd] enableJIT() prohibits usual R debugging

2012-03-21 Thread Vitalie Spinu
Hi, Browser doesn't work properly with the compiler enabled. It might be intended behavior, but it's not documented. compiler::enableJIT(1) foo <- function(){ browser() cat("here\n") } Browser doesn't stop, and I am getting: > foo() Called from: foo() Browse[1]> here > Thanks, V

[Rd] enableJIT() and internal R completions (was: [ESS-bugs] ess-mode 12.03; ess hangs emacs)

2012-03-21 Thread Vitalie Spinu
Hello, JIT compiler interferes with internal R completions: compiler::enableJIT(2) utils:::functionArgs("density", '') gives: utils:::functionArgs("density", '') Note: no visible global function definition for 'bw.nrd0' Note: no visible global function definition for 'bw.nrd' Note: no visib

Re: [Rd] [ESS] completion in [] (R internal completion fails)

2012-03-14 Thread Vitalie Spinu
Hello, I am forwarding this from ESS mailing list, as it's a failure of internal R completion system: This fails: utils:::.assignLinebuffer('iris[iris$Spec') utils:::.assignEnd(15) utils:::.guessTokenFromLine() utils:::.completeToken() utils:::.retrieveCompletions() ## -> [1] "iris[iris$Spec"

[Rd] Efficient development of NAMESPACEd packages.

2011-11-21 Thread Vitalie Spinu
Dear R-devel, How are the package authors supposed to develop their own NAMESPACEd packages efficiently? And what are the directions R is taking in order to facilitate the development cycle? This questions are in the context of the recent thread on ESS-help (http://thread.gmane.org/gmane.emacs.es

[Rd] Problems with new srcref warnings in R 2.14 (development)

2011-11-19 Thread Vitalie Spinu
Dear R developers, Print method for function now tries to open the source file associated with srcref of the function. It outputs only the warning, if file cannot be open, and forgets to print the function definition. Example: eval(parse(text = "tf <- function(a){ b <- a^4 b }", srcfi

[Rd] Injecting source reference from external editors (emacs).

2011-11-16 Thread Vitalie Spinu
Hi everyone, I would like to inject source reference into R objects from external editor. In my case it's emacs with ESS and ess-tracebug (http://code.google.com/p/ess-tracebug/). Currently the user has to source the file before the src references become available. I would like to spare her, a

Re: [Rd] NULL assignment will change the expression's class into list

2010-10-08 Thread Vitalie Spinu
On Fri, Oct 8, 2010 at 7:49 PM, Duncan Murdoch wrote: > On 08/10/2010 12:24 PM, Vitalie Spinu wrote: > >> On Fri, Oct 8, 2010 at 12:14 PM, Duncan Murdoch> >wrote: >> >> > Vitalie Spinu wrote: >> > >> >> Hello Everyone! >> >&g

Re: [Rd] NULL assignment will change the expression's class into list

2010-10-08 Thread Vitalie Spinu
On Fri, Oct 8, 2010 at 12:14 PM, Duncan Murdoch wrote: > Vitalie Spinu wrote: > >> Hello Everyone! >> >> NULL replacement will change expression object into list: >> >> >> >>> te <- expression(a=23*4, b=33-2) >>> te >>> &

[Rd] NULL assignment will change the expression's class into list

2010-10-08 Thread Vitalie Spinu
Hello Everyone! NULL replacement will change expression object into list: > > te <- expression(a=23*4, b=33-2) > te expression(a = 23 * 4, b = 33 - 2) > te[["a"]] <- quote(blabla) #ok > te expression(a = blabla, b = 33 - 2) > te[["a"]] <- NULL #change to list > te $b 33 - 2 I am on w32, versio

Re: [Rd] lapply version with [ subseting - a suggestion

2010-09-21 Thread Vitalie Spinu
>> How about an argument to lapply which would specify the [ or [[ subseting >> to use >> in the splitting of the vector? >> Or may be a different set of functions lapply1, >> sapply1? >> >> > I'm not sure what you want exactly, but what about just using mapply over > the names and vector elements