similar to: Memory address of character datatype

Displaying 20 results from an estimated 5000 matches similar to: "Memory address of character datatype"

2017 Nov 12
2
Array changing address unexpectedly
Hi, Given the following R code: library(pryr) data <- array(dim = c(5)) for(x in 1:5) { data[x] <- as.integer(x * 2) } add = address(data) # save address of "data" for(x in 1:5) { data[x] <- as.integer(0) } if (add == address(data)) { print("Address did not change") }
2017 Nov 12
1
Array changing address unexpectedly
Hi David, ? Thanks for the correction concerning the "else" issue. ? Taking your code and removing some lines (to increase readability): ? library(pryr) ? data <- array(dim = c(5)) for(x in 1:5) { ?? data[x] <- as.integer(x * 2) } ? #print(data) ? add = address(data) for(x in 1:5) { ?? data[x] <- as.integer(0) } ? if (add == address(data)) { print("Address did not
2017 Nov 02
0
Memory address of character datatype
If you were curious about the hidden details of the memory layout in R, the best reference is the source code. In your example, you are not getting to your string because there is one more pointer in the way, "x" is a vector of strings, each string is represented by a pointer. At C level, there is an API for getting an address of the value, e.g. INTEGER(x) or CHAR(STRING_ELT(x)). At
2017 Sep 08
1
Change of variable address due to GC
Hi, ? I would like to know if the Garbage Collector (GC) changes the address of a variable in R. In other words, assuming the following code: ? ??? ? library(pryr) ? ? ??? x <- 1:1024 ? ??? ? addr <- address(x)? # save address of variable "x" in "addr" ??????? ? . ?? ????? ? . ???? ??? ? . ????? (execution of operations that create/destroy many small/big
2020 Mar 27
1
object.size vs lobstr::obj_size
On 3/27/20 15:19, Hadley Wickham wrote: > > > On Fri, Mar 27, 2020 at 4:01 PM Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > > > On 3/27/20 12:00, Hadley Wickham wrote: > > > > > > On Fri, Mar 27, 2020 at 10:39 AM Herv? Pag?s > <hpages at fredhutch.org <mailto:hpages at
2017 Nov 12
0
Array changing address unexpectedly
> On Nov 12, 2017, at 8:47 AM, lille stor <lille.stor at gmx.com> wrote: > > Hi, > > Given the following R code: > > library(pryr) > > data <- array(dim = c(5)) > > for(x in 1:5) > { > data[x] <- as.integer(x * 2) > } > > add = address(data) # save address of "data" > > for(x in
2020 Jan 09
6
Get memory address of an R data frame
Hello, I would like for my C function to be able to manipulate some values stored in an R data frame. To achieve this, a need the (real) memory address where the R data frame stores its data (hopefully in a contiguous way). Then, from R, I call the C function and passing this memory address as a parameter. The question: how can we get the memory address of the R data frame? Thank you! L.
2020 Mar 27
2
object.size vs lobstr::obj_size
On 3/27/20 12:00, Hadley Wickham wrote: > > > On Fri, Mar 27, 2020 at 10:39 AM Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > Hi Tomas, > > On 3/27/20 07:01, Tomas Kalibera wrote: > > they provide an over-approximation > > They can also provide an "under-approximation" (to say the
2017 Sep 19
3
R and Visual Studio
Hi, ? I am trying to build R using Visual Studio 2010 but without success. My question is if it possible build?R with this compiler anyway? ? If not, could someone please tell how to link one's C code against both the static and shared libraries of R for Windows (that comes from the official website found here https://cran.r-project.org/mirrors.html)? ? Thank you!
2019 May 08
2
ALTREP: Design concept of alternative string
Hello from Bioconductor, I'm developing a package to share R objects across clusters using boost library. The concept is similar to mmap package: https://cran.r-project.org/web/packages/mmap/index.html . However, I have a problem when I was trying to write Dataptr_method for the alternative string. Based on my understanding, the return value of the Dataptr_method function should be a vector
2019 May 10
2
ALTREP: Design concept of alternative string
Hi Gabriel, Thanks for your explanation, I totally understand that it is almost impossible to change the data structure of STRSXP. However, what I'm proposing is not about changing the internal representation, but rather about how we design and use the ALTREP API. I might do not state the workarounds clearly as English is not my first language. Please let me explain them again in detail.
2018 May 13
1
different type of modification when code is sourced and pasted
Dear all, I have a question about R's modification in place and replacement functions. I was working through Hadley Wickham's Advanced R section on Replacement Functions and in a file (say test.R) I wrote: `second<-` <- function(x, value) { x[2] <- value x } x <- 1:10 second(x) <- 5L print(x) library(pryr) x <- 1:10 print(address(x)) second(x) <- 6L
2020 Jan 09
1
Get memory address of an R data frame
On 1/9/20 06:56, Stepan wrote: > On 09. 01. 20 15:41, lille stor wrote: > >> I believe this could be done without creating side effects (e.g. >> crash) as we are just talking about changing values. A crash would certainly be an annoying "side effect" ;-) As Stepan explained, data.frame objects like most objects in R should never be modified in-place. If you're
2017 Jun 12
2
Possible with enableJIT function
In this email to the R-help list: https://stat.ethz.ch/pipermail/r-help/2017-June/447474.html and in this question on Stackoverflow: https://stackoverflow.com/questions/44486643/nleqslv-memory-use-in-r Andrew Leach has raised a question about the memory usage of my package nleqslv. In a model with a loop within a function he has experienced continuously increasing memory usage by package nleqslv
2012 Dec 12
2
[LLVMdev] donot support uint datatype?
hi guys, i use clang to compile a program with datatype uint, but i get errors saying " use of undeclared identifier 'uint'; did you mean 'int'? ". it really doesn't support it? if true, how can i add a datatype? -- View this message in context: http://llvm.1065342.n5.nabble.com/donot-support-uint-datatype-tp52523.html Sent from the LLVM - Dev mailing list archive
2006 May 22
3
Using the MySQL SET datatype
Does anyone have any links to example code showing how to use the MySQL SET datatype in my ActiveRecord objects. -- Posted via http://www.ruby-forum.com/.
2008 Feb 26
5
Rails 2.0.2 MySQL 'year' datatype missing from ActiveRecord?
Hi all, This is my first post to the forum, and I''ll point out right away that I''m a noob to everything, Ruby, Rails, MySQL, etc., so I expect that I''m wrong here, but is the ''year'' datatype missing from ActiveRecord in 2.0.2? According to my MySQL 5.0 reference manual, ''year'' is a datatype, but when I try to run a migration that has
2012 Dec 12
0
[LLVMdev] donot support uint datatype?
Hi Chen, On Tue, Dec 11, 2012 at 04:37:20PM -0800, Dong Chen wrote: > hi guys, > i use clang to compile a program with datatype uint, but i get errors saying > " use of undeclared identifier 'uint'; did you mean 'int'? ". > > it really doesn't support it? if true, how can i add a datatype? clang related question should go to cfe-dev at cs.uiuc.edu
2006 Aug 15
1
Interval datatype in migrations
How can I use an interval datatype inside migrations ? execute ? TIA, ngw -- Nicholas Wieland nicholas_wieland@yahoo.it -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060815/1c262694/attachment.html
2012 Dec 12
2
[LLVMdev] donot support uint datatype?
hi Wei-Ren, i got it, i have to add a "typedef int uint;" that's not a big problem thank you -- View this message in context: http://llvm.1065342.n5.nabble.com/donot-support-uint-datatype-tp52523p52528.html Sent from the LLVM - Dev mailing list archive at Nabble.com.