Super it worked,
Really thank you,
You are right, the reason is missing values,
Now I did an adjustment to my code which I originally used to upload my excel data to read the following:
d <- read_excel("C:/Users/mebak/Desktop/Tiny Data.xlsx", sheet = "Store 312 Cleansed", range = "A1:L3528", na = "")**
Now the problem is solved, and I can write down sum(d$'dollar sales') without using na.rm = TRUE , and the results are displayed. I don't receive the NA any more.
May I ask for two more questions:
Question 1: I am trying to use R for the same set of data to calculate the following characteristics of the distribution : A) Sum, B) min, C) mode, D) median, E) mean, F) max, G) Var, H) SD
To be able to do so, I am using 8 different lines of code for each function. Is there a way where I can use one line of code instead of 8 different lines of codes, ?
Here are my different lines of codes:
sum(d$Dollar Sales)
min(d$Dollar Sales)
mode(d$Dollar Sales)
median(d$Dollar Sales)
mean(d$Dollar Sales)
max(d$Dollar Sales)
var(d$Dollar Sales)
sd(d$Dollar Sales)
mode(d$Dollar Sales)
Is there one line of code , which I can use instead?
Question 2: Why when I tried to calculate the mode of the data, I received "numeric" although the answers were displayed for the rest (sum, min, median, mean, max, Var, DS)?