search for: mysize

Displaying 6 results from an estimated 6 matches for "mysize".

Did you mean: mysite
2011 Sep 08
2
Variable scoping question
I modified an example in the object.size help page to create a function I want to be able to run: "mysize" <- function() { z <- sapply(ls(), function(w) object.size(get(w))) as.matrix(rev(sort(z))[1:5]) } mysize() When I test the lines inside the function it works fine: > z <- sapply(ls(), function(w) object.size(get(w))) > as.matrix(rev(sort(z))[1:5])...
2010 Apr 13
1
Using object.size inside a function
...try to place it inside a function, I get an error (see below). I tried using sort.list and unlist, but I couldn't get it to work. I don't understand why the commands work by themselves but not in a function. Its probably a simple fix, can anyone enlighten me? Thanks, Roger. > "mysize" <- function() { + z <- sapply(ls(), function(x) object.size(get(x))) + as.matrix(rev(sort(z))[1:10]) + } > mysize() Error in sort.list(z) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list? > ************************************...
2007 May 12
0
How to Derive an S4 Class from a data.frame?
...arching for an answer for what I would think to be a common practice: Subclasses an S4 class from a data.frame. But have found very little. Here is some sample code that I've been trying: setClass("MyDataFrame", representation("data.frame", mysize = "numeric")) new("MyDataFrame", data.frame(col1 = c(1,2,3), col2 = c("four", "five", "six")), mysize = 12) When I run this in R 2.3.1(Windows XP) I get this > setClass("MyDataFrame", + representation...
2014 Jun 20
3
[LLVMdev] Passing specific register for an Instruction in target description files.
Hi all, I want to generate an assembly instruction for my target using target description representation of the instruction. The problem is that I want to add direct register to be chose as an output register for my target. Does it possible to do with an instruction definition in TARGETInstrInfo.td file? May be someone could help with an example? Currently I have seen that we can pass the name
2007 Oct 03
2
Change title size in plot(model)?
I want to use the plot(model) function to generate Tukey-anscomb and Q-Q plots of a lm(). I manage to change all labels but the main one which apparently is neither main or sub. So far I have tried as par setting: cex (changes symbol size within the plot), cex.main (no effect), cex.sub (no effect) cex.lab (changes label size), cex.axis (changes axis label size). What I would like to change is the
2014 Jul 02
2
[LLVMdev] Passing specific register for an Instruction in target description files.
...you want your instruction to define a specific register. > If yes, you can achieve this by creating a specialized singleton register class with the register you want and use it in the td file. > E.g., in yourTargetRegisterInfo.td: > def MyReg : RegisterClass<“MyTarget”, [Related Types], MySize, (add MyReg)>; > > in yourTargetInstrInfo.td: > def MyInstr […] (outs MyReg:$Rd) […] > > The ARM target does something similar for SP. Look for GPRsp. > If you use this approach, you may run into issues if the scheduler decides to put two instructions that write to this reg...