We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When assigning a rgsets object to a new variable, this variable is only a reference to the old object, not a new one. Here is an example:
# genesets genesets <- list( gset1=c("gene1","gene2","gene3"), gset2=c("gene4","gene5","gene6"), gset3=c("gene7","gene8","gene9")) # nodes nodes <- data.frame(row.names = unlist(genesets),label=unlist(genesets)) ## some random edges edges <- data.frame( from = gset1, to = gset3) rgset1 <- hypeR::rgsets$new(genesets=genesets,nodes=nodes,edges=edges,name="test_geneset",version="1.0")
Now, if I assign that object (rgset1) to a new variable (rgset2):
rgset1
rgset2
> rgset2 <- rgset1 > rgset2$genesets $gset1 [1] "gene1" "gene2" "gene3" $gset2 [1] "gene4" "gene5" "gene6" $gset3 [1] "gene7" "gene8" "gene9"
And I modify that object
> rgset2$genesets <- rgset1$genesets[1:2] > rgset2$genesets $gset1 [1] "gene1" "gene2" "gene3" $gset2 [1] "gene4" "gene5" "gene6"
This also modifies the original object.
> rgset1$genesets $gset1 [1] "gene1" "gene2" "gene3" $gset2 [1] "gene4" "gene5" "gene6"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When assigning a rgsets object to a new variable, this variable is only a reference to the old object, not a new one. Here is an example:
Now, if I assign that object (
rgset1
) to a new variable (rgset2
):And I modify that object
This also modifies the original object.
The text was updated successfully, but these errors were encountered: