Displaying 20 results from an estimated 1000 matches similar to: "Is there a diferent way to do this?"
2004 Dec 28
4
Developing R classes
Hi,
I´m trying to write some R classes but I din´t find documentation enought to develop them. I read there is 2 ways to write classes, using S3 ou S4 models. And it seems that S4 is the best model, so I thing I should use this one.
I´m new user of R and I´m searched on the net some information about creating new classes. I found this document:
2007 Mar 30
2
Replacing slot of S4 class in method of S4 class?
Dear all,
Assume that I have an S4 class "MyClass" with a slot "myname", which
is initialized to: myname="" in method("initialize"):
myclass <- new("MyClass", myname="")
Assume that class "MyClass" has a method "mymethod":
"mymethod.MyClass" <-
function(object, myname=character(0), ...) {
2004 Nov 06
1
Some Tips about developing an interface.
Hi.
I just started studing R language and I saw there is a package to develop
user interface called tcltk. I read about it and I made some tests but I
found it a little poor and slow.. I was thinking if is possible to write a
user interface using java and ask to R to run all the maths I have and R
returns all the results, including graphs.
If someone has any suggestions to me I will appreciate,
2010 Jun 09
3
How to add a new plot in the same graph using add=T at the command plot?
Hi, there!
I'm having kind this same problem
https://stat.ethz.ch/pipermail/r-help/2008-October/178221.html
but I want to display another plot of my data, which is a point with two
arrows indicating confidence interval, in the same graph that I've just
plotted another, but the "add=T" is not functioning, I'm getting the same
error
Warning messages:
1: In plot.window(...)
2019 Apr 04
2
single-threaded code-gen and how to make it support multi-thread
Hi llvm-dev,
Our code base has a ancient copy of llvm (ver 3.5.1), and it uses the LLVM
code gen for some domain-specific language.
The previous dev left a global lock around the usage of LLVM code gen
stating that because LLVM code gen can only be accessed single-threaded it
needs to be protected with this global lock.
But now this lock has caused some perf issues as we pretty much lose
2019 Apr 04
2
single-threaded code-gen and how to make it support multi-thread
Thank you Johannes, I looked it up and it seems that we're creating one
LLVMContext per compilation "unit", not sure if that matters. i.e. there's
no single globally shared LLVMContext object.
Is LLVMContext *the* concurrency isolation (or unit) here?
On Wed, Apr 3, 2019 at 6:34 PM Doerfert, Johannes <jdoerfert at anl.gov> wrote:
> Do you use one llvm context or one
2013 Sep 05
12
[PATCH 0/5] Memory leaks amended
Memory leaks found by the tool--valgrind along with static reviewing.
Based on Daivd''s branch ''integration-20130903''.
Gui Hecheng (5):
btrfs-progs:free local variable buf upon unsuccessful returns
btrfs-progs:local variable memory freed
btrfs-progs: missing tree-freeing statements added
btrfs-progs:free the local list pending_list in btrfs_scan_one_dir
2011 Dec 09
1
'callNextMethod' in a '[<-' function does not work ?
Hi the list,
I try to use callNextMethod in a setteur ([<-) but it does not work.
Any raison ?
Any other option ?
--- 8< ------------------
### Class B0 ###
setClass("B0" , representation(b0 = "numeric"))
setReplaceMethod("[","B0",function(x,i,j,value){x at b0 <- -value})
a <- new("B0")
a at b0 <- 3
a
a["b0"] <- 3
a
2007 May 25
1
Question about setReplaceMethod
Hi
I have the code like I show below. The problem here is that I have a setReplacementMethod to set the value of my class slot. However, this function doesn't work when I call it within another function definition (declared by setMethod) of the same class. I do not understand this behavior that much. I'm wondering how to make this work? Any help would be really appreciated. Thank you.
2017 Jun 23
1
setReplaceMethod creates 'object' in the userworkspace
Hi,
I recognized that the function 'setReplaceMethod' is creating a
character vector in the user workspace having the name (e.g. "newClass")
of the class used as value. If you can sort out a mistake by myself, I
would like you to file a bug report.
BBFN,
Jonathan
setClass("newClass", representation(value="numeric"))
setMethod(f = "initialize",
2017 Jun 23
1
setReplaceMethod creates 'object' in the userworkspace
Hi,
I recognized that the function 'setReplaceMethod' is creating a
character vector in the user workspace having the name (e.g. "newClass")
of the class used as value. If you can sort out a mistake by myself, I
would like you to file a bug report.
BBFN,
Jonathan
setClass("newClass", representation(value="numeric"))
setMethod(f = "initialize",
2006 Oct 31
1
setReplaceMethod
Hi
If x <- 1:10 then x[5] <- 1i will promote
x to be a complex vector.
Suppose I have an S4 class "brob", and have functions
is.brob(), as.brob(), as.numeric() and so forth (minimal self-contained
code below).
If x is numeric (1:10, say) and y is a brob, what
is the best way to make
x[5] <- y
promote x to a brob in the same way as the complex example?
Or is
2006 May 07
2
[LLVMdev] The Next Win32 File System Problem
Fixing one bug uncovers the next one...
To reproduce:
llvm-ar rc ./libgcc.a libgcc/./_muldi3.o <and-lots-more-.o-files...>
The result:
C:\msys\1.0\home\llvm_home\install\bin\llvm-ar.exe: Can't move './libgcc.a-000003' to './libgcc.a-000002': Cannot create a file when that file already exists.
So apparently, we're trying to move one file on top of another.
The
2023 Jul 26
2
Rename Computer on Domain
I can report that the computer renaming worked.
As it turned out, only the cn was incorrect ...
ldbsearch -H ldap://DC1 -UAdministrator 'CN=DT06'
dn: CN=DT06,OU=Desktops,OU=Computers,DC=domain,DC=com
objectClass: computer
cn: DT06
operatingSystem: Windows 10 Pro
displayName: WH23$
sAMAccountName: WH23$
... so a simple LDAP rename worked ...
ldbrename -H ldap://DC1 -UAdministrator
2003 May 23
1
isSeekable returns F on seekable file
Hi,
Seems that on RWin 1.7.0 and 1.6.2 isSeekable returns F on binary files,
while seek() works as expected on the same connection - see example below:
> con = file(nm, "rb")
> isSeekable(con)
[1] FALSE
> readBin(con, double(), 10)
[1] 7.263824e-317 5.968155e-317 2.340685e-317 2.734062e-312
4.088386e-312 4.670335e-317
[7] 6.097545e-317 3.396341e-312 6.615484e-317
2010 Oct 13
4
Change global env variables from within a function
Hi,
I've looked all over for a solution to this, but haven't had much look
in specifying what I want to do with appropriate search terms. Thus I'm
turning to R-help.
In the process of trying to write a simple function to rename individual
column names in a data frame, I ran into the following problem: When I
rename the columns within my function, I can't seem to get it to
2005 Jan 14
1
RE: [R] as.character methods
Thank you for your replies. I greatly appreciate the wealth of
documentation on this subject and the time spent by the John Chambers
and the R Core Team making object-orient programming in R a reality. I
hope to be able to give code (not just bug reports) back to the R
community as my projects advance.
I hoping to generalize my as.character question to a real-life
as.character / print method
2003 Jul 26
2
How to make "<-" generic?
Hi,
perhaps a little bit unusual: is it possible to use "<- " as generic function
with a new signature?
The following example doesn't work:
> isGeneric("<-")
[1] FALSE
> setClass("A",representation(x = "numeric"))
[1] "A"
> setClass("B",representation(x = "numeric"))
[1] "B"
> myAssign.A <-
2006 May 07
0
[LLVMdev] The Next Win32 File System Problem
Yep, you found another bug. Unlike Unix, Windows does not allow a file
to be implicitly replaced via renaming. I'll fix it.
Greg Pettyjohn wrote:
> Fixing one bug uncovers the next one...
>
> To reproduce:
> llvm-ar rc ./libgcc.a libgcc/./_muldi3.o <and-lots-more-.o-files...>
>
> The result:
> C:\msys\1.0\home\llvm_home\install\bin\llvm-ar.exe: Can't move
2011 Sep 29
1
documenting a behavior of adding named item to a list
Folks,
Per a post to StackOverflow, I'm looking for an opinion on whether something
should be documented:
When adding a named item to a list, its guaranteed that the item will be
added to the end of the list.
SO post:
http://stackoverflow.com/questions/7599349/adding-named-item-to-list-guaranteed-to-append-to-end-of-list/7599610#7599610
This is my first email to r-devel, so I hope this is