Libraries with the same function name in R seem to be very annoying. What is the easiest way to resolve issues like the following?
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
adding library(stats)
or calling the filter function as stats::filter
and the other functions as it is shown below didn't work out for me.
library(ggplot2)
library(dplyr)
library(stats)
stats::filter
stats::lag
base::union
base::setdiff
base::setequal
base::intersect
# Reading in the data
data <- read.csv("data.csv", header = FALSE)
# Plots
dataSummary <- data %>% group_by(id) %>% summarise(data_count = x())
dataSummary
plotTest <- ggplot(dataSummary, aes(id, data_count)) + geom_bar(stat = 'identity') + ggtitle("Test Title")
plot(plotTest)
But this keeps giving the previous warning message before executing the plot function. Any pointers? or is there anyway to suppress these warnings and do the plotting?