Displaying 20 results from an estimated 3000 matches similar to: "subsetting tables"
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis
i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values
> dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2013 May 15
1
x and y lengths differ
I have a problem with R. I try to compute the confidence interval for my
df. When I want to create the plot I have this problem: Error in
xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ.
I try this code:
library(dplR)
df.rwi <- detrend(rwl = df, method = "Spline",nyrs=NULL)
write.table(df.rwi,file="rwi.txt",quote=FALSE,row.names=TRUE)
2009 Sep 29
4
How can I avoid a for-loop through sapply or lapply ?
Through converting a miRNAs file from FASTA to character format I get a vector which looks like the following:
> nml
[1] "hsa-let-7a MIMAT0000062 Homo sapiens let-7a"
[2] "hsa-let-7b MIMAT0000063 Homo sapiens let-7b"
[3] "hsa-let-7c MIMAT0000064 Homo sapiens let-7c"
[4] "hsa-let-7d MIMAT0000065 Homo sapiens
2010 May 27
3
how to extract the 1st field from a vector of strings
I have the following vector of strings (shown only the first 3 elements)
> desc[1:3]
[1] "hsa-let-7a MIMAT0000062 Homo sapiens let-7a"
[2] "hsa-let-7a* MIMAT0004481 Homo sapiens let-7a*"
[3] "hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2*"
> is.vector(desc)
[1] TRUE
> A <- unlist(strsplit(desc[1:3], " "))
> A
[1]
2008 Nov 06
1
replacing values in a vector
Hello list.
I have a vector of values:
eg
> head(diff_mirs_list)
[1] "hsa-miR-26b" "hsa-miR-26b" "hsa-miR-23a" "hsa-miR-27b" "hsa-miR-29a"
[6] "hsa-miR-29b"
and I would like to conditionally replace each value in this vector with a number defined in a dataframe:
> fc
???????????? Probe ave.fc
1?????? hsa-let-7a?? 1.28
2?????
2011 Sep 09
3
Read a list of files into named R data.frames
I have a collection of .csv files in a directory, and want to read them
into R data.frames whose names
are the same as the file names, without the .csv extension
e.g., from
> (files <- list.files(pattern="*.csv"))
[1] "Allstar.csv" "AllstarFull.csv"
[3] "Appearances.csv" "AwardsManagers.csv"
[5]
2013 Jul 10
2
Replacing part of delimited string with R's regex
I have the following list of strings:
name <- c("hsa-miR-555p","hsa-miR-519b-3p","hsa-let-7a")
What I want to do is for each of the above strings
replace the text after second delimiter with "zzz".
Yielding:
hsa-miR-zzz
hsa-miR-zzz
hsa-let-zzz
What's the way to do it?
[[alternative HTML version deleted]]
2011 Oct 04
1
a question about sort and BH
Hi,
I have two questions want to ask.
1. If I have a matrix like this, and I want to figure out the rows whose
value in the 3rd column are less than 0.05. How can I do it with R.
hsa-let-7a--MBTD1 0.528239197 2.41E-05
hsa-let-7a--APOBEC1 0.507869409 5.51E-05
hsa-let-7a--PAPOLA 0.470451884 0.000221774
hsa-let-7a--NF2 0.469280186 0.000231065
hsa-let-7a--SLC17A5
2009 Sep 02
2
Normalized Y-axis for Histogram Density Plot
I have the following data which I tried to draw
the probability density plot.
Here is the code I have:
x <- read.table("mydat.txt");
d <- rep(x$V2,times=x$V3);
hist(d,probability=T, xlab="FlowSignal");
But why the y-axis range from 0 to 6,
instead of 0 to 1? What's the correct way to plot it?
#id flowsignal frequency
1 0.67 1
1 0.70 1
1
2013 Jan 27
2
rpart
Hi,
When I look at the summary of an rpart object run on my data, I get 7 nodes but when I plot the rpart object, I get only 3 nodes. Should the number of nodes not match in the results of the 2 functions (summary and plot) or it is not always the same?
Look forward to your reply,
Carol
--------------------------------------------
?summary(rpart.res)
Call:
rpart(formula = mydata$class ~ ., data
2011 Sep 30
1
Hi
Hi,
There is a question that I am confused.
I have a set of data like this:
hsa-miR-205--GATA3 0.797882767 1.08E-13
hsa-miR-205--ITGB4 0.750217593 1.85E-11
hsa-miR-187--PGF 0.797604155 3.24E-11
hsa-miR-205--SERPINB5 0.744124886 3.28E-11
hsa-miR-205--PBX1 0.734487224 7.89E-11
hsa-miR-205--MCC 0.72499934 1.80E-10
hsa-miR-205--WNT5B 0.717705259 3.33E-10
hsa-miR-200c--PKN2 0.721746815
2012 Nov 01
1
GraphNEL object retrieve edgenumber from acc() or is it list of lists?
Hello everyone,
Im working with graphNEL object and want to extract all the nodes which
have adjacent nodes with at least 20 nodes in between them.
acc(graph, graphnodes) obviously provides a list for the accessable
nodes of every node from a node and a number of the edges between them.
Like this:
$`hsa:8379`
hsa:100131844 hsa:10393 hsa:246184 hsa:29882 hsa:29945
1
2011 Aug 15
3
Plot from function
*I have the following function:*
/plot_mi_time = function(mdata, miname) {
mdata2 = mdata[row.names(hakat) == miname, ]
print(mdata2)
xcoords <- c(1,1,2,2,3,3,4,4,5,5,6,6)
plot(c(xcoords), mdata2, xaxt="n", ylab="Expression", xlab="Time(h)", ,
main=miname)
axis(1, at=xcoords,
2004 Feb 03
5
creating a factor
Hi list,
I'd like to make a factor with seven 1s and three 2s using the
factor() function.
That is,
1
1
1
1
1
1
1
2
2
2
I will then bind this factor to the matrix below using cbind.data.frame().
0.56 0.48
0.22 0.59
0.32 0.64
0.26 0.60
0.25 0.38
0.24 0.45
0.56 0.67
0.78 0.97
0.87 0.79
0.82 0.85
I am new to R and have been using various manuals and have made many attempts without
2010 Dec 17
1
help with function
Hello List
I'm moving this over from the bioC list as, although the problem I'm working on is biological, the current bottle neck is my poor understanding of R.
I wonder if someone would help me with the following function.
cumulMetric <- function(deMirPresGenes, deMirs){
???
#need to match position of each miR in deMirPresGenes with its FC to form a vector of FC in correct order
?
2006 Sep 01
1
Reading many files at once
dear group,
i have 100 files starting with 'hsa-*'.
ex. file:
fruit p-value
------------
apple 0.0003
orange 0.004
kiwi 0.0003
peach 0.0004
I want to read all these files and create a single
matrix. here each file may have different fruit names.
in the matrix i want to have a union of all fruits and
those should be the rows in the matrix and file names
should be columns.
2011 Jun 27
1
create a new data frame after comparing two columns of the previous data frame
Hi everyone,
I am trying to find a way to filter a table; If I am given for example the
following table:
> head(intra)
chr miRNA start end strand ACC hsa_ID
region region_start region_end gene_id transcrip_id
1 chr1 miRNA 1102484 1102578 + ACC="MI0000342"; ID="hsa-mir-200b";
exon 1102484 1102578 NR_029639 NR_029639
2 chr1
2023 May 23
3
Problems with inbound connection and registering phone
I have two problems. The first is that when I dial my number from a
phone on the Internet or any phone outside my LAN, Asterisk does not
respond in any way, which means somehow my system is not picking up the
fact that there's an incoming call to it.
The second problem is that I thought I'd try an internal phone to see if
I could get the hello-world stuff working at the least. I
2016 Apr 05
1
Heatmap Colnames
Hello,
please see below my code for a heatmap. Unfortunately my column names do not completely appear. Can you please send me the appropriate code to visualise them?
Many Thanks!
Nils
library(GMD)
dat<-data.frame(EntryA=as.numeric(c(4.24,3,1.66,1.28,1.2,-1.32,-1.88)), EntryB=as.numeric(c(4.16,4.82,-1.82,-3.02,0.99,1.1,-3.31)))
2016 Mar 05
2
[AMDGPU] non-hsa intrinsic with hsa target
Hi Mr. Liu,
Thanks for your quick reply.
I compiled the code with the libclc_trunk and linked the bitcode file under
$LIBCLC_DIR/built_libs/tahiti-amdgcn--.bc. After looking into the libclc,
it is currently using the new workitem intrinsics
(commit ba9858caa1e927a6fcc601e3466faa693835db5e). In the linked bitcode
($LIBCLC_DIR/built_libs/tahiti-amdgcn--.bc), it has the following code
segment,