R codes and Programming
Labeling points on scatter plot
In the below example i show how to assign a label (in this case Casenr) to each data point on my scatter plot.
```
plot(BMI~Age, data=prevend.sample)
text(BMI~Age, labels=Casenr, data=prevend.sample)
```
Newer Post
Older Post
Home
Introduction to the Analysis of Survival Data in the Presence of Competing Risks
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4741409/
Regression model with variables with different lengths
Sometimes when you are running a regression model with variables that have different lengths, r will prompt with the following error message...
Categorizing a variable in R using the cut command
retinol$age [1] 64 76 38 40 72 40 65 58 35 55 66 40 57 66 66 64 62 75 68 57 56 30 34 53 60 50 62 61 65 71 43 33 74 41 [35] 56 44 37 3...
Apply Function in R | R Tutorial 1.15 | MarinStatsLectures