Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Please supplement your question with a minimal reproducible example. Use dput() for data and specify all non-base packages with library calls. For statistical questions please use http://stats.stackexchange.com.
1
vote
Mapping probe ID to gene name
To end up with a single table made by merging all your tables, you can give a try with reduce() of purrr: The first argument .x would be the list of tables to merge (in your case the annotation file …
3
votes
How I swap rownames in these data?
There are actually two questions.
The first one is about the memory issue. I believe merge from data.table would solve that issue.
The second one would be aggregating or summarizing the identifiers. …
1
vote
Accepted
Removing rows containing some strings
You can create a vector consisting of values that you would like to keep (or discard):
to_keep <- paste0("chr", seq(1,22))
> to_keep
[1] "chr1" "chr2" "chr3" "chr4" "chr5" "chr6" "chr7" "chr …
6
votes
Accepted
Converting values to string
custom.cn.data$new_column <- ifelse(custom.cn.data$CN < 0, "Del", "Amp")
In this scenario CN == 0 would be Amp
1
vote
How to add an increment to a repeated strings
EDIT: Wheres the OP accepted this answer, @zx8754's answer below, as well as the ones in the link they gave, are much more elegant and straightforward.
Here is a work-around with table(), lapply() …
4
votes
Error in ruuning a package in R
If you do ?devtools::install, you will see that the install() function from the devtools package, not surprisingly, requires a package to be specified:
install(pkg = ".", reload = TRUE, quick = FALSE …
4
votes
Accepted
Creating a count table using R
You could give a try with dplyr's full_join() and purrr's reduce(). full_join() will make sure that you won't lose any data and reduce() will merge tables in your list from left to right, left being t …
4
votes
Accepted
Chaning string in rows
sub() is the way to go.
Your pattern is your regular expression: Check for "_vs_" followed by any character (provided with .) for an undefined length (provided with *).
my_text <- "LP2000107-DNA_A01 …
3
votes
FPKM, FPKM-UQ, TPM or counts: How do I know which kind of unit should I use?
Type of data you need depends on the downstream applications and since you would like to carry out DEA with DESeq2, you would need raw counts (non-normalized).
There are many ways to import/download T …
1
vote
Multiple correlation with R
One option is to use one of the apply family functions. If you enclose your code above (which generates errors by the way) in a function, you can then "apply" this function on the rows or columns of y …
1
vote
Accepted
Mutation annotation to the heatmap
You are trying to "map" mutation data to your heatmap, however, there is no mutation data in your code as far as I can see! You specify sample names within a data frame called anno but this data frame …
4
votes
How to load and split my two individual datasets when integrating datasets in Seurat?
Seurat is expecting individual datasets to be normalized separately prior to data integration. In that respect lists of objects corresponding to different datasets are handy to manipulate each object/ …
0
votes
Accepted
R WGCNA error code
I think you forgot to load (or install) the doParallel package as the error warning message is complaining about the lack of a parallel backend. library("doParallel") should do the trick.
2
votes
Accepted
Adding new columns to this data frame
You can use ifelse():
anno_maf$COSMIC <- ifelse(anno_maf$Hugo_Symbol %in% your_gene_list,
yes = "yes",
no = "no")
0
votes
How I can push a function to act on my files
The upper part, where you try to use lapply() over your list of files with your custom function does not quite make sense to me: You declare your files but you do not use this in your lapply() call. I …