-
Notifications
You must be signed in to change notification settings - Fork 1
/
.Rhistory
202 lines (202 loc) · 6.19 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
install.packages("rmarkdown")
install.packages("rmarkdown")
install.packages("rmarkdown")
install.packages("rsconnect")
# Install packages
remotes::install_github("insightsengineering/scda@*release")
remotes::install_github("insightsengineering/scda.2022@*release")
# Install packages
remotes::install_github("insightsengineering/scda@*release")
remotes::install_github("insightsengineering/scda.2022@*release")
# Load libraries
library(scda)
library(scda.2022)
library(dplyr)
library(readr)
# Get adsl data
adsl_data <- scda::synthetic_cdisc_data("rcd_2022_02_28")$adsl |>
select(USUBJID, AGE, SEX, RACE, DTHFL, TRT01A, BMRKR1, DTHCAT)
# Save local copy to upload to application
write_csv(adsl_data, "adsl_data.csv")
setwd("E:/Shiny")
# Get adsl data
adsl_data <- scda::synthetic_cdisc_data("rcd_2022_02_28")$adsl |>
select(USUBJID, AGE, SEX, RACE, DTHFL, TRT01A, BMRKR1, DTHCAT)
# Save local copy to upload to application
write_csv(adsl_data, "adsl_data.csv")
library(shiny); runApp('create_shiny_docs.R')
runApp('create_shiny_docs.R')
knitr::opts_chunk$set(echo = FALSE)
# Learn more about creating websites with Distill at:
# https://rstudio.github.io/distill/website.html
knitr::include_url("https://www.hasil.gov.my/en/individual/individual-life-cycle/how-to-declare-income/tax-reliefs/")
setwd("E:/20224")
library(readxl)
library(knitr)
library(kableExtra)
# Read data from specific sheet in excel
data <- read_excel("CM_20224.xlsx", sheet = "MAT402_KAM2281A")
# Omit columns 3 to 5
data_new <- data[, -c(3:5)]
# Add search option using list from column 2
search_data <- function(data, search_term) {
search_result <- data[data$col2 == search_term,]
return(search_result)
}
# Display 10 rows per page with page option button
kable(data_new, "html",
caption = "Data from specific sheet in excel",
escape = F) %>%
kable_styling(bootstrap_options = "striped", full_width = F) %>%
page_table(10) %>%
add_header_above(c(" " = 1, "Search by column 2" = 2), align = "c") %>%
add_search_box(id = "search-box", placeholder = "Search data...")
library(readxl)
library(knitr)
library(kableExtra)
# Read data from specific sheet in excel
data <- read_excel("CM_20224.xlsx", sheet = "MAT402_KAM2281A")
# Omit columns 3 to 5
data_new <- data[, -c(3:5)]
View(data_new)
# Add search option using list from column 2
search_data <- function(data, search_term) {
search_result <- data[data$col2 == search_term,]
return(search_result)
}
# Display 10 rows per page with page option button
kable(data_new, "html",
caption = "Data from specific sheet in excel",
escape = F) %>%
kable_styling(bootstrap_options = "striped", full_width = F) %>%
page_table(10) %>%
add_header_above(c(" " = 1, "Search by column 2" = 2), align = "c") %>%
add_search_box(id = "search-box", placeholder = "Search data...")
# Insert the full page image at the beginning
grid.raster(jpeg::readJPEG("pexels-pixabay-39284.jpg"), width=1.2, height=1, just="center")
library(grid)
# Insert the full page image at the beginning
grid.raster(jpeg::readJPEG("pexels-pixabay-39284.jpg"), width=1.2, height=1, just="center")
setwd("E:/20224")
library(esquisse)
library(flexdashboard)
library(readxl)
my_data <- read_excel("data.xlsx")
setwd("E:/2023")
library(flexdashboard)
library(readxl)
my_data <- read_excel("data.xlsx")
View(my_data)
explore(my_data)
library(explore)
install.packages(explore)
install.packages("explore")
library(explore)
explore(my_data)
my_data <- read_excel("data.xlsx")
explore(my_data)
explore_all(my_data)
my_data <- read_excel("data.xlsx")
explore(my_data)
my_data %>% report(output_file = "report.html", output_dir = tempdir())
library(dplyr)
my_data %>% report(output_file = "report.html", output_dir = tempdir())
my_data %>% report(output_file = "report.html", output_dir = "E:/2023")
# report of all variables and their relationship with a binary target
my_data$is_AKADEMIK <- ifelse(my_data$KRITERIA == "AKADEMIK")
# report of all variables and their relationship with a binary target
my_data$is_AKADEMIK <- ifelse(my_data$KRITERIA == "AKADEMIK", 1, 0)
my_data %>%
report(output_file = "report.html",
output_dir = "E/2023",
target = is_AKADEMIK)
my_data <- read_excel("data.xlsx")
explore(my_data)
setwd("E:/2023")
library(flexdashboard)
library(readxl)
library(explore)
library(dplyr)
my_data <- read_excel("data.xlsx")
sidebar <- column(
selectInput("my_filter", "Select a variable to filter by", choices = names(my_data)),
sliderInput("my_range", "Select a range of values", min = 0, max = 100, value = c(0, 100))
)
View(my_data)
# read raw data
my_data <- read.csv("data_gd.csv")
View(my_data)
remotes::install_github("rstudio/bslib")
jmv::descriptives(
formula = Jantina ~ KumpulanKakitangan,
data = my_data,
freq = TRUE,
bar = TRUE,
missing = FALSE,
mean = FALSE,
median = FALSE,
min = FALSE,
max = FALSE
)
library(flexdashboard)
library(readxl)
library(explore)
library(dplyr)
my_data <- read_excel("data.xlsx")
explore(my_data)
setwd("E:/2023")
library(flexdashboard)
library(readxl)
library(explore)
library(dplyr)
my_data <- read_excel("data.xlsx")
explore(my_data)
my_data <- read_excel("data.xlsx", sheet = "Sheet 1")
my_data <- read_excel("data.xlsx", sheet = "Sheet1")
explore(my_data)
setwd("E:/2023")
x=2
y=3
z = x+y
z
library(reticulate)
import pulp as p
```{python}
import pulp as p
import pandas as pd
modelo = p.LpProblem('Funcionaria_Salud', pLpMinimize)
````
```{python}
```{python}
import pulp as p
import pandas as pd
modelo = p.LpProblem('Funcionaria_Salud', pLpMinimize)
```
library(reticulate)
reticulate::repl_python()
import pulp as p
reticulate::repl_python()
import pandas as pd
reticulate::repl_python()
modelo = p.LpProblem('Funcionaria_Salud', pLpMinimize)
reticulate::repl_python()
import pulp as p
pip install pulp
install pulp
pulp
library(pulp)
quit
install.packages("pulp")
reticulate::repl_python()
import pulp as p
import pandas as pd
from pulp import *
quit
install.packages("D:/Downloads From Internet/New Download Folder 20 JUn 2022/pulp-2.7.0.tar.gz", repos = NULL, type = "source")
install.packages("D:/Downloads From Internet/New Download Folder 20 JUn 2022/pulp-2.7.0.zip", repos = NULL, type = "win.binary")
library(devtools)
install_github("https://github.com/coin-or/pulp")
install_github(https://github.com/coin-or/pulp)
reticulate::repl_python()
import pyomo as pym
from scipy.optimize import linprog