0

I am a developing beginner in R, and I have some problem with r. I am always getting invaluable help from experts in this page, and I hope anyone could give some help again.

install.packages("doBy")
require(doBy)
summaryBy(temp~hum,data=data,FUN=c(mean,sd,min,max))

I am trying to do two way anova test, and before that I wanted to use function 'summaryBy'. But for what reason I just get the message 'function summaryBy not found'. There was zero problem with this before I installed new version of R. I can't figure out what is wrong with my r script or something else.. Any help would be appreciated! Thank you and I hope anyone sees this have a nice day! :)

Park
  • 19
  • 4
  • 1
    Try specifying the package name `doBy::summaryBy(temp~hum,data=data,FUN=c(mean,sd,min,max))` – Ronak Shah Jun 04 '20 at 04:08
  • 2
    Using `require` like this is not correct, though it's a *logical* error, not a *syntax* error. When you typed in `require(doBy)`, did you get a return value? If you got `FALSE`, then that suggests that for whatever reason, R believes that the package is not loadable. (You should almost always use `library(doBy)`; if you are going to use `require(doBy)`, then you really should test its return value to see if it loaded correctly. Refs: https://stackoverflow.com/a/51263513 – r2evans Jun 04 '20 at 04:24
  • @r2evans Thank you! Now I know the difference between require and library..finally! Thank you again! – Park Jun 05 '20 at 01:50
  • @RonakShah I tried that but it didn't work..but thanks for trying to give help! I am genuinely grateful for that. :) – Park Jun 05 '20 at 01:52

1 Answers1

1

I tried your code on Iris dataset and it worked for me. I am new user here so I am unable to share pictures at the moment. Try to update your R version. Mine is 3.6.2 and worked well.

Check out documentation here and a few ways to use summaryBy function towards the bottom of the page - https://www.rdocumentation.org/packages/doBy/versions/1.5/topics/summaryBy

bp41
  • 137
  • 13