similar to: list comprehension to create an arbitrary-sized list with arbitrary names/values

Displaying 20 results from an estimated 1000 matches similar to: "list comprehension to create an arbitrary-sized list with arbitrary names/values"

2009 May 06
1
Asterisk with Sphinx
Hi, Did anyone tried speech recognition using Sphinx ? I used sphinx using this website (http://scribblej.com/svn/) but when i run astsphinx i am getting the following error. Any clue what might have caused this problem ? Thanks -Azher INFO: s2_semi_mgau.c(1080): 1 mixture Gaussians, 256 components, 4 feature streams, veclen 51 INFO: s2_semi_mgau.c(748): Loading senones from dump file
2010 Apr 24
3
S4 Inheritance of environments
I looked through the documentation and the mailing lists and could not find an answer to this. My apologies if it has already been answered. If it has, a pointer to the relevant discussion would be greatly appreciated. Creating S4 classes containing environments exhibits unexpected behavior/features.? These have a different in two ways: 1) slotName for the data: ".xData" instead of
2011 Dec 01
0
Error message: object 'A' not found
I ran the following code: And I run into problems with the last line of code (when it says hn<-......). I keep getting an error code: Error in distsamp(~hab ~ 1, peldist, keyfun = "halfnorm", output = "density", : object 'A' not found I would appreciate any and all help. rm(list=ls(all=TRUE)) #clear the computer's
2011 Feb 22
1
error with 'hash' library
Hello, I'm using R2.10 on Windows 2000 and I'm having trouble installing the 'hash' library. This is the error I get: > library(hash)                             _       _          ___  _ __   ___ _ __   __| | __ _| |_ __ _  / _ \| '_ \ / _ \ '_ \ / _` |/ _' | __/ _' | | (_) | |_) |  __/ | | | (_| | (_| | || (_| |  \___/| .__/ \___|_| |_|\__,_|\__,_|\__\__,_|
2005 May 26
2
voicemail comprehension
Hi all, In order to do loadbalancing between my two *, i wanted to stock all things concerning voicemail on a NFS partition... I see that the voicemail system put his files onto two differents directories : /var/spool/asterisk/voicemail/mycontext etc. and /var/lib/asterisk/voicemail/mycontext etc. I've two questions : Why ? and how can i do to centralize the destination of the messages AND
2009 Aug 20
1
central PDC + remote BDCs: LDAP strategy, my lack of comprehension
Hello, I am trying to figure out how to implement a samba domain in a number of remote offices around the world with partly bad and often interrupted WAN connections/VPNs. The goal is to administer the directory from the central data center. My obvious choice would be to set up a central server with SAMBA+OpenLDAP+smbldap-tools and in each remote office a SAMBA server with OpenLDAP as a
2015 May 04
2
Define replacement functions
Hello I tried to define replacement functions for the class "mylist". When I test them in an active R session, they work -- however, when I put them into a package, they don't. Why and how to fix? make_my_list <- function( x, y ) { return(structure(list(x, y, class="mylist"))) } mylist <- make_my_list(1:4, letters[3:7]) mylist mylist[['x']] <- 4:6
2017 Jun 15
4
is.null(mylist[1]) and is.null(mylist$a) returns different values
Hi I have a list : mylist <- list( a = NULL, b = 1, c = 2 ) > mylist[1] $a NULL > is.null(mylist[1]) [1] FALSE > is.null(mylist$a) [1] TRUE why? I need to use mylist[1]
2009 Oct 25
3
NULL elements in lists ... a nightmare
I can define a list containing NULL elements: > myList <- list("aaa",NULL,TRUE) > names(myList) <- c("first","second","third") > myList $first [1] "aaa" $second NULL $third [1] TRUE > length(myList) [1] 3 However, if I assign NULL to any of the list element then such element is deleted from the list: > myList$second <-
2010 May 17
3
applying quantile to a list using values of another object as probs
Hi r-users, I have a matrix B and a list of 3x3 matrices (mylist). I want to calculate the quantiles in the list using each of the value of B as probabilities. The codes I wrote are: B <- matrix (runif(12, 0, 1), 3, 4) mylist <- lapply(mylist, function(x) {matrix (rnorm(9), 3, 3)}) for (i in 1:length(B)) { quant <- lapply (mylist, quantile, probs=B[i]) } But quant
2005 Mar 16
8
Summing up matrices in a list
Dear all, I think that my question is very simple but I failed to solve it. I have a list which elements are matrices like this: >mylist [[1]] [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 [[2]] [,1] [,2] [,3] [1,] 7 9 11 [2,] 8 10 12 I'd like to create a matrix M<-mylist[[1]]+mylist[[2]] [,1] [,2] [,3] [1,] 8 12 16 [2,] 10 14 18
2001 Oct 18
2
Parsing for list components
How do I parse an identifier of a list component, e.g. mylist$mycomponent or mylist[[1]] ? Parse does not do the job, e.g. parse(text="mylist$mycomponent") returns an expression with just one term, instead of "mylist", "$", "mycomponent". What I need is a way to extract the list name (e.g. "mylist"), given an identifier of a component.
2010 Sep 04
4
Please explain "do.call" in this context, or critique to "stack this list faster"
I've been doing some consulting with students who seem to come to R from SAS. They are usually pre-occupied with do loops and it is tough to persuade them to trust R lists rather than keeping 100s of named matrices floating around. Often it happens that there is a list with lots of matrices or data frames in it and we need to "stack those together". I thought it would be a simple
2004 May 10
2
Lists and outer() like functionality?
Hi, I'm have a list of integer vectors and I want to perform an outer() like operation on the list. As an example, take the following list: mylist <- list(1:5,3:9,8:12) A simple example of the kind of thing I want to do is to find the sum of the shared numbers between each vector to give a result like: result <- array(c(15,12,0,12,42,17,0,17,50), dim=c(3,3)) Two for() loops is the
2012 Aug 28
3
Get variable data Reading from the list
Here i have a variable MyVar <- data.frame(read.csv("D:\\Doc.csv")) And now i am storing this variable name into a list. MyList <- list() MyList [length(MyList )+1]<- "MyVar" Now what is the requirement is, i need to call the variable name "MyVar" from the list "MyList " and get the data.
2007 Jun 29
2
regexpr
Hi, I 'd like to match each member of a list to a target string, e.g. ------------------------------ mylist=c("MN","NY","FL") g=regexpr(mylist[1], "Those from MN:") if (g>0) { "On list" } ------------------------------ My question is: How to add an end-of-string symbol '$' to the to-match string? so that 'M' won't
2011 May 25
3
Accessing elements of a list
I have a list that is made of lists of varying length. I wish to create a new vector that contains the last element of each list. So far I have used sapply to determine the length of each list, but I'm stymied at the part where I index the list to make a new vector containing only the last item of each list mylist =
2009 Nov 11
0
[LLVMdev] Need help to finish arbitrary-sized aggregate returns support
I've got it working on x86. Most of the logic is in SelectionDAGBuild and friends, but there is one target-specific hook (TargetLowering::CanLowerReturn) that needs to be implemented for each target. It should return true if the function can return the value in registers without crashing, and false if the function needs to have a hidden sret-parameter inserted to do the return; i.e., if the
2012 Aug 21
2
[LLVMdev] Passing return values on the stack & storing arbitrary sized integers
> This isn't really my area of expertise, but I think you're messing up > your RegisterClass definition. Look at how ARM defines DTriple. DTriple is untyped :) , because we do not have any valut type which defines 3xi64. However, the paired register needs to have type. Fabian, what are the definitions of ER and DR register classes? -- With best regards, Anton Korobeynikov Faculty
2012 Aug 21
0
[LLVMdev] Passing return values on the stack & storing arbitrary sized integers
2012/8/21 Anton Korobeynikov <anton at korobeynikov.info>: >> This isn't really my area of expertise, but I think you're messing up >> your RegisterClass definition. Look at how ARM defines DTriple. > DTriple is untyped :) , because we do not have any valut type which > defines 3xi64. > However, the paired register needs to have type. > > Fabian, what are