library(reticulate)
library(knitr)
library(tidyverse)
<-runif(3)
a<-round(a,2)
aprint(a)
[1] 0.02 0.51 0.00
<-"Hello, " b
Nobukuni Hyakutake
2023-01-25
This is a post with executable code.
analy_titlle <- c("analy_a", "analy_b", "analy_c")
for(i in 1:length(analy_titlle)){
cat(paste("\n##", analy_titlle[i], "\n"))
cat(str_c("i= ",i, "\n"))
hist(rnorm(100,mean = i*3))
cat("\n")
}
i= 1 ::: {.cell-output-display} :::
i= 2 ::: {.cell-output-display} :::
i= 3 ::: {.cell-output-display} :::
---
title: "コード入りの投稿サンプル"
author: "Nobukuni Hyakutake"
date: "2023-01-25"
date-format: "iso"
categories: [news, code, analysis, R, Python]
image: "image.jpg"
---
This is a post with executable code.
# R-1
```{r}
library(reticulate)
library(knitr)
library(tidyverse)
a<-runif(3)
a<-round(a,2)
print(a)
b<-"Hello, "
```
# Python
```{python}
import numpy as np
c="World!"
d=r.b+c
print(d)
e=np.sin(1.5)*12
```
# R-2
```{r}
f<-py$e/3
print(f)
```
# 変数をループで解析して出す
```{r}
#| output: asis
analy_titlle <- c("analy_a", "analy_b", "analy_c")
for(i in 1:length(analy_titlle)){
cat(paste("\n##", analy_titlle[i], "\n"))
cat(str_c("i= ",i, "\n"))
hist(rnorm(100,mean = i*3))
cat("\n")
}
```
# R version
```{r}
R.version.string
```
# Python version
```{python}
import platform
"Python version "+platform.python_version()
```
# Citation
- R Core Team (2022). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL [https://www.R-project.org/](https://www.R-project.org/)
```{=html}
<iframe width="300" height="30" src="https://nobukuni-hyakutake.github.io/see_you_again.html" title="Quarto Documentation"></iframe>
```