Displaying 20 results from an estimated 2000 matches similar to: "Linked List in R"
2011 Feb 12
0
Fw: Re: Linked List in R
--- On Sun, 13/2/11, Shing Hing Man <matmsh at yahoo.com> wrote:
> From: Shing Hing Man <matmsh at yahoo.com>
> Subject: Re: [R] Linked List in R
> To: "Martin Morgan" <mtmorgan at fhcrc.org>
> Date: Sunday, 13 February, 2011, 4:49
> Hi Martin,
> ? Thanks for the pointer ! It seems quite involved to
> create a
> a linked list in the oo way. I
2005 Feb 03
3
Reading Dates in a csv File
Hi all. I'm reading in a flat, comma-delimited flat file using read.csv.
It works marvelously for the most part. I am using the colClasses argument
to, basically, create numeric, factor and character classes for the columns
I'm reading in. However, a couple of the fields in the file are date
fields. I'm fully aware that POSIXct can be used as a class, however the
field must obey,
2009 Oct 05
6
Date-Time-Stamp input method for user-specific formats
Date-Time-Stamp input method to correctly interpret user-specific
formats:coding is 90% there - based on exmple at
http://tolstoy.newcastle.edu.au/R/help/05/02/12003.html
...anyone got the last 10% please?
CONTEXT:
Data is received where one of the columns is a datetimestamp. At midnight,
the value represented as text in this column consists of just the date part,
e.g.
2013 Mar 13
1
removing union class
Hi,
I get the following error when trying to remove a union class:
> setClassUnion('a', c('matrix', 'numeric'))
> removeClass('a')
> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: i686-pc-linux-gnu (32-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8
2009 Oct 26
1
How to browse all the functions in a package?
'?removeClass' shows that 'removeClass' is from package
'package:methods'. Is there a command which can show me all the
functions and the classed defined in a package such as
'package:methods'?
2005 Sep 01
4
Linux Standalone Server Suggestions for R
Hi All,
My group is looking for any suggestions on what to purchase to
achieve the most powerful number crunching system that $50k can buy.
The main application that will be used is R so input on what hardware
benefits R most will be appreciated. The requirements are that it be
a single standalone server (i.e. not a cluster solution), and it that
must be able to run unix/linux. If
2017 Jul 09
2
rsyslog stops logging on service reload?
I have multiple servers running stock CentOS 7 rsyslog 7.4.7-16.el7,
which are configured to log locally and over TCP to a remote logserver,
also running stock CentOS 7 rsyslog. The remote server uses imptcp to
receive, and pretty basic rules to parse and commit to disk.
I have several systems that log prolifically, but periodically, they
stop soon after the remote log server HUPs (daily
2011 May 26
0
Reference Classes: strange behavior when trying to change class def in the same R session
Dear list,
I'm getting some strange behavior with Reference Classes every once in a
while and I can't really put my finger on the cause. It'd be great if
someone using Reference Classes could check if he/she experiences
similar problems:
The thing is that when I alter the definition of a Reference Class in a
running R session and source the respective file containing the class
2018 May 02
8
Converting a list to a data frame
I suspect this is pretty easy, but I'm having trouble figuring it out.
Basically, I have a list of data frames such as the following example:
list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8))
I would like to turn this into data frame where the list elements are
essentially rbind'ed together and the element name becomes a new
variable. For example, I would like to turn the
2018 May 04
2
Converting a list to a data frame
Good morning.
Novice usR. Here.
I am following this string, among many, learning as I go.
Quick question please?
I thought that perhaps ata.frame was part of the zoo pkg, b/c when I searched it came up in help?
However, evidently not or I am not using it properly.
Please advise, thank you.
x <- list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8))
x2 <- do.call(rbind,
2020 Oct 05
2
S4 - inheritance changed by order of setClassUnion and setAs()
Dear colleagues,
there is a behaviour with S4 (virtual) classes that I find very hard to understand: Depending on the position
of setAs(), the tree of inheritance changes.
This is my baseline example that defines the classes "grandma", "mother", "daughter" and a virtual
class "mr_x". For a new instance if "daughter", "mr_x" is betweeen
2018 May 02
0
Converting a list to a data frame
Hi Kevin,
There is probably a better way, but it can be done in two steps like this
temp <- list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8))
temp <- lapply(names(temp), function(n, temp) {
temp[[n]]$type <- n
return(temp[[n]])
}, temp = temp)
do.call(rbind, temp)
On Wed, May 2, 2018 at 1:11 PM, Kevin E. Thorpe <kevin.thorpe at utoronto.ca>
wrote:
> I suspect
2012 Mar 02
2
回复: Bayesian Hidden Markov Models
Dear Oscar,
Thanks for your help.It's so nice of you to explain this package to me.
Best Regards,
James LAN
发件人: Oscar Rueda [via R] <ml-node+s789695n4431468h14@n4.nabble.com>
收件人: monkeylan <lanjinchi@yahoo.com.cn>
发送日期: 2012年2月29日, 星期三, 下午 9:21
主题: Re: Bayesian Hidden Markov Models
Dear James,
The distances are normalized between zero and 1, so in your case all of
2020 Feb 18
2
Possible Regression in setClassUnion between 3.5.0 and 3.6.0
I am trying to create a class union of class unions to facilitate method
dispatch. When I execute code in the global environment, everything acts as
expected, however when I put the same code in the context of a package,
selectMethod can no longer find the correct method. This first block below
puts the code in the context of a package:
fn <- "codefile.R"
writeLines(
c(
2017 Jun 06
2
surprisingly, S4 classes with a "dim" or "dimnames" slot are final (in the Java sense)
Hi,
It's nice to be able to define S4 classes with slots that correspond
to standard attributes:
setClass("A1", slots=c(names="character"))
setClass("A2", slots=c(dim="integer"))
setClass("A3", slots=c(dimnames="list"))
By doing this, one gets a few methods for free:
a1 <- new("A1", names=letters[1:3])
2016 Mar 18
2
unary class union of an S3 class
Hi,
Short story
-----------
setClassUnion("ArrayLike", "array")
showClass("ArrayLike") # no slot
setClass("MyArrayLikeConcreteSubclass",
contains="ArrayLike",
representation(stuff="ANY")
)
showClass("MyArrayLikeConcreteSubclass") # 2 slots!!
That doesn't seem right.
Long story
----------
2005 Aug 18
2
Use of contains in S4 classes
setClass("B", representation=representation("B", extra="numeric))
setClass("B", representation=representation(extra="numeric"),
contains="B")
Are these the same? If not, how do they differ?
What about
setClass("B", representation=representation("B", extra="numeric"),
contains="B")
?
As far as I can
2010 Feb 02
1
S4 setClass / initialize misunderstanding
Hi, I recently ran into this problem. I couldn't find any mention of it in
the setClass documentation.
setClass("Foo", representation(file = "character"))
setMethod("initialize", "Foo", function(.Object, file) {
print(file)
})
setClass("Bar", contains = "Foo")
And the error:
Error in print(file) : argument "file" is
2002 May 21
4
setClass() and packages
Where should the setClass() ('methods' package) calls be placed in a
package? I try to follow a one-class-one-file principe, but since
setClass("ClassA", "ClassB") has to come a after setClass("ClassB", [snip])
it is not possible to fully follow this rule. So the best I can do now is to
put all setClass() calls in a file named "000.R" (I know this
2011 Jan 28
2
help with S4 objects: trying to use a "link-glm" as a class in an object definition
Hi,
I'm trying to make a new S4 object with a slot for a "link-glm" object. R doesn't like me have a slot of class "link-glm"
> class(make.link("probit"))
[1] "link-glm"
> setClass("a",representation(item="link-glm"))
[1] "a"
Warning message:
undefined slot classes in definition of "a": item(class