In addition To John's comments, https://support.posit.co/hc/en-us/articles/218012917-How-to-run-R-scripts-from-the-command-line
(found by searching on "Run R from the Linux Command line") is one of many resources that you might find helpful. As John said, this list can offer help to both new and experienced users; but it is not meant to provide extended tutorials on either R or statistics. That is the user's responsibility. As usual, web searches will bring up many relevant resources. Also, if you haven't already done so, "PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code." This will tell you in greater detail what you can and cannot expect here as well as how to post in order to elicit helpful responses. Cheers, Bert On Thu, Aug 22, 2024 at 2:13 PM Sorkin, John <jsor...@som.umaryland.edu> wrote: > > Keith, > I suggest you being by looking at a web page > > https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/lm > > It will introduce you to the lm function, the function that performs liner > regression and the summary function which returns some of the material you > are looking for. The page come complete with code that can be run via he web > page. Once you review the web page, and hopefully try to run the analysis you > want to run, you can again ask the R help list for additional help. > > There are other web pages that can help you, for example > > https://www.statology.org/logistic-regression-in-r/#:~:text=How%20to%20Perform%20Logistic%20Regression%20in%20R%20%28Step-by-Step%29,Predictions%20...%205%20Step%205%3A%20Model%20Diagnostics%20 > > Take the first steps, show that you are trying and the R help list will be > very helpful. > John > > John David Sorkin M.D., Ph.D. > Professor of Medicine, University of Maryland School of Medicine; > Associate Director for Biostatistics and Informatics, Baltimore VA Medical > Center Geriatrics Research, Education, and Clinical Center; > PI Biostatistics and Informatics Core, University of Maryland School of > Medicine Claude D. Pepper Older Americans Independence Center; > Senior Statistician University of Maryland Center for Vascular Research; > > Division of Gerontology and Paliative Care, > 10 North Greene Street > GRECC (BT/18/GR) > Baltimore, MD 21201-1524 > Cell phone 443-418-5382 > > > > > ________________________________________ > From: R-help <r-help-boun...@r-project.org> on behalf of Keith Christian > <keith1christ...@gmail.com> > Sent: Thursday, August 22, 2024 3:07 PM > To: r-help@r-project.org > Subject: [R] Linear regression and stand deviation at the Linux command line > > R List, > > Please excuse this ultra-newbie post. > I looked at this page but it's a bit beyond me. > https://www2.kenyon.edu/Depts/Math/hartlaub/Math305%20Fall2011/R.htm > > I'm interested in R construct(s) to be entered at the command > line that would output slope, y-intercept, and r-squared values read > from a csv or other filename entered at the command line, and the same > for standard deviation calculations, namely the standard deviation, > variance, and z-scores for every data point in the file. > > E.g. > $ ((R function for linear regression here)) slope, y-intercept, and > r-squared, other related stats that R seems most capable of > generating. > linear_regression_data.csv file contents (Are line numbers, commas, > etc. needed or no?) > 1 20279 > 2 899 > 3 24747 > 4 12564 > 5 29543 > > $ ((R function for standard deviation here)) standard deviation, > variance, z-scores, other related stats that R seems most capable of > generating. > standard_deviation_data.csv file contents (Are line numbers, commas, > etc. needed or no?) > 1 16837 > 2 9498 > 3 31389 > 4 2365 > 5 17384 > > Many thanks, > > ----------Keith > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide https://www.r-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.