Displaying 20 results from an estimated 800 matches similar to: "binary to R object"
2005 Jul 19
2
Obtaining argument name within a function
Dear all
How can I obtain the name of the argument passed in a function? Here is a
simplistic example of what I would like to obtain:
myfunction= function(name) {
print(paste("The parameter name was",unknownFunction(name))
}
myfunction(myobject)
[1] "The parameter name was myobject"
Thanks
Francisco
2018 May 07
0
Comparing figures?
I suggest perceptual diff. You could write a wrapper around it.
http://pdiff.sourceforge.net
On Mon, 7 May 2018 16:49 Ramiro Barrantes, <ramiro at precisionbioassay.com>
wrote:
> Hello,
>
> I am working on tests to compare figures. I have been using ImageMagick,
> which creates a figure signature, and I can compare a "test" figure
> signature against a saved
2018 May 07
2
Comparing figures?
Hello,
I am working on tests to compare figures. I have been using ImageMagick, which creates a figure signature, and I can compare a "test" figure signature against a saved "reference" figure signature. It seems to work pretty well. However, it is slow as it requires reading from the file system.
Are there any options to compare figures on memory? For example, if I
2017 Aug 08
1
Bug?
Hello,
In my code I found something that looks like an anomaly, I found a reproducible example in which I am just trying to compare each row in a data frame against the first row:
a<-data.frame(row=c("B","C","B"),column=c(2,2,10),assay=c("Assay1","Assay1","Assay1"),plate=c(1,1,1),stringsAsFactors=FALSE)
apply(a[1:2,],1,function(x) {
2013 Jan 09
5
R encrypt/decrypt
Hello,
I am working on a web system (php) that uses R in the backend, and we need some basic fast encryption/decryption for the underlying mysql database that can be used by both R AND php. It does not need to be top-of-the-line, but just provide some basic level of fast encryption/decryption.
Any suggestions?
Thank you,
Ramiro
[[alternative HTML version deleted]]
2012 Mar 15
2
Timer on a function
Hello,
I have a program that consists of a loop fitting a function over many models. Sometimes the fitting on a particular model takes minutes to converge. Is there a way that I can limit the amount of time that R spends on a given model:
say if my line is:
fittingFunction( func, model.1)
can I have some function:
stopIfUnderTime( fittingFunction( func, model.1) , 5 )
where
1997 Jul 25
0
R-alpha: Treatment of seed
There is a difference between R and S (or S-Plus, I'm not sure about
that) concerning the generation of random numbers.
If an error occurs during the execution of a function, the seed is
restored to its old value in S-Plus, but not in R. This feature of S-Plus
has just turned out to be very useful for me because I got an error
message during a small simulation for a certain choice of
2018 Jan 30
0
withTimeout bug, it does not work properly with nlme anymore
>>>>> Ramiro Barrantes <ramiro at precisionbioassay.com>
>>>>> on Mon, 27 Nov 2017 21:02:52 +0000 writes:
> Hello, I was relying on withTimeout (from R.utils) to help
> me stop nlme when it ?hangs?. However, recently this
> stopped working. I am pasting a reproducible example
> below: withTimeout should stop nlme after 10
2012 Nov 25
0
Problema de compilacion con Rcpp
Hola,
necesito compilar un programa de tipo source (Rstan) con c++
La propia web del programa indica como hacerlo con Rcpp. Sin embargo no
consigo que funcione Rcpp ni con un ejemplo básico.
He seguido las instrucciones que vienen en
http://tonybreyal.wordpress.com/2011/12/07/installing-rcpp-on-windows-7-for-r-and-c-integration/
Tengo instalado Rtools y los paths correspondientes, pero no
2012 Aug 01
3
Best Programming Practices regarding data frames
Hello,
I come from using different programming languages (C++, Mathematica, Perl) but have been using R extensively for several months. I see the data frame as a key piece of the language and wanted to inquire people's experience regarding its use.
Say you have a data frame D
D <- data.frame(some columns)
and you define a function that needs the information from this data frame and is
2012 May 03
1
Setting up a windows system for rcpp
I am running into a wall getting my system to work with rcpp and inline.
Following Dirk's advice on stackoverflow, I hope someone is able to help
me.
My steps were to install MinGW 32 bit first, then installing Rtools, I
disabled MinGW's entry in the PATH.
I am trying to get the following code to work:
library(Rcpp)
library(inline)
body <- '
NumericVector xx(x);
return wrap(
2012 Jan 16
3
Using Sweave to generate multiple documents
Hello,
I tried looking for a Sweave-specific list but didn't find one, nor did I find an answer via google, so will send this question to the general R list. Please feel free to point me in the right direction.
I am using Sweave and would like to have a single .Rnw document that generates 1) a summary report, 2) a full report, 3) slides for a talk. I think my material lends itself to have
2017 Nov 27
2
withTimeout bug, it does not work properly with nlme anymore
Hello,
I was relying on withTimeout (from R.utils) to help me stop nlme when it ?hangs?. However, recently this stopped working. I am pasting a reproducible example below: withTimeout should stop nlme after 10 seconds but the code will generate data for which nlme does not converge (or takes too long) and withTimeout does not stop it. I tried this both on a linux (64 bit, CentOS 7, R 3.4.1,
2012 Apr 03
1
Nlme not working on very similar initial values
Hello,
I am using CentOS Linux 6.0, R 2.14.1 and nlme 3.1-103
I am trying to fit some models using nlme, and what was happening was that it would get to some datasets and just "stall", the memory usage would grow and grow and eventually crash.
I looked carefully into one of the datasets and ran it separately. It worked. After narrowing down on all possibilities, I found that the main
2018 Nov 08
0
error unserializing ascii format (v2 or v3)
I see this on MacOS as well, so likely not platform dependent.
A little more diddling to try to narrow it down:
> unserialize(serialize(as.raw(1), NULL, version=2, ascii=TRUE))
[1] 30
> unserialize(serialize(list(as.raw(1)), NULL, version=2, ascii=TRUE))
[[1]]
[1] 30
> unserialize(serialize(list(raw=as.raw(1)), NULL, version=2, ascii=TRUE))
Error in unserialize(serialize(list(raw =
2013 Aug 28
1
Error when using buildVignettes()
Dear all,
When running function 'testQAReport()', which uses function
'buildVignettes()' to create a pdf-file I get the following error:
> source("testQAReport.R")
> testQAReport()
Error in .get_package_metadata(pkgdir) :
Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.
Since I did not get this error in earlier versions of R, could you
2020 Oct 29
0
[External] Something is wrong with the unserialize function
Thanks for the report. Will look into it when I get a chance unless
someone else gets there first.
A simpler reprex:
## create and serialize a memmory-mapped file object
filePath <- "x.dat"
con <- file(filePath, "wrb")
writeBin(rep(0.0,10),con)
close(con)
library(simplemmap)
x <- mmap(filePath, "double")
saveRDS(x, file = "x.Rds")
## in a
2011 Dec 06
1
unserialize and eager execution
Hi,
While debugging a network server I'm developing I noticed something unusual
- call to unserialize() resulted in
an error about loading a namespace.
I was a bit taken back by this - why should unserializing an object cause a
namespace lookup?
Are there any other side-effects of unserialize() that I should be cautious
about? I've been
digging through the R_Unserialize() call, I
2018 Jun 21
1
DOCUMENTATION(?): parallel::mcparallel() gives various types of "Error in unserialize(r) : ..." errors if value is of type raw
I stumbled upon the following:
f <- parallel::mcparallel(raw(0L))
parallel::mccollect(f)
# $`77083`
# NULL
but
f <- parallel::mcparallel(raw(1L))
parallel::mccollect(f)
# Error in unserialize(r) : read error
traceback()
# 2: unserialize(r)
# 1: parallel::mccollect(f)
(restarting because the above appears to corrupt the R session)
f <- parallel::mcparallel(raw(2L))
2020 Oct 29
0
[External] Something is wrong with the unserialize function
I found that also; fixed in r79386 in the trunk. Will port to R-patched
shortly.
Best,
luke
On Thu, 29 Oct 2020, Martin Morgan wrote:
> This
>
> Index: src/main/altrep.c
> ===================================================================
> --- src/main/altrep.c (revision 79385)
> +++ src/main/altrep.c (working copy)
> @@ -275,10 +275,11 @@
> SEXP psym =