Displaying 20 results from an estimated 8000 matches similar to: "Testing for differecnes between groups, need help to find the right test in R. (Kes Knave)"
2008 Feb 04
1
counting identical data in a column
Hi Peter
I have the following data frame with chromosome name, start and end positions:
chrN start end
1 chr1 11122333 11122633
2 chr1 11122333 11122633
3 chr3 11122333 11122633
8 chr3 111273334 111273634
7 chr2 12122334 12122634
4 chr1 21122377 21122677
5 chr2 33122355 33122655
6 chr2 33122355 33122655
I would like to count the positions that have the same start and
2008 Feb 10
11
data frame question
Hello
I have 2 data frames df1 and df2. I would like to create a
new data frame new_df which will contain only the common rows based on the first 2
columns (chrN and start). The column score in the new data frame
should
be replaced with a column containing the average score (average_score) from df1
and df2.
df1= data.frame(chrN= c(“chr1”, “chr1”, “chr1”, “chr1”, “chr2”,
“chr2”, “chr2”),
2010 Oct 01
1
[Help]:How to use "loop" to achieve this aim?
Hello, Everyone,
how to use "loop" to make the process automatic and fast?
When compute each sample, the script type in R almost the same, just the
input and output file's name is changed(chr1 change to chr2, chr3,chr4...).
The first sample's script like this:
>chr1=MEDIPS.readAlignedSeqences(BSgenome="hg19", file="chr1",numrows= )
2008 Feb 18
3
remove column names from a data frame
I want to remove the column names from a data frame. I do
it the long way, can any body show me a better way ?
df= data.frame(chrN= c(“chr1”, “chr2”, “chr3”), start= c(1,
2, 3), end= c(4, 5, 6), score= c(7, 8, 9))
df
#I write a txt file without row or column names
write.table(df,"df1.txt",sep='\t',quote=FALSE,row.names=F,col.names=F)
#then I read it with the header = F
2011 Jan 31
1
how to search to value to another table
Hello,
I'm a new R user.
I have two different dummy tables with the variable name tb1 and tb2.
tb1<
v1 v2 v3 v4
"chr1" 22 23 3
"chr1" 36 37 1
"chr1" 54 55 0
"chr1" 77 78 1
"chr2" 80 81 4
"chr2" 85 86 0
"chr2" 99 100 1
2008 Feb 06
4
inserting text lines in a dat frame
Hi Jim
I am trying to prepare a bed file to load as accustom track on the UCSC genome browser.
I have a data frame that looks like the one below.
> x
V1 V2 V3
1 chr1 11255 55
2 chr1 11320 29
3 chr1 11400 45
4 chr2 21680 35
5 chr2 21750 84
6 chr2 21820 29
7 chr2 31890 46
8 chr3 32100 29
9 chr3 52380 29
10 chr3 66450 46
I would like to insert the following 4 lines at the beginning:
2011 Aug 10
2
Loops for repetitive task
Hello,
I have an R script that I use as a template to perform a task for multiple
files (in this case, multiple chromosomes).
What I would like to do is to utilize a simple loop to parse through each
chromosome number so that I don't have to type the same code over and over
again in the R console.
I've tried using:
for(i in 1:22){
etc..
}
and replacing each chromosome number with
2011 Oct 17
2
Histogram for each ID value
I have a dataframe in the general format:
chr1 0.5
chr1 0
chr1 0.75
chr2 0
chr2 0
chr3 1
chr3 1
chr3 0.5
chr7 0.75
chr9 1
chr9 1
chr22 0.5
chr22 0.5
where the first column is the chromosome location and the second column is
some value. What I'd like to do is have a histogram created for each chr
location (i.e. a separate histogram for chr1, chr2, chr3, chr7, chr9, and
chr22). I am just
2011 Jun 08
1
return counts of elements on a table column depending on elements on another column
Hi,
I am given the following table:
> head(hsa_refseq)
chr genome region start stop nu strand nu.1 nu.2
gene_id
1 chr1 hg19_refGene CDS 67000042 67000051 0 + 0 gene_id
NM_032291
2 chr1 hg19_refGene exon 66999825 67000051 0 + . gene_id
NM_032291
3 chr1 hg19_refGene CDS 67091530 67091593 0 + 2 gene_id
NM_032291
4 chr1 hg19_refGene exon
2010 May 20
5
sort a data.frame
Hello,
I have a dataframe:
dd <- data.frame(b = c("chr2", "chr1", "chr15", "chr13"),
x = c("A", "D", "A", "C"), y = c(8, 3, 9, 9),
z = c(1, 1, 1, 2))
>dd
b x y z
1 chr2 A 8 1
2 chr1 D 3 1
3 chr15 A 9 1
4 chr13 C 9 2
Now I want to sort them according column "b", but only its
2011 Oct 19
1
replacing percentage of values in data frame
I've been looking for how to change a certain percentage of values in a data
frame, but I've been struggling to find information in R.
For example:
#################example data##############
> data
V1 V2 V3 V4 V5 V6 V7
1 chr1 500 500 CHH 0 0.5 +
2 chr1 550 550 CHH 0 0.0 +
3 chr2 700 700 CHH 0 0.0 +
4 chr2 1000 1000 CHH 0 0.0 +
5 chr3
2010 Jun 07
1
average two sets of columns
Hi R experts.
how can I average two sets of columns?
dd <- data.frame(b = c("chr2", "chr1", "chrY", "chr13", "chrX"),
w=11:15, x = 1:5, y = c(8, 3, 9, 9,7),
z = c(1, 1, 1, 2, 8))
expected result for mean(w,x) and mean(y,z) is
1 chr2 6 4.5
2 chr1 7 2
3 chrY 8 5
4 chr13 9 5.5
5 chrX 10 7.5
Yu
[[alternative
2010 Nov 07
1
How do I order xyplot line points?
I have the following xyplot figure:
http://img577.imageshack.us/img577/686/filesizeresults12000000.png
The data are organized in a matrix file as follows:
Type Elements Chromosome Time
bedGz 12000000 chr1 14.240
bedGz 12000000 chr2 7.949
bedGz 12000000 chr3 5.103
bedGz 12000000 chr4 5.290
bedGz 12000000 chr5 5.161
...
The x-axis labels in the Chromosome column are ordered
2008 Feb 08
1
convertin a data frame column from character to numeric
I have a data.frame with all character columns, I would like to convert the last two columns into numeric.> x[1:5, ] chrN start end 1 chr1 71310034 71310064 2 chr14 23354088 23354118 3 chr14 71310034 71310064 4 chr15 37759058 37759088
5 chr22 18262638 18262668 > apply(x, 2, FUN = mode) chrN start end
2014 Feb 19
0
dispatch on "c" method when passing named arguments
Hi,
Many S4 objects in Bioconductor support "combining" via a "c" method.
A common use case is to combine a collection of S4 objects stored in
a list with the following idiom:
do.call("c", list_of_objects)
For many users this doesn't return what they expect though, because
their 'list_of_objects' is a named list and this seems to "break"
2013 Jan 09
1
R2html and Blackboard LMS : solved
Everything is ok on Firefox, IE, and iPad.
Thanks,
Erin
On Tue, Jan 8, 2013 at 7:58 PM, Erin Hodgess <erinm.hodgess at gmail.com> wrote:
> Dear R People:
>
> Has anyone used R2HTML in web files that were on the Blackboard LMS, please?
>
> I'm starting to do these but wanted to know if there were any
> potential pitfalls.
>
> Thanks,
> Erin
>
>
> --
2008 Feb 10
1
Error while using fitdistr() function or goodfit() function
Try changing your method to "ML" and try again. I tried the run the
first example from the documentation and it failed with the same error.
Changing the estimation method to ML worked.
@List: Can anyone else verify the error I got? I literally ran the
following two lines interactively from the example for goodfit:
dummy <- rnbinom(200, size = 1.5, prob = 0.8)
gf <- goodfit(dummy,
2017 Aug 17
1
really dumb question with building/creating a new package.
Thank you!
On Thu, Aug 17, 2017 at 4:55 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> r-package-devel is probably a better place to post this, especially if
> you do not get a satisfactory reply here. This list is about R
> programming, as you presumably know; your query is not.
>
> Cheers,
> Bert
>
>
> Bert Gunter
>
> "The trouble with having
2007 Mar 28
0
By sentence
Hi again!
Please try something like this:
> zone1.df
zone sex len
1 1 male 15
2 1 fema 20
3 1 fema 17
4 2 fema 19
5 2 male 18
> str(zone1.df)
'data.frame': 5 obs. of 3 variables:
$ zone: Factor w/ 2 levels "1","2": 1 1 1 2 2
$ sex : Factor w/ 2 levels "fema","male": 2 1 1 1 2
$ len : int 15 20 17 19 18
>
2019 Mar 04
1
Problem with compiling OpenBLAS to work with R
>>>>> Erin Hodgess
>>>>> on Fri, 1 Mar 2019 12:30:35 -0700 writes:
> Yay! I re-installed everything and got through "Make
> distribution"! I have one more question, please: I am
> running the make check-all. I have an error at reg-1d.
> It stops the process. However, the mean difference (as
> per the file) is