similar to: Retrieve all names of nested list and index list based on these names

Displaying 20 results from an estimated 800 matches similar to: "Retrieve all names of nested list and index list based on these names"

2010 Nov 11
4
How to get a specific named element in a nested list
Hello, I have a nested named list structure, like the following: x <- list( list( list(df1,df2) list(df3, list(df4,df5)) list(df6,df7))) with df1...d7 as data frames. Every data frame is named. Is there a way to get a specific named element in x? so, for example, x[[c("df5")]] gives me the data frame 5? Thank you in advance! Best, Friedericksen
2013 Mar 09
3
data.frame with variable-length list
Hello, I'm trying to create a data frame with three columns, one of which is a variable-length list. I tried: df <- data.frame(name = c("a", "b", "c"), type=c(1, 2, 3), rtn = c(list(1,2,3), list(4, 5,6), list(7,8,9, 10) ) ) This would be useful, for example, if the 'rtn' is a variable number of
2010 May 20
1
use object within rda file in for loop
Dear users, I would like to process all the lists from all *.rda files that I have in one folder. Up to now, I can load all the *.rda files without any problem. The problem is when I want to access the list saved within each *.rda file (only one list per rda file). Here is my code: fpath <- "D:/R" listnames <- list.files(path=fpath, pattern=glob2rx("*.rda"),
2007 May 14
2
Left/right hand side characters
Hello all Is there a way reducing the number of characters in a list so that just the left n numbers of characters is given? For example, If I have a list, listnames, which consists of 4 strings of 6 characters; >listnames [1] "item12" "item34" "item56" "item78" Is there a way to reduce this so only the 5 characters on the lefthand side are
2002 Dec 20
1
lower triangle
Hi, I want to compute the lower triangle of a square matrix (optionally, sans diagonal). With for() loops I can do something like this: ## 5 by 5 matrix rtn for (j in 1:5) { for (k in 1:j) { if (j != k) { ## optional rtn[j, k] <- my.func(j, k) } } } I'd like to do this with apply(). Is there some way I can do this kind of 'short-circuit'? Thanks, Mark Wilkinson
2002 Dec 05
1
Passing options as lists
Hi, I apologize if this has previously been posted. I've just subscribed to the R-help digest. I'm writing a plotting function that uses layout() to plot several different plots on the same device. This function uses plot(), image(), and a custom function that uses text(). Each cell of the layout needs different par() parameters, so what I'd like to do is pass them as lists:
2011 Jan 28
1
There must be a smarter way
Newbie and trying to learn the right way of doing things in R. in this case, I just have that feeling that my convoluted line of code is way more complicated than it needs to be. Please help me in seeing the easier way. I want to do something pretty simple. I have a dataframe called x that is 6945 elements long. I'd like to create a vector rtn= log(x[2,2]/x[1,3]), then log(x[3,2]/x[2,3]),
2005 Jun 20
1
TxFax: can't get a fax to destination (log inside)
Can someone explain me what's going on and why the receiver of this fax guives up saying communication error? Slow carrier up Slow carrier down Slow carrier up <<< CSI: 40 20 20 20 20 20 20 20 34 39 34 35 36 34 39 35 30 20 39 33 2b CSI without final frame tag Remote fax gave CSI as: "+39 059465494 " <<< DIS: 80 00 ee f8 c4 00 DIS with final frame tag In
2011 Feb 01
1
list.files() error message: 'translateCharUTF8' must be called on a CHARSXP
I'm using list.files() on my home directory, like this: crnt.files <- list.files(dir.to.check, full.names=TRUE, all.files=TRUE, recursive=TRUE) With dir.to.check set to the full path to my home directory. After a while I get: Error in list.files(dir.to.check, full.names = TRUE, all.files = TRUE, : 'translateCharUTF8' must be called on a CHARSXP This happens on one of my
2012 Jul 12
0
HAR-RV-CJ Moedel
I am trying to write a loop to forecast realized volatility over successive days for the purpose of VaR prediction using the HAR-RV-CJ model which is as follows: log(RV_t+1) = ?_0 + ?_CD log(CV_t) + ?_CW log(CV_t-5) + ?_CM log(CV_t-22) + ?_JD log(J_t + 1) + ?_JW log(J_t-5 + 1) + ?_JM log(J_t-22 + 1) + e_t where RV is realized volatility, CV is continuous volatility and J is the jump which is
2013 Oct 20
1
Call parking issue with Cisco SPA phone
I'm trying to implement call parking with asterisk and Cisco SPA504G phones: features.conf parkext => 700 parkpos => 701-702 context => parkedcalls I defined one of the unused keys to park the calls: Key2: fnc=sd;ext=700 at 10.0.1.103;vid=1;nme=Park I also defined two other keys to pickup/unpark the calls: Key3: fnc=blf+sd+cp;sub=701 at 10.0.1.103 Key4: fnc=blf+sd+cp;sub=702 at
2018 Apr 09
1
llvm-dev Digest, Vol 166, Issue 22
Hi Krzysztof, Sure, please see below. DAG.dump.() before and after, annotated with what I believe the DAG means. I've spent some time debugging the method but it's proving difficult to determine where the logic is misfiring. Disabling the entire combine causes a lot of failing x86-64 tests - I may have to learn an upstream vector ISA to make progress on this. Thank you >From your
2005 Aug 24
1
Running wine from php pages with "Xvfb" not success for my machine
I am sorry before, cause my english is poor. My machine is : i686 and I use RedHad Enterprise Linux AS Rel.3, Apache 1.3.33 and PHP 4.4.0. Simply, I want to run an Windows application via PHP page with WINE emulation. (Newest version of WINE updt. August 2005) I have a simple a PHP file "wine.php", that will load an windows application via PHP page. The contents is:
2019 Mar 28
0
topenv of emptyenv
>>>>> Konrad Rudolph >>>>> on Sat, 23 Mar 2019 14:26:40 +0000 writes: >>>>> Konrad Rudolph >>>>> on Sat, 23 Mar 2019 14:26:40 +0000 writes: > I was surprised just now to find out that `topenv(emptyenv())` equals > ? `.GlobalEnv`, not `emptyenv()`. From my understanding of the > description of `topenv`, it
2014 Jun 26
1
using 2D array of SEXP for creating dataframe
Hi , For our production package i need to create a dataframein C . So I wrote the following code SEXP dfm ,head,df , dfint , dfStr,lsnm; *SEXP valueVector[2];* char *ab[3] = {"aa","vv","gy"}; int sn[3] ={99,89,12}; char *listnames[2] = {"int","string"}; int i,j; //============================= PROTECT(df = allocVector(VECSXP,2));
2014 Mar 06
1
Create dataframe in C from table and return to R
Hi , I am trying to create a dataframe in C and sebd it back to R. Can anyone point me to the part of the source code where it is doing , let me explain the problem I am having . -------------------------------------------------------------------- My simple implementation is like this SEXP formDF() { SEXP dfm ,df , dfint , dfStr,lsnm; char *ab[3] =
2012 Nov 30
3
[LLVMdev] Tablegen bug???
Should tablegen detect this as an error, or is it documented as a limitation somewhere that we've missed? In the tablegen-generated file AMDILGenIntrinsics.inc, we have a bunch of if statements comparing strings, many of which are dead, preventing correct recognition of some intrinsics in the their text form. I'm not quite sure what GET_FUNCTION_RECOGNIZER is used for, but if it's
2012 Nov 30
0
[LLVMdev] Tablegen bug???
Out of curiosity, what is wrong about that? It looks ok to me. -Chris On Nov 29, 2012, at 6:52 PM, "Relph, Richard" <Richard.Relph at amd.com> wrote: > Should tablegen detect this as an error, or is it documented as a limitation somewhere that we've missed? > > In the tablegen-generated file AMDILGenIntrinsics.inc, we have a bunch of if statements comparing
2012 Nov 30
2
[LLVMdev] Tablegen bug???
If the source being scanned has "llvm.AMDIL.barrier.global, it will match the first barrier test and return AMDIL_barrier, not AMDIL_barrier_global. On Nov 29, 2012, at 7:19 PM, Chris Lattner <clattner at apple.com> wrote: > Out of curiosity, what is wrong about that? It looks ok to me. > > -Chris > > On Nov 29, 2012, at 6:52 PM, "Relph, Richard"
2013 Apr 18
2
how to control the environment of a formula
Dear List I have experienced that objects generated with one of my packages used a lot of space when saved on disc (object.size did not show this!). some debugging revealed that formula and call objects carried the full environment of subroutines along, including even stuff not needed by the formula or call. here is a sketch of the problem ,---- | test <- function(x){ | x <-