R package problem
2
0
Entering edit mode
2.1 years ago
sandy • 0

Good afternoon,

I meet a problem with R when I tried to use R analysis my scrna-seq data. Anyone know how to solve the problem? thank you.

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union
Attaching SeuratObject
Attaching sp

Attaching package: ‘patchwork’

The following object is masked from ‘package:cowplot’:

    align_plots
Attaching package: ‘ggthemes’

The following object is masked from ‘package:cowplot’:

    theme_map
R • 1.9k views
ADD COMMENT
0
Entering edit mode

My R version is 4.0.0.

ADD REPLY
0
Entering edit mode

Posted at Stackoverflow, too: https://stackoverflow.com/q/74297694/680068

ADD REPLY
0
Entering edit mode

if you are using rstudio rmarkdown you can type ```{r message=FALSE} as the chunk heading and then the problems go away.

ADD REPLY
0
Entering edit mode

the problems go away

No, they don't. You just stop getting notified of their existence.

ADD REPLY
3
Entering edit mode
2.1 years ago
Jeremy ▴ 930

I'm not clear on what the problem is.

Certain functions are masked when you load the dplyr package. For example, filter() in the stats package is masked. This means that there is a filter() function in both dplyr and stats, and they are probably different. Since the stats version is masked, if you use filter(), the dplyr version will execute. If you want to use filter() in the stats package, then you can use the following:

stats::filter()
ADD COMMENT
0
Entering edit mode
2.1 years ago
Dunois ★ 2.8k

This is not a "problem" per se. When you load multiple packages with functions that have the same name, the function from the package loaded later will have precedence.

For instance, if you load libraries ex1 and ex2 in that order, and both have a function named myfunc, if you directly call myfunc, you will be calling the myfunc from ex2 (ex2::myfunc). If you want to access ex1's myfunc, you will have to call it like so: ex1::myfunc().

ADD COMMENT

Login before adding your answer.

Traffic: 2796 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6