Hi Lily,
I think below codes can work:
f<- list.files("D:/output/test/your folde
rname",full.names=TRUE,recursive=TRUE)
files<- grep(".csv", f)
files_merge<- data.frame()
for (i in 1:length(f[files])){
data<- read.csv(file=f[files][i],header=TRUE, sep=",")
files_merge<- rbind(files_merge,
Hello specialist,
I have a matrix in which there are NA,0,1 and 2 in each columns.
I wanna replace NAs with special proportion of 0,1 or 2 !
for example in df<- matric(df, nrow=50, ncol=100)
If in one column the number of NAs = 10 , # of 0=50 , #of 1=25 and # of
2=15
I want to replace 5 of 10 N
Hi Dears!
Would you please let me know how I can install package pcalg for R version
3.1.3 ?
I've tried different ways but got error!
Thanks inadvance!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE
6, 2016 at 4:32 PM, David Winsemius
wrote:
>
> > On May 6, 2016, at 2:12 PM, Lida Zeighami wrote:
> >
> > Hi there,
> >
> > Is there any way to find out high correlated variables among a big
> matrix?
> > for example I have a matrix called data= 2000*50
Hi there,
Is there any way to find out high correlated variables among a big matrix?
for example I have a matrix called data= 2000*5000 and I need to find the
high correlated variables between the variables in the columns! (Need 100
high correlated variables from 5000 variables in column)
I could
s "Bloom County" comic strip )
>
>
> On Wed, Mar 16, 2016 at 8:59 AM, Lida Zeighami wrote:
> > Hi,
> > I have a huge .RData file and I need just to get the colnames of it. so
> is
> > there any way to reach the column names without loading or reading the
&
Hi,
I have a huge .RData file and I need just to get the colnames of it. so is
there any way to reach the column names without loading or reading the
whole file?
Since the file is so big and I need to repeat this process several times,
so it takes so long to load the file first and then take the co
Hi dear experts,
I have a general question in R, about the categorical variable such as
Gender(Male or Female)
If I have this column in my data and wanted to do regression model or feed
the data to seqmeta packages (singlesnp, skat meta) , would you please let
me know should I code them first ( ma
Hi there,
I want to find the intersection between two different data frame or
matrices based on two columns.
for example in matrix A I have 5 columns, the first two columns are Id1 and
Id2 and I have the same columns in the other matrix B, (Id1, Id2 ,,,)
how can I find the intersection between the
e observing such error. Without
> more information – at least structure of your data
>
>
>
> see ?str
>
>
>
> but preferably part of your data causing error and a code you hardly get
> any sensible advice.
>
>
>
> Cheers
>
> Petr
>
> *From:* Lida
Goslee
wrote:
> On Wed, Aug 12, 2015 at 2:04 PM, Lida Zeighami wrote:
> > I applied this code in a loop function but since in some matrices there
> > isn't any 2, so I got the below error:
> >
> > idx<- apply(lofGT_met,1, function(x)as.numeric(any(x==2 &
t; bb110NA 0 1 0
> cs212 1 0 0 1
> de010NA0 0 0
> gh200 0 0 0 1
>
> Sarah
>
> On Mon, Aug 10, 2015 at 4:11 PM, Lida Zeighami wrote:
>
>> Hi there,
>>
&
is is an issue.
>
> Cheers
> Petr
>
>
> > -Original Message-
> > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Thierry
> > Onkelinx
> > Sent: Monday, August 10, 2015 10:29 PM
> > To: Lida Zeighami
> > Cc: r-help@r-project.org
Hi there,
I have a matrix contain 0,1,2, NA elements.
I want to add a column to this matrix with name of "idx" . then for each
row, I should put 1 in this column (idx) if there is at least one 2 in that
row otherwise I should put 0 in this column!
for example mydata:
125 255 558 23
olumns and add the result to the all sing object
> }
>
> Now, you just have to do it for the other cases and save your final object.
>
> Hope this help !
>
> Arnaud
>
> ###
>
> Date: Sat
I have 600 folders in which there are 3 csv files. The name of folders are
as follows: EA_aa, EA_bb, EA_cc, EA_dd,
In each folder there are 3 csv files:
in folder EA_aa there are:
EA_sing_aa.csvqwerty
EA_ska_aa.csv
EA_tat_aa.csv
In folder EA_bb:
EA_sing_bb.csv
EA_ska_bb.csv
EA_tat
I have ma matrix which its elements are NA,0,1,2 ! I got my answer bout
removing the columns with 0 or NA or both values but now I want to add
additional condition for deleting the columns! I have to delete the columns
which contain the same value. delete the columns with NA or 0 or both and
the co
Hi there,
I have a matrix which its elements are 0, 1,2,NA
I want to remove the columns which the colsums are equal to 0 or NA and
drop these columns from the original matrix and create the new matrix for
the nonzero and NA value?
(I think I have consider na.rm=True and remove the colums with col
Hi there,
I have a matrix and I want to get a subset from that which one of its
matrix meet a condition,
my matrix is
met
Row.names Name
maf caf
1 10:13915 10:139 0.0003782148
0.0003782148
2 10:18738 10:1873
Hi there,
I have a two matrices which they have a common column! I want to add the a
column of second to matrix to the equivalent column of first matrix!
my first matrix is
head(mat1)
a b c d
fg1:23 dfgv 5
pt10:18 tgtgh 1
wq 15:123oiljk
aste0("prep", i))
> }
> ###
>
> Mark
>
>
> R. Mark Sharp, Ph.D.
> Director of Primate Records Database
> Southwest National Primate Research Center
> Texas Biomedical Research Institute
> P.O. Box 760549
> San Antonio, TX 78245-0549
> Telephone: (210)2
I should do this process for 682 row names of "met" matrix and at the end I
should have"prep1.RData" , "prep2.RData" , "prep3.RData"
so, would you please help me how to do it?
Many Thanks,
Ati
On Wed, Jul 1, 2015 at 1:07 PM, Lida Zeighami wrote:
I have 682 variables in a data frame , and a function that I should feed
682 variables in this function one by one and each time save the file as a
special name!
for emaple:
my data frame file includes 682 names :
1 aaa
2 bbb
3 dfdsfg
4 fghh
.
682 fgfhg
and a function like prep(Z, aaa, .)
Hi there,
I have a matrix (n*m) which rows including 0,1,2
I want to know the frequency of each elements (0 , 1 , 2) separately for
each row!
for example :
123 456 7
A 0 1 10 222
B 1 1 1200 2
C 21 10 0
24 matches
Mail list logo