myCompiler myCompiler
Deutsch English Español Français Italiano 日本語 한국어 Nederlands Polski Português
Recent
Login Sign up
Recent
Login Sign up
D

@drfperez

Exoplanets

R
4 years ago
x<- c(0.3, 2, 1, 1.5, 1.8, 0.8) y <- c(0.9, 5.6, 3.7, 5, 4.5, 1.2) relation <- lm(log(y)~0+log(x)) print(summary(relation)) myexoplanet<- data.frame(x = 1.4) result <- predict(relation,myexoplanet) print(result) plot(log(x),y,col = "blue",main = "Mass and radius of exoplanets", abline(lm(log(y)~0+log(x))),cex = 1.3,pch = 16,xlab = "Mass in Earth masses",ylab = "Earth radius") ion", abline(lm(y~log(x))),cex = 1.3,pch = 16,xlab = "Log (Mass) in Earth masses",ylab = "Earth radius Regression",

Cepheids

R
4 years ago
x<- c(3, 5, 10, 30, 50, 101) y <- c(-3.5, -4.6, -5.7, -6, -6.5, -7.2) relation <- lm(y~log(x)) print(summary(relation)) mycepheid<- data.frame(x = 19) result <- predict(relation,mycepheid) print(result) plot(log(x),y,col = "blue",main = "Period &Absolute magnitude Cepheid Regression", abline(lm(y~log(x))),cex = 1.3,pch = 16,xlab = "Log (Period) in days",ylab = "Absolute magnitude")
Previous Next page

Supported languages

Deno JavaScript NodeJS Python Ruby Go C C++ Java C# TypeScript PHP Bash R Octave (MATLAB) Fortran Lua Erlang SQL MySQL MongoDB Clojure D Perl Kotlin Swift Rust Assembly
© 2026 mycompiler.io
Terms of service Privacy policy Contact us