similar to: Naming elements of a list

Displaying 20 results from an estimated 30000 matches similar to: "Naming elements of a list"

2007 Nov 23
1
Problem with environments
I have a numeric vector of length 1. I am trying to use it inside a function just by giving its name, rather than specifying it as an argument to the function. I am aware that there is an attach function which you need to call. The attach function will accept a list. However, I don't seem to be able to create the list properly. (Or should I use a frame instead?) Anyway, here is the output,
2019 Jul 23
2
[External] Re: quiet namespace load is noisy
Lionel, Thanks for your response. I understand that method overriding can be a serious issue, but as you say, this is not something that the user can act upon. Yet the message lands at the user?s feet. In my case, the messages are cluttering my package vignettes, and may or may not represent what users see if they themselves run the vignette code, depending on what version of ggplot2, etc. they
2019 Jul 23
2
[External] Re: quiet namespace load is noisy
Dear Russ, I had the same problem in my vignettes and setting both message and warning to FALSE seems to remove all unwanted output: ```{r message=FALSE, warning=FALSE} library("afex") library("ggplot2") library("cowplot") theme_set(theme_grey()) ``` Result: https://cran.r-project.org/web/packages/afex/vignettes/afex_plot_introduction.html Best, Henrik Am Di.,
2016 May 14
2
R external pointer and GPU memory leak problem
My question is based on a project I have partially done, but there is still something I'm not clear. My goal is to create a R package contains GPU functions (some are from Nividia cuda library, some are my self-defined CUDA functions) My design is quite different from current R's GPU package, I want to create a R object (external pointer) point to GPU address, and run my GPU function
2000 May 03
1
Bug report -- 1.0.1, HP-UX (PR#532)
Dear R folks, Additional problem... bug.report() failed, so am sending it from another mailer. The file it generated is appended. Thanks Russ -- Russell V. Lenth -- Department of Statistics & Actuarial Science The University of Iowa -- Iowa City, IA 52242 USA Tel (319)335-0814 -- FAX (319)335-3017 mailto:Russell-Lenth@uiowa.edu - http://www.stat.uiowa.edu/~rlenth/ ===== R.bug.report
2008 Apr 25
1
R-devel Digest, Vol 62, Issue 24
The columns of the model matrix are all orthogonal. So the problem lies with poly(), not with lm(). > x = rep(1:5,3) y = rnorm(15) z <- model.matrix(lm(y ~ poly(x, 12))) x = rep(1:5,3) > y = rnorm(15) > z <- model.matrix(lm(y ~ poly(x, 12))) > round(crossprod(z),15) (Intercept) poly(x, 12)1 poly(x, 12)2 poly(x, 12)3 poly(x, 12)4 (Intercept)
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 =
2006 Oct 13
3
No exit codes from RTerm (Windows) (PR#9296)
Full_Name: Russell V. Lenth Version: 2.3.1 OS: Windows XP Pro Submission from: (NULL) (128.255.132.188) I wrote a simple .BAT file to run the Sweave function on a file (via RTerm), then run pdflatex on the result (after RTerm exits). The issue is that if an error condition occurs in RTerm, it is prudent to not do the pdflatex processing afterward. Here are the relevant statements in the BAT
2010 Jul 27
2
Sum list elements
Hi! I have a list of 24 elements, all of the same type (dataframe, for example). I am looking for an alternative to mylist[[1]] + mylist[[2]] + ... + mylist[[24]] to obtain the sum. Anyone can help me? Thanks in advance. Nicola S. [[alternative HTML version deleted]]
2019 Jul 23
2
quiet namespace load is noisy
Dear R-devel, Consider the following clip (in R version 3.6.0, Windows): > requireNamespace("ggplot2", quietly = TRUE) Registered S3 methods overwritten by 'ggplot2': method from [.quosures rlang c.quosures rlang print.quosures rlang It seems to me that if one specifies 'quietly = TRUE', then messages about S3 method
2013 Feb 12
3
grabbing from elements of a list without a loop
Hello! # I have a list with several data frames: mylist<-list(data.frame(a=1:2,b=2:3), data.frame(a=3:4,b=5:6),data.frame(a=7:8,b=9:10)) (mylist) # I want to grab only one specific column from each list element neededcolumns<-c(1,2,0) # number of the column I need from each element of the list # Below, I am doing it using a loop: newlist<-NULL for(i in 1:length(mylist) ) {
2010 Apr 05
1
Deleting many list elements in one time
Hi guys, here is a simple thing I want to do but it doesn't work: I have a vector of the element indexes that I want to delete called index so when I write myList[[index]] <- NULL to delete these elements here is what I get: Error in myList[[index]] <- NULL : more elements supplied than there are to replace Isn't it possible to delete multiple elements? ----- Anna Lippel --
2013 Apr 29
3
rbinding some elements from a list and obtain another list
Hi everybody, I have a list, where every element of this list is a data frame. An example: Mylist<-list(A=data.frame, B=data.frame, C=data.frame, D=data.frame) I want to rbind some elements of this list. As an example: Output<-list(AB=data.frame, CD=data.frame) Where AB=rbind(A,B) CD=rbind(C,D) I’ve tried: f<-function(x){ for (i in
2010 Aug 26
3
Passing data to aov
Hello Again Gurus and Lurkers: I?m trying to build a very user-friendly function which does aov without having the user type in a formula (which would be tedious in this case). The idea is to take the response from a PCA score matrix, and the factors from a list. A simple example is the function given below, along with test data and a sample call to the function. I'm certainly having
2007 Nov 23
0
R users in Cyprus
Dear friends, are there enough R users in Cyprus to form a club? jason Dr. Iasonas Lamprianou Department of Education The University of Manchester Oxford Road, Manchester M13 9PL, UK Tel. 0044 161 275 3485 iasonas.lamprianou at manchester.ac.uk ----- Original Message ---- From: "r-help-request at r-project.org" <r-help-request at r-project.org> To: r-help at r-project.org
2007 Aug 13
1
PR#9848
Oops -- I meant R version 2.5.1, not 1.5.1. My apologies. -- Russell V. Lenth, Professor Department of Statistics & Actuarial Science (319)335-0814 FAX (319)335-3017 The University of Iowa russell-lenth at uiowa.edu Iowa City, IA 52242 USA http://www.stat.uiowa.edu/~rlenth/
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 <-
2008 Apr 22
1
Bug in poly() (PR#11243)
Full_Name: Russell Lenth Version: 2.6.2 OS: Windows XP Pro Submission from: (NULL) (128.255.132.36) The poly() function allows a higher-degree polynomial than it should, when raw=FALSE. For example, consider 5 distinct 'x' values, each repeated twice. we can fit a polynomial of degree 8: ===== R> x = rep(1:5, 2) R> y = rnorm(10) R> lm(y ~ poly(x, 8)) Call: lm(formula = y ~
2018 Jul 20
2
Model formulas with explicit references
Dear R-Devel, I seem to no longer be able to access the bug-reporting system, so am doing this by e-mail. My report concerns models where variables are explicitly referenced (or is it "dereferenced"?), such as: cars.lm <- lm(mtcars[[1]] ~ factor(mtcars$cyl) + mtcars[["disp"]]) I have found that it is not possible to predict such models with new data. For example:
2012 Dec 26
1
Change class of elements in list
Dear R users, I have a list of objects of type "im" > mylist$sp1 $sp2 $sp3 and I want to convert them to a list of objects of class "SpatialGridDataFrame" This works for a single object of class "im": a <- mylist$sp1 b <- as(a, "SpatialGridDataFrame") Then I want to write each element in the new list as a TIFF file, with the name of the elements