similar to: How to extract sets of rows (not sorted) from text file in R, do some methods on these rows, save the result in another text file, then pick others set of rows and do the same

Displaying 20 results from an estimated 2000 matches similar to: "How to extract sets of rows (not sorted) from text file in R, do some methods on these rows, save the result in another text file, then pick others set of rows and do the same"

2013 Nov 19
0
How to extract sets of rows (not sorted) from text file in R, do some methods on these rows, save the result in another text file, then pick others set of rows and do the same
Hi, You may need ?split(), or ?aggregate() or ?ddply() from library(plyr) dat1 <- read.table(tex="1 2 4 7 8 9 1 4 5 8 9 1 4 5 6 9 2 3 4 8 3 6 7 8 1 5 6 9 2 5 7 9",header=FALSE,sep="",fill=TRUE)? ## ?res1 <- do.call(rbind,lapply(split(dat1,dat1[,1]),function(x) c(V1=x[1,1],colSums(x[,-1],na.rm=TRUE))))
2012 Apr 26
1
NFS quotas on Solaris 10
Hi list, I'm running Samba 3.6.4 on Solaris 10 x86. Underlying filesystem is ZFS. Since updating from 3.6.0, free space on NFS mounted ZFS filesystem, without a userquota set for the user, is always reported zero. 'quota -v' and the perl module 'Quota' both report no quota for such file systems. (Un)setting (ref)quota for those filesystems doesn't change anything. Any
2007 Nov 13
2
connection diagram
Hi I am practically new to R, and need to construct connection diagrams, I have a table of data, of nodes in vertical rows, and horizontally the number of outgoing connections to other nodes, and the indices of these nodes, each in a column, so some columns are used, and some are not, based on how many connections I have the node is identified by these variables (dimension, wave number,
2013 Aug 09
0
Re: Bridging Wireless Cards for KVM
On Thu, Aug 08, 2013 at 08:55:27PM -0600, Joshua McKee wrote: > Hi, > > I hope this is the right place to ask this question. I was wondering if > there is a way to set up a KVM VM using an XML document as input into Virsh > that uses bridged networking over a wireless card. > > I understand that wireless cards to not natively support, but I was able to > find a working
2013 Aug 11
0
Re: Bridging Wireless Cards for KVM
Sorry, I accidentally hit send before I was done. Here's the finished message: Thanks! Unfortunately, I am running into the following issue when attempting to use the generic ethernet configuration: $ virsh -c qemu:///system create /tmp/generic.xml error: Failed to create domain from /tmp/generic.xml error: internal error process exited while connecting to monitor: kvm: -netdev
2013 Aug 11
2
Re: Bridging Wireless Cards for KVM
Thanks! Unfortunately, I am running into the following issue when attempting to use the generic ethernet configuration: $ virsh -c qemu:///system create /tmp/generic.xml error: Failed to create domain from /tmp/generic.xml error: internal error process exited while connecting to monitor: kvm: -netdev tap,id=hostnet0: could not configure /dev/net/tun: Operation not permitted kvm: -netdev
2001 Jun 21
0
Bug: OpenSSH (port.) daemon sets $MAIL incorrectly on Solaris (others?)
This bug may be specific to the portability releases of OpenSSH. It's minor, but trivially corrected. I'm observing it under: * openssh-2.3.0p1 (openssl-0.9.6) * compiled under Solaris 2.5.1 * running under Solaris 2.5.1 and Solaris 8 The relevant source code does not appear to have changed up to and including openssh-2.9p2. The bug is that the $MAIL environment variable
2013 Jul 24
0
subtracting rows for unique
Hi, Try: dat1<- read.table(text=" ID Date x2 x1????????? x3 56 25-Jun-01 10 2? 126 56 29-Oct-01 10 2? 140 56 18-Mar-02 10 2? 445 56 6-Jun-03 10 2??? 224 56 16-Jan-04? 10 2??? NA 58 10-Jan-02 10.8 1 715 58 26-Dec-03 10.8 1??? NA ",sep="",header=TRUE,stringsAsFactors=FALSE) ?unlist(with(dat1,by(as.Date(Date,format="%d-%b-%y"),ID,FUN=function(x)
2013 Apr 29
1
how to add new rows in a dataframe?
Hi, dat1<- read.table(text=" id??????????????? t???????????????????? scores 2???????????????? 0??????????????????????? 1.2 2???????????????? 2???????????????????????? 2.3 2???????????????? 3??????????????????????? 3.6 2???????????????? 4??????????????????????? 5.6 2???????????????? 6??????????????????????? 7.8 3???????????????? 0??????????????????????? 1.6 3????????????????
2011 Aug 05
1
If find x, then y, else do nothing
I want to write code that says "If you find an element equal to 4 in this vector for each person in the data set tested separately, then put in 1 for 2 and 2 for 4, else leave the variable as is" u.ppl <- (unique(init.dat1$grid)) l.ppl <- length(u.ppl) for (i in 1:l.ppl) { if (grep("4",init.dat1$Slide1_RESP)) {2 == 1, 4 == 2}; else
2008 Mar 25
2
Compare two data sets
I would like to compare two data sets saved as text files (example below) to determine if both sets are identical(or if dat2 is missing information that is included in dat1) and if they are not identical list what information is different between the two sets(ie output "a1", "a3" as the differing information). The overall purpose would be to remove "a1" and
2013 May 09
0
Replace rows in dataframe based on values in other columns
Hi, dat1<- read.table(text=" Restaurant owner purchase_date ??????????? 23 Chuck 3/4/2011 ??????????? 23 Chuck 3/4/2011 ??????????? 23 Chuck 3/4/2011 ??????????? 23 Chuck 3/4/2011 ??????????? 23 Bob??????? 1/1/2013 ??????????? 23 Bob??????? 1/1/2013 ??????????? 23 Bob???????? 1/1/2013 ??????????? 15 Hazel 4/11/2010 ??????????? 15 Hazel 4/11/2010 ??????????? 15 Hazel 4/11/2010 ???????????
2013 Apr 12
1
Removing rows that are duplicates but column values are in reversed order
Hi, From your example data, dat1<- read.table(text=" id1?? id2?? value a????? b?????? 10 c????? d??????? 11 b???? a???????? 10 c????? e???????? 12 ",sep="",header=TRUE,stringsAsFactors=FALSE) #it is easier to get the output you wanted dat1[!duplicated(dat1$value),] #? id1 id2 value #1?? a?? b??? 10 #2?? c?? d??? 11 #4?? c?? e??? 12 But, if you have cases like the one
2013 Apr 18
1
select and do some calculations/manipulations on certain rows based on conditions in R
Hi, May be this helps (Assuming that there are only '0's and '1's in the dataset) dat1<-read.table(text=" ??????? ID X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 1?? 5184??? 0??? 0??? 0??? 0??? 0?? 0?? 0??? 0??? 0??? 1???? 0????? 0????? 0????? 0????? 0????? 0 2?? 6884??? 0??? 0??? 1??? 0??? 0?? 1?? 0??? 0??? 0??? 0???? 0????? 0????? 0????? 0????? 0????? 0 3?
2013 Apr 10
0
[LLVMdev] How to call the llvm.prefetch intrinsic ?
Alexandra, I'm not sure what you mean by "replace", but I have code that does this to insert prefetches: Type *I8Ptr = Type::getInt8PtrTy((*I)->getContext(), PtrAddrSpace); Value *PrefPtrValue = ... IRBuilder<> Builder(MemI); Module *M = (*I)->getParent()->getParent(); Type *I32 = Type::getInt32Ty((*I)->getContext()); Value
2012 Aug 07
0
predicting test dataset response from training dataset with randomForest
Hi I am new to R so I apologize if this is trivial. I am trying to predict the resistance or susceptibility of my sequences to a certain drug with a randomForest function from a file with amino acids on each of the positions in the protein. I ran the following: > library(randomForest) > > path <- "C:\\..." > path2 <- "..." > name <-
2004 Nov 24
1
what does order() stand for in an lme formula?
I'm a beginner in R, and trying to fit linear models with different intercepts per group, of the type y ~ A*x1 + B, where x1 is a numerical variable. I cannot understand whether I should use y1 ~ x1 +1 or y1 ~ order(x1) + 1 Although in the toy example included it makes a small difference, in models with many groups the models without order() converge slower if at all!
2013 Sep 09
0
Duplicated genes
Hi, May be you can try this: dat1New<-? dat1[!(duplicated(dat1$gene)|duplicated(dat1$gene,fromLast=TRUE)),] dat2<-dat1[duplicated(dat1$gene)|duplicated(dat1$gene,fromLast=TRUE),] ?lst1<-split(dat2,dat2$gene) dat3<-unsplit(lapply(lst1,function(x) {x1<- sum(apply(x[,6:32],2,function(y) y[1]>=y[2]));x2<- sum(apply(x[,6:32],2, function(y) y[1]<=y[2])); if(x1>x2) x[1,] else
2009 Oct 10
1
Resultados distintos
Buenas tardes a todos, tengo un problema con R: ejecuto el mismo script en el ordenador del trabajo y en mi portátil con los mismos datos y obtengo resultados diferentes (siendo los correctos, los obtenidos en el trabajo): rm(list=ls()) directorio<-"C:\\Documents and Settings\\BDs\\" library(RODBC) library(car) library(gdata) ### DATOS A ###
2012 Dec 06
0
Summary command: Two independent variables against dependent.
Brilliant, thanks very much!! Works fine. Dan On 6 Dec 2012, at 18:25, arun kirshna [via R] wrote: > Hi, > Your question is not very clear. I hope you are not looking for the subset option in summary(lm()). > If you want just the summary(), then use '&' or '|' > For e.g. > dat1<-read.table(text=" > opcorn Oilamt Batch Yield >