[R] my R code worked well when running the first 1000 lines of R code

Ebert,Timothy Aaron tebert @end|ng |rom u||@edu
Wed Jun 12 19:51:15 CEST 2024


Hi Yuan,
   When you load some packages do you get messages saying that some function is being masked? What can happen is that one package has a function with the same name as another package. The conflict is resolved by having one package mask the other. However, this can cause conflicts if your code uses the function in a way that is only supported in the masked package.

Tim

-----Original Message-----
From: R-help <r-help-bounces using r-project.org> On Behalf Of Yuan Chun Ding via R-help
Sent: Wednesday, June 12, 2024 12:28 PM
To: r-help using R-project.org (r-help using r-project.org) <r-help using r-project.org>
Subject: [R] my R code worked well when running the first 1000 lines of R code

[External Email]

Hi R users,

The following code worked well to summarize four data groups in a dataframe for three variables (t_depth, t_alt_count, t_alt_ratio), 12 columns of summary, see attached.
However, after running another 2000 lines of R codes using functions from more than 10 other R  libraries, then it only generated one column of summary.
Do you know why?

Thank you,

Yuan Chun Ding

summary_anno1148ft <- anno1148ft %>%
  pivot_longer(c(t_depth, t_alt_count, t_alt_ratio), names_to = "measure") %>%
  group_by(dat, measure) %>%
  summarize(minimum = min(value,na.rm=T),
            q25 = quantile(value, probs = 0.25,na.rm=T),
            med = median(value,na.rm=T),
            q75 = quantile(value, probs = 0.75,na.rm=T),
            maximum = max(value,na.rm=T),
            average = mean(value,na.rm=T),
            #standard_deviation = sd(value),
            .groups = "drop"
  )
summary_anno1148ft <-t(summary_anno1148ft)



----------------------------------------------------------------------
------------------------------------------------------------
-SECURITY/CONFIDENTIALITY WARNING-

This message and any attachments are intended solely for the individual or entity to which they are addressed. This communication may contain information that is privileged, confidential, or exempt from disclosure under applicable law (e.g., personal health information, research data, financial information). Because this e-mail has been sent without encryption, individuals other than the intended recipient may be able to view the information, forward it to others or tamper with the information without the knowledge or consent of the sender. If you are not the intended recipient, or the employee or person responsible for delivering the message to the intended recipient, any dissemination, distribution or copying of the communication is strictly prohibited. If you received the communication in error, please notify the sender immediately by replying to this message and deleting the message and any accompanying files from your system. If, due to the security risks, you do not wish to receive further communications via e-mail, please reply to this message and inform the sender that you do not wish to receive further e-mail from the sender. (LCP301)
------------------------------------------------------------
______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.r-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list