similar to: accessing the attributes of a list inside lapply()

Displaying 20 results from an estimated 4000 matches similar to: "accessing the attributes of a list inside lapply()"

2004 Sep 25
2
Strange behavior of is.na() on lists
Hello R-users, I have observed that is.na() behaves strange on some lists. Here is a simple example: > a = list(list('asd')) > a [[1]] [[1]][[1]] [1] "asd" > for(i in 1:5) + print(is.na(a)) [1] TRUE [1] FALSE [1] TRUE [1] TRUE [1] TRUE > > for(i in 1:10) + print(as.integer(is.na(a))) [1] 0 [1] 10 [1] 1 [1] 0 [1] 140897024 [1] 134567568 [1] 1 [1] 1953720684
2004 Feb 12
3
Debugging R Code
Hi all, is there a more convenient way to debug R code than the built in debug() function? (so that one can set breakpoints, step in and out of function calls,...). I read the section on debugging compiled code in the manual "Writing R Extensions" (I only want to debug ordinary code but thought that maybe the advice there could help), but didn't find out how I can start
2010 Feb 25
1
[PATCH] fix storage problem.
Since Ruby::Qmf moves, the .key() method does not work anymore. It forces to use a .get_attr('key') in order to get the good value. Signed-off-by: Loiseleur Michel <mloiseleur at linagora.com> --- src/task-omatic/taskomatic.rb | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb index
2010 Mar 30
1
hist.default()$density
Dear developers, the current implementation of hist.default() calculates 'density' (and 'intensities') as dens <- counts/(n*h) where h has been calculated before as h <- diff(fuzzybreaks) which results in 'fuzzy' values for the density, see e.g. > tmp <- hist(1:10,breaks=c(-2.5,2.5,7.5,12.5),plot=FALSE) > print(tmp$density,digits=15) [1]
2009 Oct 13
2
Sweave output encoding in R-2.10.0beta on Windows (Rgui <-> Rterm)
Dear developers, I have come across a (somewhat strange) change in the encoding of Sweave output from R-2.9.2pat to R-2.10.0beta (apparently specific to Rgui) on Windows installations. Of course, the NEWS file contains quite a few changes concerning encoding, but I was not able to locate an entry which explains the observed behaviour. I am not very familiar with encodings/locales/codepages,
2007 Sep 24
3
CallerID problem Asterisk 1.4.2
When receiving inbound calls from a Vonage Softphone extension, I'm unable to view/maniupulate calledid data. but it shows up in the CDR records and on called handsets.. any ideas? exten => asda,n,NoOp(callerID is ${CALLERID}) exten => asda,n,NoOp(CallerID is ${CALLERIDNAME}) exten => asda,n,NoOp(CallerID is ${CALLERIDNUM}) -- Executing [asd at pstn-in:2]
2010 Aug 20
2
Determining the length of unique items in a vector
Dear all, let suppose I have following vector:   > dat1 <- c(rep("asd", 5), rep("xyz", 12), rep("erd", 17)) > dat1 <- dat1[sample(1:length(dat1), length(dat1), replace=F)] > dat1  [1] "erd" "xyz" "erd" "asd" "asd" "erd" "xyz" "asd" "erd" "erd"
2011 Jan 10
1
Using combn
Dear list, I want to apply the "table" function to every pair of variables in df and the return should be a list. setwd(123) asd <- data.frame(a1=sample(1:4, 20, replace=TRUE), a2=sample(1:4, 20, replace=TRUE), a3=sample(1:4, 20, replace=TRUE), a4=sample(1:4, 20, replace=TRUE)) with(asd, table(a1, a2)) with(asd, table(a1,
2014 Jul 17
2
question about output of files copied/deleted
It seems to me that this output would be more useful if it were possible to uniquely translate a line of output back into a file path. Right now that's not possible due to the control character encoding. An output line like asd\#002\#003zxc could either mean a file of that name or asd^B\#003zxc or asd^B^Czxc or asd\#002^Czxc I was hoping to start with rsync -n, figure out what was going to be
2004 Mar 09
1
More factor names in x axis, how?
I have some data which records, amongst other things, age (recoded by me to be in months), and drug group (a factor). The drug group is a 2 digit number, but there is no numeric relationship, and only 50 of the possible groups occur So > asd <- read.table("asd.dat", header=TRUE) > asd$group <- as.factor(asd$group) > plot(age ~ group, data=asd) gives me a series of
2009 Oct 29
1
Question about is.na for missing data
Greetings, I am trying to a simple mean imputation using the following command (yes, I know it is not an ideal way to impute missing data) asd[is.na(asd)] <- mean(asd,na.rm=TRUE) This has worked quite well in the past. Now, however, I am getting the following error messsage. Error in `[<-.data.frame`(`*tmp*`, is.na(asd), value = c(2433.64150943396, : rhs is the wrong length for
2012 Dec 26
3
Working with date
Hi, Let say I have a date variable: > ?asd <- as.Date("2012-01-03") > asd [1] "2012-01-03" Now, I want to express this date like 3/1/2012. can somebody help me how to achieve that? Thanks,
2012 Mar 22
3
[LLVMdev] SPEC CPU2006 bitcode files
Hello, I'm trying to generate bitcode files from the SPEC CPU2006 benchmark suites. First I installed the benchmarks into ~/llvm/projects/test-suite/External/speccpu2006 and then I tried ~/mysandbox/bin/lnt runtest nt --sandbox=sandbox --cc=/Users/asd/llvm/Release/bin/clang --test-suite=/Users/asd/llvm/projects/test-suite --test-externals=/Users/asd/llvm/projects/test-suite/External -j 4
2010 Jul 13
2
how to extract information from anova results
Hi, I have used the instruction aov in the following manner: res <- aov(qwe ~ asd) when I typed "res" I get: _________ Call: aov(formula = qwe ~ asd) Terms: asd Residuals Sum of Squares 0.0708704 0.5255957 Deg. of Freedom 1 8 Residual standard error: 0.2563191 Estimated effects may be unbalanced _________ I need to access the value of
2011 Jun 17
1
[LLVMdev] Problem regarding llc command line option
Hi, I was trying to port a Target from llvm-2.6 to llvm-2.9 and have got stuck to a very strange problem. There was an option defined in the target Asm Printer file with signature as - static cl::opt<bool> AsdPri("asd-pri", cl::Hidden, cl::desc("Print ASD format")); How after compiling the target, I dont see the option enabled in $ llc -help-hidden Also it gives error
2013 Feb 28
1
header brakage on sieve redirect ?
Hi all, In the sieve file require ["copy"]; redirect :copy "asdf at asd.pl"; emails with headers containing \n in non terminated " field like Cc: xxx <xxx at plus.pl>, "asd, Grzegorz " <xxxxx at nsn.com> Subject: RE: RF after redirecting them Cc: xxx <xxx at plus.pl>, "asd,\ \ Grzegorz " <xxxxx at nsn.com> Subject:
2010 Jan 12
2
setfacl:operation not supported
Hi all from last few days i got struct in problem.when i try to use setfacl command "setfacl -m u:himmat:r-- /ide2/asd" i get the error setfacl : /ide2/asd : operation not supported i also has mounted acl using -: "mount -f -o remount,acl / " Note: -f option is for force i am using red hat kernel 2.4.20-8 and acl-2.2.3-1 One more thing i have to ask whether acl utility
2008 Nov 21
3
list of list objects
hi there, I have a list of list objects i need to remove the top layer [[1]] [1].0 "ABC" "DEF""LMN" [1].1 "WER" "ERT" "TRY" [[2]] [2].0 "ASD","wer""qwe" [2].1 "wdv""ghj""ggj" I wanna avoid the top layer...that is [[1]] [[2]] shouldnt be there just a simple list is wat i need.
2008 Sep 25
3
[LLVMdev] Kaleidoscope doesn't work properly
Hi I hope this is a proper place to put my question. I've compiled Kaleidoscope from "Adding JIT and Optimizer Support" tutorial. Basically it works just fine but when I try to run extern'ed putchard function it aborts. Please, tell me what am I doing wrong? Here is more information: My PC runs FreeBSD. I've copied the toy source code exactly and didn't change it.
2006 Mar 13
4
Trouble Using AR Object based on a Piggyback Query?
Hi, I''m new to Rails and Ruby and can''t access methods/columns from an ActiveRecord object that is a "piggy-back" row as described by David here: http://www.loudthinking.com/arc/000235.html Via Console I can create the piggyback object but reading attributes gives "TypeError: cannot convert String into Integer" (this is in Console and the browser).