search for: newlist

Displaying 20 results from an estimated 29 matches for "newlist".

Did you mean: new_ist
2005 May 27
4
kernel: attempt to access beyond end of device
Morning all, I received this mail this morning from an admin regarding a xen guest (newlists). It would seem that the filesystem is larger than its container? Before I spend too long looking at it, does anyone have any ideas as to how this may have occurred and how it could be fixed? Kind regards, Sam ========================================= ---------- Forwarded message ---------- Fr...
2012 Jan 01
3
rep() inside of lm()?
HI all, I'm new to R. Say I have a multi-layered list called newlist. ############ > str(newlist) List of 2 $ :List of 5 ..$ : num [1:8088] NA 464 482 535 557 ... ..$ : num [1:8088, 1:2] NA 464 482 535 557 ... ..$ : num [1:8088, 1:3] NA 464 482 535 557 ... ..$ : num [1:8088, 1:4] NA 464 482 535 557 ... ..$ : num [1:8088, 1:5] NA 464 482 535 557 ... $...
2013 Feb 12
3
grabbing from elements of a list without a loop
...ist<-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) ) { newlist[[i]]<-mylist[[i]] [neededcolumns[i]] } newlist<-do.call(cbind,newlist) (newlist) I was wondering if there is any way to avoid the loop above and make it faster. In reality, I have a much longer list, each of my data frames is much larger and I...
2003 Mar 23
12
Shorewall 1.4.1
This is a minor release of Shorewall. WARNING: This release introduces incompatibilities with prior releases. See http://www.shorewall.net/upgrade_issues.htm. Changes are: a) There is now a new NONE policy specifiable in /etc/shorewall/policy. This policy will cause Shorewall to assume that there will never be any traffic between the source and destination zones. b) Shorewall no longer
2011 Feb 17
1
Populate a list / recursively set list values to NA
...,10)), cc=list( a=matrix(rnorm(100),10,10), b=matrix(rnorm(100),10,10), c=matrix(rnorm(100),10,10)), dd=matrix(rnorm(225),15,15)) str(masterlist) ## Yay! A new list that's just like the master list! newlist = masterlist ## BOO! Can't just set all the values to NA! newlist = masterlist * NA ## This works... but requires knowledge of the structure newlist = masterlist newlist[['aa']] = lapply(masterlist[['aa']], function(x) x * NA) newlist[['bb']] =...
2010 Jun 29
2
how to remove "numeric(0)" component from a list
like this, the list is below, I want to remove the last one . not using newlist[-2], but using the function detect its component is numeric(0) and then remove it from the list. newlist [[1]] [1] 2 3 [[2]] [1] numeric(0) [[3]] [1] 7 [[alternative HTML version deleted]]
2004 Sep 02
3
Traffic shapping Bug ?
hello , i''m currently trying to set-up Traffic Shapping with Shorewall and I have strong feelings that I found a bug. I may be mistaken, but I tried everything and can''t get it to work. I''ve turned ON TC_ENABLED=Yes and CLEAR_TC=Yes when i start shorewall ( shorewall start ), i get this message : Setting up Traffic Control Rules... TC Rule "2 eth1 0.0.0.0/0 tcp
2004 Sep 12
2
boxplot() from list
...r i in 1:4. It seems that I can create a boxplot of length 48 from the entire list, but I don't seem able to subscript to return 4 boxplots from the list - I have also tried to create 4 new lists (one for each column of each object) by using variations on the following, but none seems to work: newlist<-oldlist[,1] newlist<-oldlist[[]][,1] newlist<-oldlist[[]][,$colone] can anyone please offer some insight?? Thanks in advance, Laura Quinn Institute of Atmospheric Science School of Earth and Environment University of Leeds Leeds LS2 9JT tel: +44 113 343 1596 fax: +44 113 343 6716 mail...
2010 Jun 28
2
ask a question about list in R project
my list al is as below: mylist=list(c(2,3),5,7) > mylist [[1]] [1] 2 3 [[2]] [1] 5 [[3]] [1] 7 How could I get the following FOUR lists: First one [[1]] [1] 3 [[2]] [1] 5 [[3]] [1] 7 Second one [[1]] [1] 2 [[2]] [1] 5 [[3]] [1] 7 Third One [[1]] [1] 2 3 [[2]] [1] 7 Last one [[1]] [1] 2 3 [[2]] [1] 5 Do I have to use 'for' loops? Please give me sone suggestions! Thank you
2011 Feb 02
2
Indexing from two variables
...llowing and variations thereon to no avail: </code> #for each line of the recovery dataframe #insert the one line of the "book" dataset that corresponds to the MRN AND the course-of-treatment (COURSE) #get the mrn and course from the first line of the recovery dataframe (rec) i=1 newlist=list() colnames(newlist)=colnames(book) for ( i in 1:dim(rec)[1]) { mrn=as.numeric(as.vector(rec$MRN[i])); course=as.character(rec$COURSE[i]); ## find the corresponding row in the book dataframe ## by generating a logical vector and using ## it to access "book" get.vector<-as.ve...
2012 Nov 11
4
Multiplying elements of a list by rows of a matrix
Hi all, I have the following code: set.seed(1) x1 <- matrix(sample(1:12), ncol=3) x2 <- matrix(sample(1:12), ncol=3) x3 <- matrix(sample(1:12), ncol=3) X <- list(x1,x2,x3) tt <- matrix(round(runif(5*4),2), ncol=4) Is there a way I can construct a new list where newlist[[i]] = tt[i,] %*% X[[i]] without using a for loop? Each element of newlist will be 3 x 1 vector. Thanks -- Tina Alexander
2005 Feb 01
4
Shorewall problem
I am getting the following message when Shorewall stops can anybody shed any light on this message and where I should be looking? Thanks root@bobshost:~# shorewall stop Loading /usr/share/shorewall/functions... Processing /etc/shorewall/params ... Processing /etc/shorewall/shorewall.conf... Loading Modules... Stopping Shorewall...Processing /etc/shorewall/stop ... IP Forwarding Enabled
2009 Mar 12
2
R grep & gsub issue - sign seems to be causing an issue...
I would like to use grep and gsub to manipulate a vector to make the names used consistent, i.e. reduce a level or two. However, here is what I found when I attempted to use grep and gsub: > tmp_test<-c("House 1 Plot Plus +100","House 2 Plot Plus +100","House 3 Plot Plus -100","House 4 Plot Plus -100","House 1 Plus +100","House 2
2009 Jul 28
4
check for new files in a given directory
I am trying to continuously evaluate online created data files using R-algorithms. Is there any simple way to let R iteratively check for new files in a given directory, load them and process them? Any help would be highly appreciated. Best, A. [[alternative HTML version deleted]]
2012 Dec 10
3
use variable in for loop to name output files
Hi, This question should be simple to answer. I am a new R user. I have a data.frame called appended. I would like to break it into 7 smaller datasets based on the value of a categorical variable dp (which has values 1:7). I would like to name the smaller datasets set1, set2, set3,....,set7. I don't know how to refer to the variable in the for loop, when naming the output datasets. In STATA
2011 Aug 24
1
setMethods/setGeneric problem when R CMD CHECK'ing a package
...lPointsDataFrameListZoo.R" setMethod("as.yearmon", signature(x = "SpatialPointsDataFrameListZoo"), as.yearmon.SpatialPointsDataFrameListZoo ) # Filename "as.yearmon.SpatialPointsDataFrameListZoo.R" as.yearmon.SpatialPointsDataFrameListZoo=function(x,...) { newlist=mapply(zoo:::as.yearmon,x at list,MoreArgs=list(...),simplify=FALSE) x at list=newlist return(x) } Thoughts? --j -- Jonathan A. Greenberg, PhD Assistant Project Scientist Center for Spatial Technologies and Remote Sensing (CSTARS) Department of Land, Air and Water Resources University of Cali...
2010 Jul 16
2
Storing processed results back into original objects
Hi all, There are matrices with same column names but arranged in different orders and I desire columns of these matrices to have same order. For example, below are 2 arbitrary data sets with columns arranged in different order. I require columns of these to have same order as specified in "columns" object and the results stored in the original object names. I know this can be done
2009 Nov 02
1
Using processed objects as arguments of a function
Dear R users, I wish to utilise processed and saved objects as arguments of a function. Specifically, I have created objects using *"assign"* & *"paste"* functions with an incremental index i, the names of the objects are: fund1, fund2, fund3,....., fund80,..... (where the numerical value increments according to the index i & class of these objects are
2007 Oct 15
1
The "condition has length > 1" issue for lists
I have the following code: list1 <- list() for (i in list.files(pattern="filename1")){ x <- read.table(i) list1[[i]] <- x } list2 <- list() for (i in list.files(pattern="filename2*")){ x <- read.table(i) list2[[i]] <- x } anslist <- vector('list', length(list1)) for(i in 1:length(list1)) if (list1[[i]] & list2[[i]] >1)
2018 Apr 15
4
Adding a new conditional column to a list of dataframes
...apply this function to all dataframes using lapply() function , I do not get what I want. I wrote this function first :- MyFunction <- function(x) x$NewCol [ x[ ,3] < x[ 1,2] ] <- "C" Then I wrote this code to apply my function to all dataframes in "Mylist" : NewList <- lapply(names(Mylist), function(x) MyFunction(Mylist[[x]])) This returned a list of 7000 elements and each of which contain "C'' letter. Each dataframe has become a vector of "C'' letter which is totally away from what I need. I expected to see a list of my 7000...