similar to: rep() inside of lm()?

Displaying 20 results from an estimated 5000 matches similar to: "rep() inside of lm()?"

2011 Feb 17
1
Populate a list / recursively set list values to NA
Hello all, Maybe I'm being thick, but I was trying to figure out a simple way to create a list with the same dimension of another list, but populated with NA values. masterlist = list( aa=list( a=matrix(rnorm(100),10,10), b=matrix(rnorm(130),13,10), c=matrix(rnorm(140),14,10)), bb=list(
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) ) {
2004 Sep 12
2
boxplot() from list
I have a list containing 48 objects (each with 30 rows and 4 columns, all numeric), and wish to produce 4 boxplot series (with 48 plots in each) , one for each column of each object. Basically I want a boxplot from boxplot(mylist[[]][,i]) for 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
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]]
2011 Feb 02
2
Indexing from two variables
Hello, thank you all for your patience and time I am essentially trying to get disorganised data into long form for linear modelling. I have 2 dataframes "rec" and "book" Each row in "book" needs to be pasted onto the end of several of the rows of "rec" according to two variables in the row:" MRN" and "COURSE" which match. I have
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
2012 May 04
2
Can't import this 4GB DATASET
Dear Experienced R Practitioners, I have 4GB .txt data called "dataset.txt" and have attempted to use *ff, bigmemory, filehash and sqldf *packages to import it, but have had no success. The readLines output of this data is: readLines("dataset.txt",n=20) [1] " "
2011 Aug 24
1
setMethods/setGeneric problem when R CMD CHECK'ing a package
R-helpers: I'm trying to build a package, but I'm a bit new to the whole S3/S4 methods concept. I'm trying to add a new definition of the zoo function "as.yearmon", but I'm getting the following error when it gets to this point during a package install: *** R CMD INSTALL STARStools * installing to library
2010 Mar 14
1
mailman and postfix on CentOS
Hello, I'm trying to get postfix and mailman going on CentOS 5.4. I had this working previously, six to eight months ago, and shut it down since the need for use was no longer there. I've now reactivated mailman and set up a list. The software versions I'm using are httpd 2.2.14, postfix 2.3.3, and mailman 2.1.9. All the services are started, the list is created, and email is sent to
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
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
2018 Apr 15
4
Adding a new conditional column to a list of dataframes
Hi all .., I have a list of 7000 dataframes with similar column headers and I wanted to add a new column to each dataframe based on a certain condition which is the same for all dataframes. When I extract one dataframe and apply my code it works very well as follows :- First suppose this is my first dataframe in the list > OneDF <- Mylist[[1]] > OneDF ID Pdate
2011 Dec 26
4
Other ways to lm() regression? (non-loop?)
Hi, I'm quite new to R (1 month full time use so far). I have to run loop regressions VERY often in my work, so I would appreciate some new methodology that I'm not considering. #--------------------------------------------------------------------------------------------- y<-matrix(rnorm(100),ncol=10,nrow=10) x<-matrix(rnorm(50),ncol=5,nrow=10) #Suppose I want to run the
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
2009 Jan 06
3
Two Noobie questions
1. I have a list of lm (linear model) objects. Is it possible to select, through subscripts, a particular element (say, the intercept) from all the models? I've tried something like this: List[[1:length(list)]][1] All members of the list are similar. My goal is to have a list of the intercepts and lists of other estimated parameters. Is it better to convert to a matrix? How to do this? 2.
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
2012 Mar 24
3
Handling 8GB .txt file in R?
Hi, I am mediocre at R, maybe 1000 hours experience, but I received an 8GB dataset and I don't know what to do with it. I have to do extensive analysis over it for my Honours thesis. I can't even import it. I've tried; - Splitting it up using the free csv-splitter-1.1.zip that seems to be working for everyone else (it doesn't work for me, it just outputs 1 single line). -
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]]
2020 Feb 26
1
Re: *** buffer overflow detected *** accessing invalid FD in libguestfs
On Wednesday, 26 February 2020 10:43:27 CET Richard W.M. Jones wrote: > On Wed, Feb 26, 2020 at 11:21:18AM +0200, Veselin Kozhuharski wrote: > > Hallo Rich, > > > > Here is the fd list and total number just before collectd application > > crashes. Before that the number of used fd's is constantly increasing. It > > looks like a fd leak inside libguestfs to me.