BIOphysics & SOFT Matter Department of Ultrafast Optics and Nanophotonics

Institut de Physique et Chimie des Matériaux de Strasbourg

[ -- Internship Proposals -- ]
ABOUT

A blog for physicists or biologists. Mainly for experimentalists interested in Statistics. R scripts detailed and explained.


CONTACT

wilfried.grangeu-paris.fr

Associate Professor at Université de Paris

Home Page


TAGS (on this page)


Simple Linear Regression

Posted 2020-10-06 by Wilfried. Post 1 of 13.
BeginnerFitting graphs

How to make a very simple linear fit with R (few points, no error bars)


rm(list = ls()) #remove ~ everything in the working environment
myX<-1:10 
myY<-jitter(1:10) 
adjust<-lm(myY ~ myX)  # Use adjust<-lm(myY ~ 0 + myX) to force the intercept at 0
plot(myX,myY,abline(adjust))

Read More [...]