similar to: Pb with lapply()

Displaying 20 results from an estimated 10000 matches similar to: "Pb with lapply()"

2014 Jul 06
2
Depot for S3 to S4 generics (as in stats4)?
Dear developers, the implementation of S4 generics for existing S3 ones in the base package is concerned to be a threat to quick startup times [1]. But since S4 is promoted, and S3/S4 interoperability a pain when package developing [2], are there efforts to improve the situation? E.g. an S3 free system, etc. A good thing [2] is the package 'stats4', including some setGeneric calls (e.g.
1999 Dec 20
1
Manual: writing R Extensions (PR#380)
-- Happy holidays! -- Dear R Development Core Team, I want to thank you *very much* for the new "Writing R Extensions" manual published with RW0.901 and hope this is the right place to report some possible typos. page 17, example given in the middle of the page, I think it should read REAL(version) = 3.0; ^^^^^^^ page 23, second example, I think the parameter definition
2004 Feb 17
2
interfacing C++ using .Call
Hi folks, I apologise if this is in the documentation somewhere, but I can't seem to find it. I also did a search of CRAN without any success. I'm using R-1.8.1 (pre-compiled) on Windows 2000 with Rtools and mingw 2.0.0 (which includes gcc/g++ 3.2). I'm trying to link some C++ code from another application to R using the .Call interface and am experiencing some problems. I was
2010 Apr 30
3
Why do data frame column types vary across apply, lapply?
Hi, I still have little ability to predict how these functions will treat the columns of data frames: > # Here's a data frame with a column "a" of integers, > # and a column "b" of characters: > df <- data.frame( + a = 1:2, + b = c("a","b") + ) > df a b 1 1 a 2 2 b > > # Except -- both columns are characters: >
2005 Sep 10
4
Issue tracking in packages [was: Re: [R] change in, read.spss, package foreign?]
I would vote for allowing a URL or external file name in in DESCRIPTION, whose contents could be automatically displayed for the user when needed. Our changelogs are automatically generated by CVS and are on the web. -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
2006 Oct 26
1
Pb with .findInheritedMethods
Hi again, Here is a very simplified version of a class hierarchy defined in the Biobase package (Bioconductor). I post here because this seems to be an S4 related problem: setClass("A", representation(name="character")) setMethod("initialize", "A", function(.Object) {.Object at name <- "I'm an A"; .Object})
2011 Oct 07
1
Pb building sets of S4 / RefClass objects with package "sets"
Hi, does anyone know if it is possible to construct sets of S4 objects? It seems the constructor set does not like it: Error in as.vector(x, "character") : cannot coerce type 'environment' to vector of type 'character' Regards Johnny PS: by the way, does anyone know where I can find some examples using the cset class from the "sets" package, beside the
2007 Aug 15
1
getting lapply() to work for a new class
Hi, I would like to get lapply() to work in the natural way on a class I've defined. As far as I can tell, lapply() needs the class to be coercible to a list. Even after I define as.list() and as.vector(x, mode="list") methods, though, I still get an "Error in as.vector(x, "list") : cannot coerce to vector". What am I doing wrong? # dummy class
2008 Feb 21
3
applying a function to data frame columns
useR's, I want to apply this function to the columns of a data frame: u[u >= range(v)[1] & u <= range(v)[2]] where u is the n column data frame under consideration and v is a data frame of values with the same number of columns as u. For example, v1 <- c(1,2,3) v2 <- c(3,4,5) v3 <- c(2,3,4) v <- as.data.frame(cbind(v1,v2,v3)) uk1 <- seq(min(v1) - .5, max(v1) + .5,
2006 Oct 26
2
S4 pb in R 2.5.0
Hi, When playing interactively with the S4 system, I've tried to define the following class: > setClass("A", representation("integer")) [1] "A" > showClass("A") Slots: Name: .Data Class: integer Extends: Class "integer", from data part Class "vector", by
2023 Nov 11
1
New syntax for positional-only function parameters?
6 ?????? 2023 ?. 22:54:24 GMT+03:00, mikkmart via R-devel <r-devel at r-project.org> ?????: >The pattern of functions accepting other functions as inputs and >passing additional ... arguments to them is prevalent throughout >the R ecosystem. Currently, however, all such functions must one >way or another tackle the problem of inadvertently passing arguments >meant to go to
2008 Sep 09
2
make methods work in lapply - remove lapply's environment
I've defined my own version of summary.default, that gives a better summary for highly skewed vectors. If I call summary(x) the method is used. If I call summary(data.frame(x)) the method is not used. I've traced this to lapply; this uses the new method: lapply(list(x), function(x) summary(x)) and this does not: lapply(list(x), summary) If I make a copy of lapply, WITHOUT the
2011 Sep 15
2
Returning the name of an object passed directly or from a list by lapply
Dear folks: Let?s suppose I want a function to print return the name of the object passed to it. > myname <- function(object) {out<-deparse(substitute(object)); out} This works fine on a single object: > O1 <-c(1:4) > myname(O1) [1] "O1" However it does not work if you use lapply to pass it the same object from a list: > O2 <-c(1:4) > object.list <-
2001 Nov 05
1
Re: vorbis-tools PB project: requirements
On Monday, November 5, 2001, at 12:54 AM, dongoodman wrote: > ok, I haven't tried compiling your vorbis-tools PB project, as I still > can' > t get vorbis.framework to like me. test linkings still complain about > too many main()'s...and in fact, quite a lot of the c files in the > vorbis source have main()'s in them...how very odd. > I'm sorry, I have
2002 Nov 12
1
pb with imq
hi stef oone more pb while shaping incoming traffic with imq .this one tc qdisc add dev imq0 root handle 1: htb default 20 tc class add dev imq0 parent 1: classid 1:1 htb rate 2mbit burst 15k tc class add dev imq0 parent 1:1 classid 1:10 htb rate 1mbit tc class add dev imq0 parent 1:1 classid 1:20 htb rate 1mbit tc qdisc add dev imq0 parent 1:10 handle 10: pfifo tc qdisc add dev imq0 parent
2003 May 15
0
[Bug 567] pb at the end of compil with a dump of ssh-keygen
http://bugzilla.mindrot.org/show_bug.cgi?id=567 Summary: pb at the end of compil with a dump of ssh-keygen Product: Portable OpenSSH Version: -current Platform: MIPS OS/Version: IRIX Status: NEW Severity: critical Priority: P1 Component: Build system AssignedTo: openssh-unix-dev at mindrot.org
2005 Sep 08
0
Pb with file access rights on a NFS server
Hello, I'm having troubles with access rights on files located on a NFS server (actually an EMC NAS NS600). The client machine is a Linux SuSe E9.0 and the samba suite version is samba-3.0.14a-0.4, directly installed from a Linux package. The users connect to the Linux server without any pb using their MS Windows account through Winbind+Kerberos. They belong to the right Windows groups but
2002 Nov 05
1
PB samba 2.5 and clients W2K SP2-SP3
English version : Hi i've some problems with samba 2.5 and MDK 8.2 each time I log on a WIN2K SP2 or SP3 client I get the message : your password expires today would you like to change it ? yes no Even if I change it , I get the message one more time when I log on the client the next time.. I read the o'reilly and the how to and I didn't see any param for password expiration in
2009 Mar 18
1
Why S4 methods of S3 'base' generics are not used in 'base' functions ?
Dear list, It seems that S4 methods defined for an S3 'base' generic are not used in 'base' functions. This can be problematic when 'base' functions start with something like 'as.matrix'. ### START R code setClass("classA", contains = "matrix", representation(realData = "numeric")) setMethod("as.matrix",
2004 Feb 25
1
Pb with RODBC installation
Hello I'm starting to use R on a Windows XP Pro machine which is not connected to the internet; I want to use database connection so I downloaded the file "RODBC_1.0-4.tar" from CRAN; this file is not accepted by the "Packages->Install Packages from local zip file" menu function of R!!! I would like to know why it doesn't work and if it's possible to get