Displaying 20 results from an estimated 6000 matches similar to: "User input(unknown name and number of files)"
2011 Aug 22
3
automatic file input
Dear all,
I have 100 files which are used as input.and I have to input the name of my files again and again.the name of the files are 1.out, 2.out......100.out.
I want to know if there is anything like perl so that i can use something like this-
for($f = 1; $f <= 100; $f++) {
$file = $f.".out";
I have tried this thing in R but it does not work.Can somebody please help me.
2011 Jul 01
13
For help in R coding
Dear all,
I am doing a project on variant calling using R.I am working on pileup file.There are 10 columns in my data frame and I want to count the number of A,C,G and T in each row for column 9.example of column 9 is given below-
.a,g,,
.t,t,,
.,c,c,
.,a,,,
.,t,t,t
.c,,g,^!.
.g,ggg.^!,
.$,,,,,.,
2011 Jul 14
5
Adding rows based on column value
Dear all,
I have one problem and did not find any solution.(I have also attached the problem in text file because sometimes column spacing is not good in mail)
I have a file(file.txt) attached with this mail.I am reading it using this code to make a data frame (file)-
file=read.table("file.txt",fill=T,colClasses = "character",header=T)
file looks like this-
Chr Pos
2011 Oct 31
3
Plot two matrices and keeping the record of row names
Dear all,
I have two data frames- x1 and y1 with same row names and column names(actually the names of the patients).
x1
a b c d e
a 1.0000000 0.4730679 0.6226994 0.6036036 0.6433333
b 0.4730679 1.0000000 0.6227273 0.6303855 0.5730858
c 0.6226994 0.6227273 1.0000000 0.7290503 0.6900585
d 0.6036036 0.6303855 0.7290503 1.0000000
2011 Aug 07
3
Printing data frame with million rows
Dear all,
I was working on number of files and at the end I got a data frame with approx. million rows.To prin this data frame in output, I used
capture.output(print.data.frame(end,row.names=F), file = "summary", append = FALSE)
where end is the name of my data frame and summary is the name of my output file.
but when I checked the output there were only 10000 rows and at the last it
2011 Jul 05
3
Output data frame using write.table
Dear all,
I have a data frame whose name is m1.
I want to write this data frame in text file as output.I am using this code-
write.table(m1, file = "kas.txt", append = FALSE,row.names=F,quote=F,sep="\t")
When I am opening my kas.txt file,the column names are not coming exactly above the column.
What should I do.Please help me.
Thanking you,
Warm Regards
Vikas Bansal
Msc
2011 Jul 24
2
Deleting rows and store the deleted rows in new data frame
Dear all,
I am using grep but I did not understand the problem as I am doing something wrong.Please help me.
I am using this code-
sf=data.frame(sapply(df[],function(x) grep('\\.&\\,', df[,9])))
the thing is i have a data frame(df) like this-
10 135349467 g G 4 0 0 5 ,,,.,
10 135349468 t T 2 0 0 5 ,,c.,
10 135349469 g G 7 0 0 5 ,,a.,
10 135349470 c C 8 0 0 5 ,,,.,
10 135349471
2011 Aug 07
1
Removing funny characters from a column of a data frame
Dear all,
The 5th column of my data frame is like this-
.$.$.$.$.$,$,$...,,,,,.,,.,,...,,,,.,,....,,,T...,,,,,,,,,,,.,,,,,....,,...,,
,..,,....,,,,,...,,,..,,......,,,,,,,....,,,.,,,,....,,...G.,,,,,,,,...,,,,,,.,,
,t.,,c,,.a.,,,.A,,,,....,,,.....,,,,..........,,,,,..,,,.,,,....,,,,,...,,,$....
.,,,,..,,,...,,,,,..,,,,,,.............$..,,,,,,...,,..,,$,...,,,,,,,....,,,,,,.
2011 Jul 13
1
Error non-numeric argument to binary operator
Dear all,
I have a data frame df and i am using a code shown below.
df[, "total"] <- rowSums(df[, 3:6]) MAKING A NEW COLUMN total in df BY ROWSUMS
defineSamples<- function()
{
readline("enter the number of INDIVIDUALS IN POOL: ")
}
df$ind=definesamples() CALLING THE FUNCTION AND STORING THE INPUT FROM USER IN NEW COLUMN OF df
df[, 3:6] <-
2010 Jan 31
2
Reshaping matrix of vectors as dataframe
Dear R people,
I have to deal with the output of a function which comes as a matrix of
vectors.
You can reproduce the structure as given below:
x <- list(c(1,2,4),c(1,3,5),c(0,1,0),
c(1,3,6,5),c(3,4,4,4),c(0,1,0,1),
c(3,7),c(1,2),c(0,1))
data <- matrix(x,byrow=TRUE,nrow=3)
colnames(data) <- c("First", "Length", "Value")
rownames(data)
2011 Aug 01
1
Inserting column in between -- "better" way?
Folks:
I consider my reply below rather clumsy: One has to keep track of
index numbers other than that which is inserted and must separately
change column names. Is there as "essentially better" way to do this,
either via base R or via an R package. I leave it to you to define
"essentially better."
Thanks.
Cheers,
Bert
On Mon, Aug 1, 2011 at 10:17 AM, Bert Gunter
2001 Nov 29
2
plotting (a) confidence intervals (b) standard error
Hi all,
I'm building a plot of the values in tmeant (below) against positions 1 to
5, using matplot.
tmeant looks like this:
case1 case2
pos1 861.8466 818.5909
pos2 961.2841 976.3466
pos3 878.6080 1262.8523
pos4 950.8011 1129.6080
pos5 968.1080 1063.3920
I also have lower (object tl) and upper (object tu) bounds on the
confidence intervals as follows:
tl:
pos1
2010 May 26
2
reading in table with different number of elements in each row
HI all,
This is probably simple, but I haven't been able to locate the answer either
in the Import Manual or from searching the listserve.
I have tab-delimited data with different numbers of elements in each row. I
want to read it into R, such that R fills in "NA" in elements that have no
data. How do I accomplish this?
Example:
DATA on disk:
1 -0.068191 -0.050729
2012 Nov 17
1
Strange problem with reading a pipe delimited file
I am trying to read in a pipe delimited file that has rows with varying number of columns, here is my sample data:
A|B|C|D
A|B|C|D|E|F
A|B|C|D|E
A|B|C|D|E|F|G|H|I
A|B|C|D
A|B|C|D|E|F|G|H|I|J
You can see line 6 has 10 columns. Yet, I can't explain why R does like so:
> test <- read.delim("mypaths4.txt", sep="|", quote=NULL, header=F,
2008 Jun 23
1
problem in R for Linear mixed model~
Dear R users:
I just got confused some R code used in linear mixed model~
example,two factors,A, B,C,A is fixed ,B,C are random,and B is nested in
C,if I wannt to use linear mixed model,are the following code correct for
each case?
case1:want to know random effect of B,
case1<-lme(y~A*B*C,random=~B|C) where "B|C" stand for what?,mean B is
nested in C?
case2: how to wirte
2006 Apr 06
1
rbind
Hi list,
I have been trying to pileup dataframes with different column names using
rbind. I am getting the following error message. I was wondering if there is
a way to go around this minor problem?
Error in match.names(clabs, names(xi)) : names don't match previous names:
G
Thanks indeed for your information
Regards
Mahdi
--
-----------------------------------
Mahdi Osman (PhD)
2002 Nov 27
1
read.table: colClasses when num. of columns is unknown
Hi,
I am looking for a way to read tables that have general structure of
characterTag num1 num2 ...
i.e. one character column followed by an unknown to the caller (but fixed
throughout the file) number of numeric columns. I wanted to improve the
speed of read.table by using colClasses, but that seemed to require
knowledge of the actual number of columns in the file. For example I tried
2007 Dec 20
1
dovecot-auth: returning incorrect maildir for user (user seeing another user's mail)
timo, here is an bizarre bug for you:
i had (foolishly, it turns out) configured dovecot-auth to do ldap
authentication binding with a prefect userdb (configs at end of
message). everything worked fine, although with huge numbers of pop
logins per second we started to see some pileup in the pop3-login
processes as they were all waiting for ldap responses on the single ldap
connection. the
2012 Apr 23
1
ggplot2 - geom_bar
Hello,
I've some problem with the ggplot2. Here's a small example:
--8<--
library(ggplot2)
molten <- data.frame(date=c('01','01','01','01',
'02','02','02','02'),
channel=c('red','red','blue','blue',
2010 Sep 05
4
converting string vector to integer/numeric vector
Hi,
Is it possible to convert a string vector to integer or numeric vector? In
my situation I receive data in a string vector and have to convert it based
on a given type.
--
Rajesh.J
[[alternative HTML version deleted]]