Cosmic loneliness equation
script.R
Code to calculate the minimum value of the lifetime of an advanced civilization so that it can detect the presence of another advanced radio transmitting civilization
https://github.com/neelsoumya/cosmic_loneliness_equation/blob/main/script.R
app.R
an interactive graphical user interface for playing around with the parameters
https://github.com/neelsoumya/cosmic_loneliness_equation/blob/main/cosmic_loneliness/app.R
-
Install R
-
and R Studio
https://www.rstudio.com/products/rstudio/download/preview/
- Install the following packages in R:
install.packages('rmarkdown')
install.packages('knitr')
install.packages('ggplot2')
install.packages('shiny')
or
run the following script installer_R.R
from the command line
R --no-save < installer_R.R
- Download a zip file of this repository and unzip it
or
clone it
git clone https://github.com/neelsoumya/cosmic_loneliness_equation
cd cosmic_loneliness_equation
- Go to this new directory and set working directory to this directory in R Studio.
setwd('~/cosmic_loneliness_equation')
In R Studio run the script script.R
(by clicking on the Source
button)
or
Go to your terminal
and type
R --no-save < script.R
- The shiny app
app.R
is an interactive graphical user interface for playing around with the parameters
https://github.com/neelsoumya/cosmic_loneliness_equation/blob/main/cosmic_loneliness/app.R
It can be run with the following command from the R command line (from the root of the directory)
library(shiny)
shiny::runApp('cosmic_loneliness')
or open the file app.R
https://github.com/neelsoumya/cosmic_loneliness_equation/blob/main/cosmic_loneliness/app.R
in R Studio and click on the button named Run App
A free instance of this shiny application can also be accessed here
https://sb2333medschl.shinyapps.io/cosmic_loneliness
https://ccl.northwestern.edu/netlogo/models/Daisyworld
Forthcoming
Soumya Banerjee