Displaying 20 results from an estimated 9000 matches similar to: "Namespace support?"
2003 Jan 08
1
"methods" package changes class types?
Hi,
Loading the "methods" package into R seems to change the class of a
character vector from NULL to "character":
> class("abcd")
NULL
> library("methods")
> class("abcd")
[1] "character"
This can lead to problems. For example the "as.string" function in the
"xtable" package
assumes that the class of a
2006 Apr 07
2
has_one not using the pk?
Hello,
im trying to wrap a fairly ugly legacy schema using AR. How to handle
normalized informations which aren''t connected via the pk?
create table what (
myid int,
myclass int, ;; references blahclass.blahid
mygender int
)
create table blahclass (
blahid int,
mdesc1 text,
fdesc1 text)
)
I would like to wrap this as
class What < AR::Base
has_one :blahclass
class
2002 Jul 19
1
Rprof and setMethod conflict?
I noticed this oddity about R profiling and setMethod.
First, I "test out" Rprof.
> require(methods)
Loading required package: methods
[1] TRUE
>
> Rprof("test.out")
> data.frame("a")
X.a.
1 a
> Rprof(NULL)
So far, so good. Next, I define myClass.
> setClass("myClass", representation(mySlot = "numeric"))
[1]
2020 May 12
4
S3 method dispatch for methods in local environments
Dear All,
In R 3.6.3 (and earlier), method dispatch used to work for methods stored in local environments that are attached to the search path. For example:
myfun <- function(y) {
out <- list(y=y)
class(out) <- "myclass"
return(out)
}
print.myclass <- function(x, ...) print(formatC(x$y, format="f", digits=5))
myfun(1:4)
# prints: [1]
2003 Oct 02
1
"[[<-","[[" default?
Hi!
I have implemented class specific behaviour of "[[<-.myclass"<-function().
How it is posible to call the "[[.default" on an object of myclass?
Eryk
Dipl. bio-chem. Eryk Witold Wolski @ MPI-MG Dep. Vertebrate Genomics
Ihnestrasse 73 14195 Berlin 'v'
tel: 0049-30-84131285 / \
mail: wolski@molgen.mpg.de ---W-W----
2008 Apr 22
1
graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC
Following my previous post on S3 method despatch, I put debug messages
in the code of Axis, Axis.default and plot.default in graphics/R/axis.R
and graphics/R/plot.R to print the class of x, at and y on plot. After
recompiling R, what I see is that x *lost* its class attribute (at least
for classes not known to 'graphics') in Axis, called directly from
plot.default and this could be the
2010 Jun 13
1
S4 classes and S3 generic functions
A general goal for the next version of R is to make S4 and S3 play
better together.
As mentioned in a previous thread, one limitation has been that S3
generic functions, specifically the UseMethod() call, did not make use
of S4 inheritance when dispatching on general S4 objects.
This has been fixed in a version committed today (updated to rev 52267).
The code change is not large, but it
2012 Jun 13
2
[LLVMdev] llvm-mc problem after a pass
Hi,
I'm having some problem with llvm-mc on a program after applying a pass:
../../../build/Release+Asserts/bin/clang -emit-llvm -c -I./testprof/ -I./src/headers/ -I../libtommath-0.42.0/ -Wall -Wsign-compare -W -Wshadow -Wno-unused-parameter -DLTC_SOURCE -O0 -DLTC_NO_ASM -DUSE_LTM -DLTM_DESC -o src/pk/asn1/der/sequence/der_encode_sequence_ex.bc
2009 May 17
3
build CONTENTS or 00Index.html without installing whole package
To maintain my R site, I'm trying to install html help files only, but
also keep track of the version (with DESCRIPTION). I have the
following bash script, which works except for 00Index.html. That is
not a huge problem because the help files are still searchable, but
I'd like to fix it.
A long time ago I asked the same question, and Brian Ripley said to
use --index as an option to
2008 Jul 14
3
Loop problem
Dear all,
I want to
write ck<-cbind(rep(pk[1,1],4),rep(pk[1,2],4),rep(pk[1,3],4)) state ment
in a loop . How can I write it ?
> pk
[,1] [,2] [,3]
[1,] -1.1354816 0.9808877 -0.9446314
[2,] 0.7787378 0.4536944 0.3204882
[3,] -1.7274907 1.5112011 1.4481839
[4,] 1.0629145 0.5976109 -0.5277638
> pk<-matrix(rnorm(12),nrow=4,ncol=3)
> pk
2012 Jun 13
0
[LLVMdev] llvm-mc problem after a pass
Something is adding a bogus comment string. Specifically " # %case^M18 ", where "^M" is a single ctrl-M character.
The ^M is seen by the asm parser as an end-of-line, so the '18' is a new token at the start of a line, not part of the comment. Is your pass perhaps using label names which might include literal "^M" characters?
-Jim
On Jun 13, 2012, at
2004 May 17
1
Clock skew and net ads join problem
HI,
when i try to execute the kinit command on my Red
hat 9 system with samba 3 i get the following error
[root@niit125 root]# kinit junaid@NIIT.EDU.PK
Password for junaid@NIIT.EDU.PK:
kinit(v5): Clock skew too great while getting initial
credentials
so how do i solve the clock skew problem cause i have
checked the time on both of them it is the same.
the net ads join command doesnt
2012 Jan 03
1
Error when using foreach package for parralelization
Hi,
i tried to find the answer but didn't so my apologies if the question is
obvious !
I'm trying to parallelize the following R code :
pk2test =
c(1:16,(12*16+1):(12*16+16),(16*16+1):(16*16+16),(20*16+1):(20*16+16))
score.mat = matrix(nc=16*4,nr=16*4)
for(i in 1:(16*4)) {
for(j in i:(16*4)) {
score.mat[i,j] = score.mat[j,i] =
2005 Sep 01
1
generic function S3 consistency warning advice
Hi
section 6.1 of R-exts suggests that a package can take over a
function in the base
package and make it generic.
I want to do this with Re() and have the following lines in my R code:
"Re" <- function(x){UseMethod("Re" )}
"Re.default" <- get("Re" ,pos=NULL,mode="function")
"Re.octonion" <- function(x){give.comp(x,1)}
2006 May 09
1
2.3.0 problems
Hi,
Since the installation of R-2.3.0 I have the following problems:
1. Startup
.First() produces
------------------
Started in /home/woodstock/hoffmann/Projects/RtoZ/Windwurf/R with
'~/R/.Rprofile' edited on 2006-04-28, 11:08
During startup - Warning messages:
1: use of NULL environment is deprecated
2: use of NULL environment is deprecated
3: use of NULL environment is
2007 Nov 22
2
Active Record Question
hey!
I have the following table structure in my DB
| users |
------------
| (pk)id |
| username |
| pass |
------------
(1:n)
| users_objects | | objectattributes |
------------------ ----------------------------------
| (fk,pk)user_id | (1:n) | (pk)attribute |
|(fk,pk)object_id| | (pk,fk)
2002 Jul 04
1
doubt about DF in survival model
Hi all,
I have this,
Weibull distribution
n= 1000
> anova(pk.m0)
Df Deviance Resid. Df -2*LL P(>|Chi|)
NULL NA NA 999 1451.31 NA
> anova(pk.m0,pk.m1)
Terms Resid. Df -2*LL Test Df Deviance P(>|Chi|)
1 1 998 1451.310 NA NA NA
2 seed 996 1229.714 2 221.59557 7.605594e-49
With
2010 May 17
2
best polynomial approximation
Dear R-users,
I learned today that there exists an interesting topic in numerical
analysis names "best polynomial approximation" (BSA). Given a function
f the BSA of degree k, say pk, is the polynomial such that
pk=arginf sup(|f-pk|)
Although given some regularity condition of f, pk is unique, pk IS NOT
calculated with least square. A quick google tour show a rich field of
research
2006 Jun 30
4
ActiveRecord Migrations, without autonumbered PK''s
I love using ActiveRecord Migrations to build tables.
Sometimes, I don''t want to use autogenerated PK''s - I want to set them
automatically (why? I''m importing read only data from a large list of
medications, and want to use the PK''s assigned by the medication
research company...). Is there anyway to do this using Migrations? I
know that I don''t
2009 Mar 09
3
multiple columns primary key
Hi all,
I have two tables:
TABLE 1
A pk - fk (referencesc TABLE 2)
B pk
C pk
D pk
E
F
TABLE 2
A pk
G
H
I
L
I don''t use incremental field (id). I''d like don''t use find_by_sql.
How can I define both models to use correctly find method (with
include)? With only one column primary key I haven''t problems.
I thought two solutions, but I don''t like these