Posts filled under:R

How to calculate chi square value in R

Command qchisq returns the value of chi square distribution for a certain value of probability. qchisq(c(0.025), df=286, lower.tail=TRUE) For plotting the graph the command is: local({ + .x <- seq(213.788, 371.301, length.out=1000) + plotDistr(.x, dchisq(.x, df=286), cdf=FALSE, xlab=”x”, ylab=”Density”, + […]

By: | R| Tags: | Comments: 0

Summary statistics in R

The command in R to get a summary of statistics is just summaryStats(variable) And you get all this information Minimum value: 11 Maximum value: 93 Mean value: 52.88 Median: 51.5 Upper quartile: 68.5 Lower quartile: 40 Variance: 348.87 Standard deviation: […]

By: | R| Tags: | Comments: 0

Add labels with no overlap to a XY graph in R

In R is possible to add labels to XY graphs but usually they overlap. To avoid this the wordcloud package can be added that places word apart from each other. To install the package use this commands: install.packages(c(“wordcloud”,”tm”),repos=””) library(wordcloud)   […]

By: | Graph, R| Tags: | Comments: 0