search for: organovich

Displaying 17 results from an estimated 17 matches for "organovich".

Did you mean: ogranovich
2008 Jul 23
2
shQuote and cat
Dear R-users, It is my understanding that cat(shQuote(a.string)) should print the origintal a.string. Is this right? I am not sure cat() correctly prints strings which are generated by triple-shQuote(): > shQuote(shQuote("a")) [1] "\"\\\"a\\\"\"" > cat(shQuote(shQuote(shQuote("a"))), '\n')
2008 Jul 23
2
shQuote and cat
Dear R-users, It is my understanding that cat(shQuote(a.string)) should print the origintal a.string. Is this right? I am not sure cat() correctly prints strings which are generated by triple-shQuote(): > shQuote(shQuote("a")) [1] "\"\\\"a\\\"\"" > cat(shQuote(shQuote(shQuote("a"))), '\n')
2008 Oct 03
2
computing on expressions
Dear R-users, Suppose I have an expression: expr = expression(a>0) and now I want to modify it to expression(a>0 & b>0). The following doesn't work: expr = expression(expr & b>0) What would be a good way of doing this? Thanks, Vadim ________________________________ Note: This email is for the confidential use of the named addressee(s) only and may contain
2008 Mar 21
2
writintg wrappers around save()
Dear R-users, I am trying to write a wrapper function around save() that will report the file which is being saved to. So I thought that the followintg would do the trick, but it doesn't. I understand that 'y' is somehow not visible inside save.verbose, but don't know how to fix this. save.verbose <- function(..., file) { cat("save.verbose:", file, "\n")
2008 Mar 04
1
making array of lists
Dear R Users, Given two vectors, say a = seq(2) and b = seq(3), I want to make an 2*3 array, where (i,j) element is list(a=a[i], b=b[j]). I tried the outer() function but it generates an error message that I don't understand, see below. What do I do wrong? The expan.grid function is not good enough since I need a solution that works when a and b are not atomic, say a=list(list(x=1,
2008 Feb 15
0
crash in library(gbm) was: Rscript temp file
...39;0xc000020c'". Does anyone have an idea what that might mean? I am not able to reproduce it in controlled environment. This is Windows. Thanks, Vadim ________________________________________ From: r-devel-bounces at r-project.org [r-devel-bounces at r-project.org] On Behalf Of Vadim Organovich [vogranovich at jumptrading.com] Sent: Friday, February 15, 2008 2:29 PM To: r-devel at r-project.org Subject: [Rd] Rscript temp file Hi, It seems that Rscript creates a temporary file to store the commands passed with the -e option, under normal circumstances the temp file gets deleted at some...
2008 Feb 17
1
forcing gc() to do its work
Hi, At some points of my computations I want gc() to try really hard and collect as many objects as possible even though the triggering limits are not hit. Will it help if I temporarily set the limits to some small values, call gc() and then reset them back to their original values? What variables exactly need to be set? Does anyone have a prototype of such function? I tried to read the R help,
2008 Sep 04
1
lapply(NULL, ...) returns empty list
Dear R-devel, Is there a reason that lapply(NULL, ...) returns the empty list, rather than NULL? It seems intuitive to expect the latter, and rather counterintuitive that lapply(list(), ... ) returns the same value as lapply(NULL, ...). > lapply(list(), function(x) 1) list() > lapply(NULL, function(x) 1) list() > version _ platform i386-pc-mingw32 arch
2008 Apr 16
1
C++ complains abouct Rprintf signature
Dear R-devel, My g++ complains about the first argument to Rprintf being non-const char *. For example when compiling the line Rprintf("hello world\n"); the following warning is emitted: warning: deprecated conversion from string constant to 'char*' Is there a reason for the non-const? It is curious that Rf_error, which is similar to RPrintf, is const. If there is a need
2008 Aug 20
1
names of return value of median
Dear R-devel, The median() function assigns a name, "NA", to its return value if the return value is NA and the input vector has names, otherwise the names attribute is NULL. This looks strange and inconsistent with the behavior of mean(). This inconsistency becomes a problem when median() is used inside user code that relies on consistent naming convention. Thanks, Vadim > foo
2008 Feb 25
1
how to write dput-able objects
Hi, One way of doing object-oriented programming in R is to use function environment to hold object's data, see for example @Article{Rnews:Chambers+Lang:2001a, author = {John M. Chambers and Duncan Temple Lang}, title = {Object-Oriented Programming in {R}}, journal = {R News}, year = 2001, volume = 1, number = 3, pages = {17--19},
2008 Aug 15
1
stopifnot message mutation
Dear R-users, Could someone please explain why the message printed by function stopifnot2, see below, is different from that of stopifnot itself? Thank you for your help, Vadim > stopifnot2 <- function(...) stopifnot(...) > stopifnot(F) Error: F is not TRUE > stopifnot2(F) Error: ..1 is not TRUE > version _ platform i386-pc-mingw32 arch i386 os
2008 Feb 26
1
error loading library
Hi, I am debugging intermittent crashes of R that seem to happen when multiple R sessions nearly summaltaneously load same dll-based library. I have R and my libraries installed on a network drive (everything is Windows). The drive is visible from a farm of servers. I have an R script, foo.R, that just loads a dll-based library (to be precise it loads a library that requires a dll-based
2008 Aug 08
1
operating on arrays of unknown dimensionality
Dear R-users, I am looking for a way to assign to slices of arrays where dimensionality of the array is not a-priory known. Specifically, I would like to be able to generalize the following example of dimensionality 2 to an arbitrary diminsionality: In this example we create an array x, a smaller array y and then assign y to a slice of x. > dimnmx <- list(c('a','b'),
2008 Apr 14
1
clean-up actions after non-local exits
Dear R-devel, Some time ago I started a thread that boiled down to clean-up actions after non-local exits in R, see below. I wonder if there has been any progress on this? R-ext 2.6.1 doesn't say much on the subject. How, for example, do people deal with a situation where their C (C++) function opens a file and then receives a signal or longjump-s on error(), how do they make sure the
2008 Feb 15
0
Rscript temp file
Hi, It seems that Rscript creates a temporary file to store the commands passed with the -e option, under normal circumstances the temp file gets deleted at some point. Here is an example of a call I use: q:/R/R-2.6.1/bin/Rscript.exe -e ".libPaths(\"q:/R/vogranovich/library\"); params <- list(a=1); source(foo)" The temp files seem to be a problem when multiple jobs are
2008 Aug 20
0
row.names in data.frame with row.names NULL
Dear R-devel, It appears that data.frame ignores row.names=NULL argument if it can guess the names from the first column. This behavior seems to contradict what the help page says, see the last sentence: If row names are not supplied in the call to 'data.frame', the row names are taken from the first component that has suitable names, for example a named vector or a matrix