Displaying 20 results from an estimated 800 matches similar to: "Changing a for loop to a function using sapply"
2009 Sep 20
3
statistics
The myoglobin sequence, with reference number NM_005368 in Gen bank, has the
following
frequencies of DNA nucleotides:
A C G T
237 278 309 242
Do these data provide sufficient evidence, at the 1% level of significance,
that the DNA nucleotides
have an unequal distribution, that is the DNA nucleotides are not evenly
utilised?
Clearly state your hypothesis, test statistic and conclusion.
2018 May 03
3
Package for Molecular Properties
All
Is there a package or library that will, given a nucleotide sequence
1. calculate the extinction coefficient at 260 nm for (Beer-Lambert's law)
2. calculate molecular weight
3. return it's complementary sequence
I was able to find several packages that can do similar calculations for an amino acid sequence for proteins but none for nucleic acids.
Any pointers, etc. would be
2018 May 03
0
Package for Molecular Properties
library(sos)
(mp <- findFn('{molecular properties}'))
????? ** found 7 matches in 4 packages and opened two web pages in my
default browser with (a) the 7 matches and (b) the 4 packages. The first
function was something for amino acids, like you suggested.? Two others
returned compound and substance information from PubChem.
????? Does this help?
????? Spencer
On
2008 Sep 17
3
using for variable as rowname
Is there a way to use the cycle variable for rowname?
v=1:6
for (a in 1:3){
for (b in 4:5) {
v=rbind(v,a.b=1)
}
}
v
This above obviously does not work, but I couldn't find out how to use a and
b to construct a rowname like 14, 15, 24, 25.
Thanks for the help.
Balazs
--
View this message in context: http://www.nabble.com/using-for-variable-as-rowname-tp19533203p19533203.html
Sent from
2009 Nov 16
1
extracting values from correlation matrix
Hi! All,
I have 2 correlation matrices of 4000x4000 both with same row names and
column names say cor1 and cor2. I have extracted some information from 1st
matrix cor1 which is something like this:
rowname colname cor1_value
a b 0.8
b a 0.8
c f 0.62
d k 0.59
- - --
-
2007 Oct 17
3
type conversion
Hello,
I am trying to do arithmetic on numbers extracted from a PostgreSQL
database, wherein the numbers are stored as type "money". The
transcript below illustrates the problem.
> Membersind06 <- sqlQuery(channel,"select * from income where rowname like '%Membersind%'")
> names(Membersind06)
[1] "rowname" "item"
2009 Mar 02
3
Error setting rowname if rowname currently NULL
Hi,
My first post here and new to R so please bear with me (long time programmer
though, helping a friend with some scripts).
I've noticed a behaviour when using rownames() that I think is odd,
wondering if I'm doing something wrong.
To illustrate, say I create a very simple matrix (called fred):
fred<-matrix(,4,2)
It looks like this:
[,1] [,2]
[1,] NA NA
[2,] NA NA
2004 Jun 11
4
rownames of single row matrices
Hi
I want to extract rows of a matrix, and preserve rownames even if only
one row is selected. Toy example:
R> a <- matrix(1:9,3,3)
R> rownames(a) <- letters[1:3]
R> colnames(a) <- LETTERS[1:3]
R> a
A B C
a 1 4 7
b 2 5 8
c 3 6 9
Extract the first two rows:
R> wanted <- 1:2
R> a[wanted,]
A B C
a 1 4 7
b 2 5 8
rownames come through fine. Now extract just
2009 Apr 08
1
Colour each letter of a text string in a plot
I am inserting a DNA sequence into a plot, and hope to colourize each
of the four nucleotide of the DNA sequence with a unique colour i.e.,
A ("red"), C ("green"), G ("blue", and T ("yellow"). I use the
following codes, but the DNA sequence only shows as "red"
DNA <- "ACGT"
plot(1, xlim = c(0,1), ylim = c(0,1), axes=F,
2006 Feb 12
1
Mathematical typesetting of column heads using the latex (Hmisc) function
Dear r-helpers,
I would very much appreciate help with the following problem:
The following command (in a .Rnw file)
latex(anova(e7.lmer3, e7.lmer4), file = 'e7lmer34.tex', rowname = c
('nonlinear', 'linear'), longtable = FALSE, dcolumn = T, booktabs =
T, table.env = F)
produces the following output after running Sweave:
% latex.default(anova(e7.lmer1, e7.lmer2),
2008 May 19
2
Sort matrix with duplicate row names alphabetically by rowname
Hi,
I've a matrix that contains 4 replicates of each rowname. (4 a's, 4
b's, 4 c's in no particular order) Like this:
#
c 32
a 1
b 4
c 87
c 34
b 54
a 23
a 12
b 9
a 3
b 87
c 43
There are a couple of more columns but I'm using the above as an example
I need to sort it so that the same rownames appear together in
alpahbetical order. Like this:
#
a 1
a 23
a 12
a 3
b 4
2009 Jul 13
2
how to keep row name if there is only one row selected from a data frame
Hi, there:
Assume I have a dataframe with rownames like A with rownames like a to e,
> A
[,1] [,2]
a 1 6
b 2 7
c 3 8
d 4 9
e 5 10
when I use A[1,], I lost the rowname for it, like below. How could I keep
it? Is there an easy way instead that I have to modify by myself after I
used A[1,] manually.
> A[1,]
[1] 1 6
Thanks,
W.
--
Weiwei Shi, Ph.D
Research
2008 Jul 04
1
Hmisc latex: table column width
R users,
I'm trying to set a column width to one of the columns in a latex
table (using Hsmic package, latex function). My intention is to get
\begin{tabular}{lp{1.2in}llllll}\hline\hline
Here's an example
####### R code #########
DF <- data.frame(Titanic)
DF$long <- paste("This is a veeeeeeeeeeryyyyyyyyyy long line")
DF <- DF[, names(DF)[c(6,1:5)]]
library(Hmisc)
2006 Jul 04
1
[Fwd: formatting using the write statement]
>I have a series of write statements because
>i am writing to a file
>where the characters strings are the column names of a dataframe
>and the numbers are the elements in a particular row.
>So, a file might look like
>
>AAA 2.1
>BB 3.1
>AHLZ 0.2
>
>and it would be named "rowname".mls.
>
>so, each time i get to a new row, i create a new file and
2010 Sep 27
2
Adding row name to dataframe
Dear all,
I am trying to add a value to a dataframe and name the row with a number.? I
have tried row.name, rowname, and attr(x,"row.names") but none seem to work.? It
seems like it should be simple, so not sure why I can't get it to work.? Any
suggestions?
Thanks,
Tim
x<-seq(1,20,2)
y<-seq(20,1,-2)
xy<-data.frame(x,y)
xy<-rbind(xy,c(0,0))
#Threeattempts that
2012 Aug 31
1
reviews for quality control
Hi,
It might be a trivial question but I just wonder if you could advise good theoretical tutorials, reviews on NGS (different platforms) quality control like nucleotides quality by cycle, nucleotides frequency by cycle, GC content and distribution, K-mer frequency by cycle as well as quality control after alignment and mapping.
Look forward to your reply,
Carol
[[alternative HTML version
2009 Jul 27
2
Split rownames into factors
Hi Guys,
I was wondering how you would go about solving the following problem:
I have a list where the grouping information is in the row names.
Rowname [,1]
X1Jan08 324
X1Jun08 65
X1Dec08 543
X2Jan08 23
X2Jun08 54
X2Dec08 8765
X3Jan08 213
X3Jun08 43
X3Dec08 65
How can I create the following dataframe:
Value Date Group
[1,] 324 Jan 08 X1
[2,] 65 Jun 08
2007 Nov 26
1
visualizing nucleotide sequence properties
Hi there,
I am looking for R-packages that can help me visualize properties on
nucleotide sequences. I want to display sequences in the 1-100K base range
as lines and plot features above and below those lines.
Any ideas would be welcome.
Thanks,
Bernd
[[alternative HTML version deleted]]
2011 Dec 26
4
Summary tables of large datasets including character and numerical variables
Hello !
I am attempting to switch from being a long time SAS user to R, and would
really appreciate a bit of help ! The first thing I do in getting a large
dataset (thousands of obervations and hundreds of variables) is to run a SAS
command PROC CONTENTS VARNUM command - this provides me a table with the
name of each variable, its type and length; then I run a PROC MEANS - for
numerical
2008 Dec 09
2
motif search
Hi,
I am very new to R and wanted to know if there is a package that, given
very long nucleotide sequences, searches and identifies short (7-10nt)
motifs.. I would like to look for enrichment of certain motifs in
genomic sequences.
I tried using MEME (not an R package, I know), but the online version
only allows sequences up to MAX 60000 nucleotides, and that's too short
for my needs..