content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
library(testthat)
library(mathhammr)
test_check("mathhammr")
| /tests/testthat.R | permissive | psmits/mathhammr | R | false | false | 62 | r | library(testthat)
library(mathhammr)
test_check("mathhammr")
|
test_that(".short_spectrum_info works", {
sp1 <- new("Spectrum1", mz = c(1, 2, 4), intensity = c(4, 5, 2))
sp2 <- new("Spectrum2", mz = c(1, 2, 3, 4), intensity = c(5, 3, 2, 5),
precursorMz = 2, rt = 3)
expect_equal(.short_spectrum_info(sp1), c(msLevel = sp1@msLevel,
... | /tests/testthat/test_functions-MSpectra.R | no_license | manniealfaro/MSnbase | R | false | false | 3,241 | r | test_that(".short_spectrum_info works", {
sp1 <- new("Spectrum1", mz = c(1, 2, 4), intensity = c(4, 5, 2))
sp2 <- new("Spectrum2", mz = c(1, 2, 3, 4), intensity = c(5, 3, 2, 5),
precursorMz = 2, rt = 3)
expect_equal(.short_spectrum_info(sp1), c(msLevel = sp1@msLevel,
... |
#generate mixtures of normal distributions having same mean
#but different standard deviations.
par(cex=1.1)
#postscript("u:/meth1/psfiles/normmix_equalu1.ps")
x <- seq(73,127,len=5000)
y1n <- dnorm(x,100,5.385164807)
y2n <- dnorm(x,100,2.720294102)
y3n <- dnorm(x,100,8.062257748)
y4n <- dnorm(x,100,6.016643583)
y1 <-... | /tamu/basic_stat/R/normmix,sameu.R | no_license | sadepu1915/data-science | R | false | false | 1,989 | r | #generate mixtures of normal distributions having same mean
#but different standard deviations.
par(cex=1.1)
#postscript("u:/meth1/psfiles/normmix_equalu1.ps")
x <- seq(73,127,len=5000)
y1n <- dnorm(x,100,5.385164807)
y2n <- dnorm(x,100,2.720294102)
y3n <- dnorm(x,100,8.062257748)
y4n <- dnorm(x,100,6.016643583)
y1 <-... |
displayenv = environment(display)
lappend <- function(lst, obj) {
# I hope this isn't the best way to do this.
lst[[length(lst)+1]] = obj
return(lst)
}
Executor = setRefClass("Executor",
fields=c("execution_count", "userenv", "payload", "err", "interrupted", "kernel"),
methods = li... | /R/execution.r | permissive | minrk/IRkernel | R | false | false | 3,916 | r | displayenv = environment(display)
lappend <- function(lst, obj) {
# I hope this isn't the best way to do this.
lst[[length(lst)+1]] = obj
return(lst)
}
Executor = setRefClass("Executor",
fields=c("execution_count", "userenv", "payload", "err", "interrupted", "kernel"),
methods = li... |
## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----setup--------------------------------------------------------------------
library("tibble")
library("jsonlite")
library("purrr")
## -------------------------------------... | /inst/doc/design.R | no_license | cran/boxr | R | false | false | 4,894 | r | ## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----setup--------------------------------------------------------------------
library("tibble")
library("jsonlite")
library("purrr")
## -------------------------------------... |
## Run JavaSetup.exe // Set JAVA_HOME to C:\Program Files (x86)\Java\jre1.8.0_251
## PATH to JAVA not found. Please check JAVA is installed.
## Make sure to download Chrome
library(RSelenium)
library(raster)
library(magrittr)
library(rvest)
library(stringi)
library(stringr)
library(jsonlite)
library(dp... | /R/scraper discuss hk.R | no_license | dinhkhoathoanganh/webscraping | R | false | false | 13,834 | r | ## Run JavaSetup.exe // Set JAVA_HOME to C:\Program Files (x86)\Java\jre1.8.0_251
## PATH to JAVA not found. Please check JAVA is installed.
## Make sure to download Chrome
library(RSelenium)
library(raster)
library(magrittr)
library(rvest)
library(stringi)
library(stringr)
library(jsonlite)
library(dp... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_elements.R
\name{find.elements}
\alias{find.elements}
\title{Search for elements}
\usage{
find.elements(curves)
}
\arguments{
\item{curves}{curves matrix}
}
\description{
Search for elements in semilandmark matrix.
}
| /man/find.elements.Rd | no_license | jakubnowicki/artificialmorpho | R | false | true | 301 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_elements.R
\name{find.elements}
\alias{find.elements}
\title{Search for elements}
\usage{
find.elements(curves)
}
\arguments{
\item{curves}{curves matrix}
}
\description{
Search for elements in semilandmark matrix.
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/executable.R, R/file.R, R/generic_functions.R
\name{AddPFN.Executable}
\alias{AddPFN.Executable}
\alias{AddPFN.File}
\alias{AddPFN}
\title{Add a PFN to the object}
\usage{
\method{AddPFN}{Executable}(obj, pfn)
\method{AddPFN}{File}(obj, pfn)... | /packages/pegasus-dax-r/Pegasus/Workflow/man/AddPFN.Rd | permissive | pegasus-isi/pegasus | R | false | true | 569 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/executable.R, R/file.R, R/generic_functions.R
\name{AddPFN.Executable}
\alias{AddPFN.Executable}
\alias{AddPFN.File}
\alias{AddPFN}
\title{Add a PFN to the object}
\usage{
\method{AddPFN}{Executable}(obj, pfn)
\method{AddPFN}{File}(obj, pfn)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cai.r
\name{cai}
\alias{cai}
\title{Codon adaptation index}
\source{
The reference set of very highly expressed genes for \emph{E. coli}, \emph{B. subtilis} and \emph{S. cerevisiae} [1][2].
}
\usage{
cai(x, ref_spp = "n", ref, y = 0, threthol... | /man/cai.Rd | permissive | HVoltBb/kodonz | R | false | true | 2,681 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cai.r
\name{cai}
\alias{cai}
\title{Codon adaptation index}
\source{
The reference set of very highly expressed genes for \emph{E. coli}, \emph{B. subtilis} and \emph{S. cerevisiae} [1][2].
}
\usage{
cai(x, ref_spp = "n", ref, y = 0, threthol... |
/8 embarkation.R | no_license | lytinahome/Slave-Trade-Volume1 | R | false | false | 3,838 | r | ||
#' Selecting predictors via L1.5 penalized logistic regression model using caret package.
#' Shimpei Morimoto
#' 2020/04/30
#'
#' reference: https://daviddalpiaz.github.io/r4sl/elastic-net.html
#'
dir.sub <- "./sub"
Bibtex <- TRUE
vec.list.files <-
list.files(
dir.sub,
pattern = "^mf\\.|.+glmnet_caret.+"
... | /src/R/main.glmnet_caret.R | no_license | mrmtshmp/predict.valid | R | false | false | 4,386 | r | #' Selecting predictors via L1.5 penalized logistic regression model using caret package.
#' Shimpei Morimoto
#' 2020/04/30
#'
#' reference: https://daviddalpiaz.github.io/r4sl/elastic-net.html
#'
dir.sub <- "./sub"
Bibtex <- TRUE
vec.list.files <-
list.files(
dir.sub,
pattern = "^mf\\.|.+glmnet_caret.+"
... |
options(error=recover)
otuFile <- "td_OTU_tag_mapped_lineage.txt"
treeFile <- "fasttree_all_seed_OTUs.tre"
metaDataFile <- "metadata.txt"
library(ape)
library(phangorn)
# get default par
plotParameters <- par()
source("../../GUniFrac.R")
source("../../InformationUniFrac.R")
# read OTU table and format appropriat... | /clr_vs_proportion_unifrac/general_test/generalTestScript.r | no_license | ruthgrace/InformationUniFrac | R | false | false | 12,648 | r | options(error=recover)
otuFile <- "td_OTU_tag_mapped_lineage.txt"
treeFile <- "fasttree_all_seed_OTUs.tre"
metaDataFile <- "metadata.txt"
library(ape)
library(phangorn)
# get default par
plotParameters <- par()
source("../../GUniFrac.R")
source("../../InformationUniFrac.R")
# read OTU table and format appropriat... |
library(minfi)
setwd("~/AGomez_practica")
idat.folder <-getwd()
targets <- read.450k.sheet(base=idat.folder)
#Loading data
rgset <- read.450k.exp(targets = targets)
#Quality control
MSet <- preprocessRaw(rgset)
RSet <- ratioConvert(MSet, what = "both", keepCN = TRUE)
gc()
GRset <- mapToGenome(RSet)
gc()
q... | /Epigenomics/Final_task.R | no_license | albertod34/Msc-Omics-Data-Analysis | R | false | false | 4,421 | r | library(minfi)
setwd("~/AGomez_practica")
idat.folder <-getwd()
targets <- read.450k.sheet(base=idat.folder)
#Loading data
rgset <- read.450k.exp(targets = targets)
#Quality control
MSet <- preprocessRaw(rgset)
RSet <- ratioConvert(MSet, what = "both", keepCN = TRUE)
gc()
GRset <- mapToGenome(RSet)
gc()
q... |
#!/usr/bin/env Rscript
library(shiny)
library(DT)
library(gridExtra)
library(grid)
library(shinythemes)
library(shinycssloaders)
library(shinyjs)
library(data.table)
# increase max upload table size
options(shiny.maxRequestSize = 100*1024^2)
stages_list <- read.table("files/stagelabel.txt", sep="\n")
stage <- as.cha... | /.warehouse/mar_10_test/source_code/app.R | no_license | pranavs22/DEATS | R | false | false | 17,964 | r | #!/usr/bin/env Rscript
library(shiny)
library(DT)
library(gridExtra)
library(grid)
library(shinythemes)
library(shinycssloaders)
library(shinyjs)
library(data.table)
# increase max upload table size
options(shiny.maxRequestSize = 100*1024^2)
stages_list <- read.table("files/stagelabel.txt", sep="\n")
stage <- as.cha... |
# test.full.R: test earth
print(R.version.string)
library(earth)
library(mda)
source("check.models.equal.R")
data(ozone1)
data(trees)
data(etitanic)
if(!interactive())
postscript(paper="letter")
PRINT.TIME <- FALSE # FALSE for no time results (for diff against reference)
PLOT <- TRUE # TRU... | /earth/inst/slowtests/test.full.R | no_license | ingted/R-Examples | R | false | false | 60,201 | r | # test.full.R: test earth
print(R.version.string)
library(earth)
library(mda)
source("check.models.equal.R")
data(ozone1)
data(trees)
data(etitanic)
if(!interactive())
postscript(paper="letter")
PRINT.TIME <- FALSE # FALSE for no time results (for diff against reference)
PLOT <- TRUE # TRU... |
####################################################################################################
## SMSN Nonlinear Mixed Effects Model ##
####################################################################################################
## last updated in 2020-07-01
## downloaded from https://github.com/fernandal... | /smsn-nlmm.R | permissive | erhard1/NLMECOVID19 | R | false | false | 23,817 | r | ####################################################################################################
## SMSN Nonlinear Mixed Effects Model ##
####################################################################################################
## last updated in 2020-07-01
## downloaded from https://github.com/fernandal... |
# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
computeHaOpen <- function(haOpen, haClose) {
.Call('IKTrading_computeHaOpen', PACKAGE = 'IKTrading', haOpen, haClose)
}
| /Alpha Modelling/QuantStrat/Packages/IKTrading/R/RcppExports.R | no_license | Bakeforfun/Quant | R | false | false | 235 | r | # This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
computeHaOpen <- function(haOpen, haClose) {
.Call('IKTrading_computeHaOpen', PACKAGE = 'IKTrading', haOpen, haClose)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_from_list}
\alias{get_from_list}
\title{Get from list}
\usage{
get_from_list(lst, what)
}
\arguments{
\item{lst}{list}
\item{what}{object to retrieve (by name or index)}
}
\description{
Retrieve object `what` from `lst`
}
| /man/get_from_list.Rd | permissive | yutiansut/dateutils | R | false | true | 319 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_from_list}
\alias{get_from_list}
\title{Get from list}
\usage{
get_from_list(lst, what)
}
\arguments{
\item{lst}{list}
\item{what}{object to retrieve (by name or index)}
}
\description{
Retrieve object `what` from `lst`
}
|
library(shiny)
POUNDS_TO_KG <<- 2.204 # 1 kg = 2.204 pounds
INCHES_TO_M <<- 0.0254 # 1 inches = 0.254 m
# calculate BMI based on fomula, w is in kg, and h is in m
calculateBMI <- function(w,h) w/(h*h)
calculate <- function(w_type,h_type,h1,h2,h,w,w2){
new_w <<- w
new_h <<- h
if(w_type=='pounds'){ #conv... | /server.r | no_license | paullo0106/shinyapps | R | false | false | 4,065 | r | library(shiny)
POUNDS_TO_KG <<- 2.204 # 1 kg = 2.204 pounds
INCHES_TO_M <<- 0.0254 # 1 inches = 0.254 m
# calculate BMI based on fomula, w is in kg, and h is in m
calculateBMI <- function(w,h) w/(h*h)
calculate <- function(w_type,h_type,h1,h2,h,w,w2){
new_w <<- w
new_h <<- h
if(w_type=='pounds'){ #conv... |
x <- 1:4
y <- 6:9
x
y
x + y
x > 2
x >= 2
y == 8
x * y
x / y
##Vectorized Matrix Operations
x <- matrix(1:4,2,2)
x
y <- matrix(rep(10,4),2,2)
y
x * y
x/y
x %*% y
| /Coursera/R/Vectorized Operations.R | no_license | cpm205/Machine-Learning | R | false | false | 172 | r | x <- 1:4
y <- 6:9
x
y
x + y
x > 2
x >= 2
y == 8
x * y
x / y
##Vectorized Matrix Operations
x <- matrix(1:4,2,2)
x
y <- matrix(rep(10,4),2,2)
y
x * y
x/y
x %*% y
|
source("data_Preprocessing.R")
source("UI_Helper.R")
source("storage_operations.R")
source("ui.R")
library("ggplot2")
library("devtools")
library(DT)
library(aws.s3)
#install_github("timelyportfolio/sweetalertR")
server <- (function(input,output,session) {
AWS_ACCESS_KEY_ID <- 'AWS_ACCESS_KEY_ID'
AWS_SECRE... | /server.R | no_license | Empik12/HRV-Data-Platform | R | false | false | 8,600 | r | source("data_Preprocessing.R")
source("UI_Helper.R")
source("storage_operations.R")
source("ui.R")
library("ggplot2")
library("devtools")
library(DT)
library(aws.s3)
#install_github("timelyportfolio/sweetalertR")
server <- (function(input,output,session) {
AWS_ACCESS_KEY_ID <- 'AWS_ACCESS_KEY_ID'
AWS_SECRE... |
# Problem 6: Linear Method for Classification: Scenario 1
library(MASS)
# Restoring Data
load("testing_two_class.RData")
load("training_two_class.RData")
# Scatter Plot for Scenario 1
plot(training_two_class[1:100, ], col="green", xlim=c(-2,5), ylim=c(-2,6), xlab = "x", ylab = "y", main="Two-Class Classification Prob... | /Yadav_Robin_hw2_prob6_code.R | no_license | chhavi-tyagi/Math-574M-Statistical-Machine-Learning | R | false | false | 4,074 | r | # Problem 6: Linear Method for Classification: Scenario 1
library(MASS)
# Restoring Data
load("testing_two_class.RData")
load("training_two_class.RData")
# Scatter Plot for Scenario 1
plot(training_two_class[1:100, ], col="green", xlim=c(-2,5), ylim=c(-2,6), xlab = "x", ylab = "y", main="Two-Class Classification Prob... |
mhs <- 0:100
ghs <- 0:100
k <- sapply(mhs, function(mh) {
mh <- 1
sapply(ghs, function(gh) {
m_side <- data.table(m = c(rep(TRUE, mh), rep(FALSE, 100 - mh)),
merger = TRUE)[sample(.N)]
g_side <- data.table(g = c(rep(TRUE, gh), rep(FALSE, 100 - gh)),
merger ... | /test_info_gain.R | no_license | brianstamper/cpda | R | false | false | 478 | r | mhs <- 0:100
ghs <- 0:100
k <- sapply(mhs, function(mh) {
mh <- 1
sapply(ghs, function(gh) {
m_side <- data.table(m = c(rep(TRUE, mh), rep(FALSE, 100 - mh)),
merger = TRUE)[sample(.N)]
g_side <- data.table(g = c(rep(TRUE, gh), rep(FALSE, 100 - gh)),
merger ... |
library(caTools)
library(ggplot2)
dataset = read.csv('../moar_data/Salary_Data.csv')
## Split the dataset into the training and test sets:
set.seed(123)
## sample.split(dependent_var (output), what_percentage_is_used_for_training)
split = sample.split(dataset$Salary, SplitRatio = 2/3) ## split the sample into the tra... | /R/regression.r | no_license | alex0112/ml | R | false | false | 1,251 | r | library(caTools)
library(ggplot2)
dataset = read.csv('../moar_data/Salary_Data.csv')
## Split the dataset into the training and test sets:
set.seed(123)
## sample.split(dependent_var (output), what_percentage_is_used_for_training)
split = sample.split(dataset$Salary, SplitRatio = 2/3) ## split the sample into the tra... |
testlist <- list(Rs = c(-5.00970437723463e+278, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), atmp = numeric(0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.93925524... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615862759-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 474 | r | testlist <- list(Rs = c(-5.00970437723463e+278, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), atmp = numeric(0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.93925524... |
rm(list=ls())
library(tidyverse)
data(murders)
data(murders)
murders$murder_rate <- murders$total/murders$population*10^5
#arrange
#Ascending
murders %>% arrange(population) %>% head() #order states by population size. Head shows the first 6
murders %>% arrange(murder_rate) %>% head() #order states by murder_rate
#D... | /2. Visualization/3. Summarizing with dplyr/3.1.3 Sorting data tables.R | no_license | aquijanoruiz/Harvardx_data_science | R | false | false | 752 | r | rm(list=ls())
library(tidyverse)
data(murders)
data(murders)
murders$murder_rate <- murders$total/murders$population*10^5
#arrange
#Ascending
murders %>% arrange(population) %>% head() #order states by population size. Head shows the first 6
murders %>% arrange(murder_rate) %>% head() #order states by murder_rate
#D... |
border_Data = read.csv("Border_Crossing_Entry_Data.csv")
border_data2 = read.csv("BORDER_DATA.csv")
summary(border_Data)
border_backup1 = border_Data
border_backup2 = border_Data
border_Data = border_backup2
border_backup3 = border_data2
border_data2 = select(border_data2, -c(10,11,12,13))
##### ARIMA
set.seed(123)
... | /BORDER_DATA.R | no_license | samya-NCI/MachineLearning | R | false | false | 2,437 | r | border_Data = read.csv("Border_Crossing_Entry_Data.csv")
border_data2 = read.csv("BORDER_DATA.csv")
summary(border_Data)
border_backup1 = border_Data
border_backup2 = border_Data
border_Data = border_backup2
border_backup3 = border_data2
border_data2 = select(border_data2, -c(10,11,12,13))
##### ARIMA
set.seed(123)
... |
# MAIN FUNCTION -----------------------------------------------------------
tokenise <- function(dataSource,no_cores){
# read source data
sourceData <- readr::read_csv(paste0(getwd(),"/data/",dataSource), col_names = F)
sourceData$X1 <- tolower(sourceData$X1)
tokenised <- list()
for(i in 1:nrow(sourceDat... | /src/createTIC/tokenisers/discrete/genes-CODON-samplesequence/tokeniser.R | permissive | vuw-c2lab/transcendental-information-cascades | R | false | false | 1,084 | r | # MAIN FUNCTION -----------------------------------------------------------
tokenise <- function(dataSource,no_cores){
# read source data
sourceData <- readr::read_csv(paste0(getwd(),"/data/",dataSource), col_names = F)
sourceData$X1 <- tolower(sourceData$X1)
tokenised <- list()
for(i in 1:nrow(sourceDat... |
library(ggtern)
# Based of random data.
DATA <- data.frame(A = runif(100), B = runif(100), C = runif(100))
plot <- ggtern(data = DATA,
mapping = aes(x = A, y = B, z = C)) +
geom_point()
plot
# example from http://ggtern.com/2013/12/12/patched-density-functions-2/
suppressMessages(library(ggtern... | /ch04/R/trilinear.R | no_license | friendly/VCDR | R | false | false | 1,466 | r | library(ggtern)
# Based of random data.
DATA <- data.frame(A = runif(100), B = runif(100), C = runif(100))
plot <- ggtern(data = DATA,
mapping = aes(x = A, y = B, z = C)) +
geom_point()
plot
# example from http://ggtern.com/2013/12/12/patched-density-functions-2/
suppressMessages(library(ggtern... |
################################################################################
#
# Program Name: runit_optAugmentLHS.R
# Purpose: To provide test functions for optAugmentLHS.R
# Author: Rob Carnell
# Date: June 2006
#
# Required Functions: optAugmentLHS.R
# Required Packages: RUnit
# ... | /SOM/x86_64-pc-linux-gnu-library/3.4/lhs/unitTests/runit_optAugmentLHS.r | no_license | shafkat2/Industrial_Development_A.I | R | false | false | 1,465 | r | ################################################################################
#
# Program Name: runit_optAugmentLHS.R
# Purpose: To provide test functions for optAugmentLHS.R
# Author: Rob Carnell
# Date: June 2006
#
# Required Functions: optAugmentLHS.R
# Required Packages: RUnit
# ... |
# Nan value
df = data.frame(sex = c('M',"F",NA,'M','F'),
score = c(5,4,3,4,NA))
df
is.na(df)
table(is.na(df)) #df의 nan값을 태이블로 만들어라.
table(is.na(df$sex)) #df의 sex칼럼에 대해 nan값을 태이블로
table(is.na(df$score))
# Nan 값이 있으면, 평균과 합계를 산출할 수 없음
mean(df$score)
sum(df$score)
# delete Nan value (column)
lib... | /exercise/script5.R | no_license | signature95/HR_solution | R | false | false | 1,950 | r | # Nan value
df = data.frame(sex = c('M',"F",NA,'M','F'),
score = c(5,4,3,4,NA))
df
is.na(df)
table(is.na(df)) #df의 nan값을 태이블로 만들어라.
table(is.na(df$sex)) #df의 sex칼럼에 대해 nan값을 태이블로
table(is.na(df$score))
# Nan 값이 있으면, 평균과 합계를 산출할 수 없음
mean(df$score)
sum(df$score)
# delete Nan value (column)
lib... |
## ui.R ##
library(shiny); library(DT); library(shinyjs); library(shinyBS); library(zoo); library(quantmod);
library(tidyverse); library(htmltools); library(dygraphs); library(xts); library(d3scatter)
library(crosstalk); library(plotly); library(scatterD3); library(janitor)
#setwd("C:/Users/natha/OneDrive/Deskto... | /ui.r | no_license | nathanc88/Shiny-Fantasy-Bball | R | false | false | 2,646 | r | ## ui.R ##
library(shiny); library(DT); library(shinyjs); library(shinyBS); library(zoo); library(quantmod);
library(tidyverse); library(htmltools); library(dygraphs); library(xts); library(d3scatter)
library(crosstalk); library(plotly); library(scatterD3); library(janitor)
#setwd("C:/Users/natha/OneDrive/Deskto... |
#' Weekly horoscopes from Chani Nicholas
#'
#' Returns horoscopes from \url{http://chaninicholas.com}. Includes data for
#' 2015-2017, with start dates between 2015-01-05 and 2017-02-06.All horoscopes
#' are written for one week, with the exception of the horoscopes starting on
#' 2015-03-23, which were written for two... | /R/data.R | no_license | jjchern/astrologer | R | false | false | 824 | r | #' Weekly horoscopes from Chani Nicholas
#'
#' Returns horoscopes from \url{http://chaninicholas.com}. Includes data for
#' 2015-2017, with start dates between 2015-01-05 and 2017-02-06.All horoscopes
#' are written for one week, with the exception of the horoscopes starting on
#' 2015-03-23, which were written for two... |
## TODO: Add comment
#
## Author: David Carslaw
## useful utility functions
## with some updates and modification by Karl Ropkins
###############################################################################
startYear <- function(dat) as.numeric(format(min(dat[order(dat)]), "%Y"))
endYear <- function(dat) as.numeric... | /R/utilities.R | no_license | Berkeley-airdata-collaborate/Openair | R | false | false | 35,614 | r | ## TODO: Add comment
#
## Author: David Carslaw
## useful utility functions
## with some updates and modification by Karl Ropkins
###############################################################################
startYear <- function(dat) as.numeric(format(min(dat[order(dat)]), "%Y"))
endYear <- function(dat) as.numeric... |
\name{stable_rnd}
\alias{stable_rnd}
\alias{libstableR_stable_rnd}
\title{
stable_rnd: Skew stable distribution random sample generation.
}
\description{
stable_rnd(N, pars) generates N random samples of a skew stable distribuiton
with parameters pars = c(alpha, beta, sigma, mu) using the Chambers, Mallows,
an... | /man/stable_rnd.Rd | no_license | swihart/libstableR | R | false | false | 1,780 | rd | \name{stable_rnd}
\alias{stable_rnd}
\alias{libstableR_stable_rnd}
\title{
stable_rnd: Skew stable distribution random sample generation.
}
\description{
stable_rnd(N, pars) generates N random samples of a skew stable distribuiton
with parameters pars = c(alpha, beta, sigma, mu) using the Chambers, Mallows,
an... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ml_functions.R
\name{projects.getConfig}
\alias{projects.getConfig}
\title{Get the service account information associated with your project. You need this information in order to grant the service account permissions for the Google Cloud Stor... | /googlemlv1.auto/man/projects.getConfig.Rd | no_license | justinjm/autoGoogleAPI | R | false | true | 994 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ml_functions.R
\name{projects.getConfig}
\alias{projects.getConfig}
\title{Get the service account information associated with your project. You need this information in order to grant the service account permissions for the Google Cloud Stor... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 93844
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 73929
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 73929
c
c Input Parameter (command line, ... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Kronegger-Pfandler-Pichler/dungeon/dungeon_i10-m10-u5-v0.pddl_planlen=175/dungeon_i10-m10-u5-v0.pddl_planlen=175.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 112,831 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 93844
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 73929
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 73929
c
c Input Parameter (command line, ... |
#Matrix
#matrix is a collection of data elements arranged in a two-dimensional rectangular layout.
set.seed(123)
data = rnorm(n=30, mean=60, sd=10)
data = trunc(data)
data
m1 = matrix(data, ncol=6)
m1
(m2 = matrix(data, nrow=6))
(m2R = matrix(data, nrow=6, byrow = T))
#nrow * ncol = length of data
#6 * 5 = 30
#filt... | /C1/matrix1.R | no_license | DUanalytics/BARtaxila | R | false | false | 456 | r | #Matrix
#matrix is a collection of data elements arranged in a two-dimensional rectangular layout.
set.seed(123)
data = rnorm(n=30, mean=60, sd=10)
data = trunc(data)
data
m1 = matrix(data, ncol=6)
m1
(m2 = matrix(data, nrow=6))
(m2R = matrix(data, nrow=6, byrow = T))
#nrow * ncol = length of data
#6 * 5 = 30
#filt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/attributes.R
\name{col_width}
\alias{col_width}
\alias{col_width<-}
\alias{set_col_width}
\alias{col_width.huxtable}
\alias{col_width<-.huxtable}
\title{Column widths}
\usage{
col_width(ht)
col_width(ht) <- value
set_col_width(ht, col, value)... | /man/col_width.Rd | no_license | YTLogos/huxtable | R | false | true | 1,217 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/attributes.R
\name{col_width}
\alias{col_width}
\alias{col_width<-}
\alias{set_col_width}
\alias{col_width.huxtable}
\alias{col_width<-.huxtable}
\title{Column widths}
\usage{
col_width(ht)
col_width(ht) <- value
set_col_width(ht, col, value)... |
# MOSAIC Function Source
# By Hannah De los Santos
# Code description: Contains all the funcitons for extended harmonic oscillator work, in order to have less confusion between scripts.
# combined models ----
# function to represent the free model of ECHO linear and linear models
# inputs:
# a1: Amplitude, E... | /MOSAIC App/mosaic_master.R | permissive | delosh653/MOSAIC | R | false | false | 145,615 | r | # MOSAIC Function Source
# By Hannah De los Santos
# Code description: Contains all the funcitons for extended harmonic oscillator work, in order to have less confusion between scripts.
# combined models ----
# function to represent the free model of ECHO linear and linear models
# inputs:
# a1: Amplitude, E... |
#####################################################################################
####################################################################################
#
# profile likelihood for etasclass objects
#
#
#####################################################################################
##############... | /R/profile.etasclass.R | no_license | Sean0330/etasFLP | R | false | false | 3,475 | r | #####################################################################################
####################################################################################
#
# profile likelihood for etasclass objects
#
#
#####################################################################################
##############... |
communalities_optimal_solution <- function(df, nfactors, rotate="varimax"){
require(psych)
source("how_many_factors.R")
source("printLoadings.R")
removed <- c()
results <- principal(df, nfactors = nfactors, rotate = rotate, scores = T)
#results$communality <- as.data.frame(results$communality)
while (any(... | /Factor Analysis/communalities_optimal_solution.R | no_license | storopoli/R_Scripts | R | false | false | 1,441 | r | communalities_optimal_solution <- function(df, nfactors, rotate="varimax"){
require(psych)
source("how_many_factors.R")
source("printLoadings.R")
removed <- c()
results <- principal(df, nfactors = nfactors, rotate = rotate, scores = T)
#results$communality <- as.data.frame(results$communality)
while (any(... |
/2011-11-02-AproximacionBinomialPorNorrmal.R | no_license | marcosmarva/POSTDATA_LIBRO | R | false | false | 741 | r | ||
library(fdasrvf)
### Name: warp_f_gamma
### Title: Warp Function
### Aliases: warp_f_gamma
### Keywords: alignment srvf
### ** Examples
data("simu_data")
fnew = warp_f_gamma(simu_data$f[,1],simu_data$time,seq(0,1,length.out=101))
| /data/genthat_extracted_code/fdasrvf/examples/warp_f_gamma.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 237 | r | library(fdasrvf)
### Name: warp_f_gamma
### Title: Warp Function
### Aliases: warp_f_gamma
### Keywords: alignment srvf
### ** Examples
data("simu_data")
fnew = warp_f_gamma(simu_data$f[,1],simu_data$time,seq(0,1,length.out=101))
|
library(BSgenome.Hsapiens.UCSC.hg19)
fun <- VariantAnnotation:::.predictCodingGRangesList
cdsbytx <- GRangesList(tx1=GRanges(seqnames="chr1",
IRanges(c(10001, 10010), width=5),
strand="+"),
tx2=GRanges(seqnames="chr1",
... | /VariantAnnotation/inst/unitTests/test_predictCoding-methods.R | no_license | smgogarten/VCF_projects | R | false | false | 3,903 | r | library(BSgenome.Hsapiens.UCSC.hg19)
fun <- VariantAnnotation:::.predictCodingGRangesList
cdsbytx <- GRangesList(tx1=GRanges(seqnames="chr1",
IRanges(c(10001, 10010), width=5),
strand="+"),
tx2=GRanges(seqnames="chr1",
... |
# Automate the calculation of NEPOOL ancillaries actuals
#
#
##################################################################
##################################################################
options(width=400) # make some room for the output
require(CEGbase)
require(SecDb)
require(zoo)
require(reshape)
require... | /R Extension/RMG/Energy/Trading/Congestion/Condor/nepool_ancillaries_actuals.R | no_license | uhasan1/QLExtension-backup | R | false | false | 1,290 | r | # Automate the calculation of NEPOOL ancillaries actuals
#
#
##################################################################
##################################################################
options(width=400) # make some room for the output
require(CEGbase)
require(SecDb)
require(zoo)
require(reshape)
require... |
tar_test("tar_older() works", {
tar_script(tar_target(x, 1))
tar_make(callr_function = NULL)
early <- Sys.time() - as.difftime(1, units = "weeks")
late <- Sys.time() + as.difftime(1, units = "weeks")
expect_equal(tar_older(early), character(0))
expect_equal(tar_older(late), "x")
expect_equal(tar_older(lat... | /tests/testthat/test-tar_older.R | permissive | ropensci/targets | R | false | false | 362 | r | tar_test("tar_older() works", {
tar_script(tar_target(x, 1))
tar_make(callr_function = NULL)
early <- Sys.time() - as.difftime(1, units = "weeks")
late <- Sys.time() + as.difftime(1, units = "weeks")
expect_equal(tar_older(early), character(0))
expect_equal(tar_older(late), "x")
expect_equal(tar_older(lat... |
## Functions to Cache the Inverse of a Matrix
## This makeCacheMatrix function creates a special "matrix",
## which is a list containing a function to
## set the value of the matrix
## get the value of the matrix
## set the value of the inverse matrix
## get the balue of the inverse matrix
makeCacheMatrix <- functio... | /cachematrix.R | no_license | fronori/ProgrammingAssignment2 | R | false | false | 1,122 | r | ## Functions to Cache the Inverse of a Matrix
## This makeCacheMatrix function creates a special "matrix",
## which is a list containing a function to
## set the value of the matrix
## get the value of the matrix
## set the value of the inverse matrix
## get the balue of the inverse matrix
makeCacheMatrix <- functio... |
library(sparseHessianFD)
### Name: sparseHessianFD
### Title: sparseHessianFD
### Aliases: sparseHessianFD
### ** Examples
## Log posterior density of hierarchical binary choice model. See vignette.
set.seed(123)
data("binary_small")
N <- length(binary[["Y"]])
k <- NROW(binary[["X"]])
T <- binary[["T"]]
P <- rnorm(... | /data/genthat_extracted_code/sparseHessianFD/examples/sparseHessianFD.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 926 | r | library(sparseHessianFD)
### Name: sparseHessianFD
### Title: sparseHessianFD
### Aliases: sparseHessianFD
### ** Examples
## Log posterior density of hierarchical binary choice model. See vignette.
set.seed(123)
data("binary_small")
N <- length(binary[["Y"]])
k <- NROW(binary[["X"]])
T <- binary[["T"]]
P <- rnorm(... |
\name{edit.ppp}
\alias{edit.ppp}
\alias{edit.psp}
\alias{edit.im}
\title{
Invoke Text Editor on Spatial Data
}
\description{
Invokes a text editor allowing the user to inspect and change
entries in a spatial dataset.
}
\usage{
\method{edit}{ppp}(name, \dots)
\method{edit}{psp}(name, \dots)
\method{edit}{im}(na... | /man/edit.ppp.Rd | no_license | rubak/spatstat | R | false | false | 1,617 | rd | \name{edit.ppp}
\alias{edit.ppp}
\alias{edit.psp}
\alias{edit.im}
\title{
Invoke Text Editor on Spatial Data
}
\description{
Invokes a text editor allowing the user to inspect and change
entries in a spatial dataset.
}
\usage{
\method{edit}{ppp}(name, \dots)
\method{edit}{psp}(name, \dots)
\method{edit}{im}(na... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/css.R
\name{css}
\alias{css}
\title{A css function}
\usage{
css()
}
\description{
This function allows you to create a css style text
}
\keyword{css}
\keyword{html}
| /man/css.Rd | no_license | ghowoo/Wu | R | false | true | 243 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/css.R
\name{css}
\alias{css}
\title{A css function}
\usage{
css()
}
\description{
This function allows you to create a css style text
}
\keyword{css}
\keyword{html}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3_operations.R
\name{s3_list_objects_v2}
\alias{s3_list_objects_v2}
\title{Returns some or all (up to 1,000) of the objects in a bucket}
\usage{
s3_list_objects_v2(Bucket, Delimiter, EncodingType, MaxKeys, Prefix,
ContinuationToken, FetchO... | /cran/paws.storage/man/s3_list_objects_v2.Rd | permissive | ryanb8/paws | R | false | true | 4,058 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3_operations.R
\name{s3_list_objects_v2}
\alias{s3_list_objects_v2}
\title{Returns some or all (up to 1,000) of the objects in a bucket}
\usage{
s3_list_objects_v2(Bucket, Delimiter, EncodingType, MaxKeys, Prefix,
ContinuationToken, FetchO... |
# Q1 ----
library(dplyr)
setwd("D:\\temp")
d <- read.csv("35478-0001-Data.csv")
d <- d %>% select(AGE, DEGREE, EDUC, HAPPY, HOMPOP, INCOME, MARITAL, RACE, RINCOME, SEX)
nrow(d)
# [1] 4820
# Ans: There are 4820 rows
# Q2 ----
# AGE Missing Data
# 98 Don't Know
# 99 No Answer
length(d$AGE[... | /Assignment1.R | no_license | djokow/assignment1 | R | false | false | 7,853 | r | # Q1 ----
library(dplyr)
setwd("D:\\temp")
d <- read.csv("35478-0001-Data.csv")
d <- d %>% select(AGE, DEGREE, EDUC, HAPPY, HOMPOP, INCOME, MARITAL, RACE, RINCOME, SEX)
nrow(d)
# [1] 4820
# Ans: There are 4820 rows
# Q2 ----
# AGE Missing Data
# 98 Don't Know
# 99 No Answer
length(d$AGE[... |
#Read data from CSV and store in Data Frame
prc <- read.csv("46-73_updated.csv",stringsAsFactors = FALSE)
str(prc) #check if structured
#Remove inessential columns - only keep features, classifier column
KeepCols <- c("shots.made","shots.attempted","free.throws.made"
,"points.scored","points.allowed","Pl... | /K-Nearest Neighbors/KNN wiith Feature Selection/46-72_Dataset/46-73_predict_PlayoffsWin.R | no_license | aayushagarwal7/Predicting_Good_NBA_Teams | R | false | false | 1,381 | r | #Read data from CSV and store in Data Frame
prc <- read.csv("46-73_updated.csv",stringsAsFactors = FALSE)
str(prc) #check if structured
#Remove inessential columns - only keep features, classifier column
KeepCols <- c("shots.made","shots.attempted","free.throws.made"
,"points.scored","points.allowed","Pl... |
setwd("~/Documents/Documents/Important Files/Hopkins/Data Science/Exploratory Data Analysis")
dataset_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(dataset_url, "electric_power_consumption.zip")
unzip("electric_power_consumption.zip", exdir = "electr... | /plot2.R | no_license | kward34/ExData_Plotting1 | R | false | false | 1,651 | r | setwd("~/Documents/Documents/Important Files/Hopkins/Data Science/Exploratory Data Analysis")
dataset_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(dataset_url, "electric_power_consumption.zip")
unzip("electric_power_consumption.zip", exdir = "electr... |
fit.gewma =
function(X, M = 20,
r = seq(0, 1, length.out = 2+5),
alpha = seq(0, pi, length.out = 2+5))
{
n = length(X)
theta = -1 + 1:(2*M)/M
theta.exp = sapply(1:n, function(j) theta^(j-1))
r = r[-c(1, length(r))]
alpha = alpha[-c(1, length(alpha))]
... | /project/gewma/R/fit.R | no_license | chcai/sta250win14 | R | false | false | 1,937 | r | fit.gewma =
function(X, M = 20,
r = seq(0, 1, length.out = 2+5),
alpha = seq(0, pi, length.out = 2+5))
{
n = length(X)
theta = -1 + 1:(2*M)/M
theta.exp = sapply(1:n, function(j) theta^(j-1))
r = r[-c(1, length(r))]
alpha = alpha[-c(1, length(alpha))]
... |
testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(1.24215602296612e+132, 7.95869216889766e-305, 1.21362470735706e+132, 2.63554948580763e-82, 0, 0, 0), .Dim = c(1L, 7L)))
result <- do.call(palm:::pbc_distances,testlist)
str(result) | /palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612988676-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 259 | r | testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(1.24215602296612e+132, 7.95869216889766e-305, 1.21362470735706e+132, 2.63554948580763e-82, 0, 0, 0), .Dim = c(1L, 7L)))
result <- do.call(palm:::pbc_distances,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chk-lt.R
\name{chk_lt}
\alias{chk_lt}
\alias{vld_lt}
\title{Check Less Than}
\usage{
chk_lt(x, value = 0, x_name = NULL)
vld_lt(x, value = 0)
}
\arguments{
\item{x}{The object to check.}
\item{value}{A non-missing scalar of a value.}
\item... | /man/chk_lt.Rd | permissive | krlmlr/chk | R | false | true | 1,088 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chk-lt.R
\name{chk_lt}
\alias{chk_lt}
\alias{vld_lt}
\title{Check Less Than}
\usage{
chk_lt(x, value = 0, x_name = NULL)
vld_lt(x, value = 0)
}
\arguments{
\item{x}{The object to check.}
\item{value}{A non-missing scalar of a value.}
\item... |
# ----------------------------------------
# Objective: Compare climate sensitivities of models fit for different periods of data:
# 1. 1990-2010 (modern data, no fading record issues)
# 2. 1900-2010 (empirical record, modern met data, scale of succession)
# 3. 850-2010 (scale of mi... | /R/5_GAMMs_TemporalExtent.R | no_license | PalEON-Project/Temporal-Scaling-MS | R | false | false | 22,340 | r | # ----------------------------------------
# Objective: Compare climate sensitivities of models fit for different periods of data:
# 1. 1990-2010 (modern data, no fading record issues)
# 2. 1900-2010 (empirical record, modern met data, scale of succession)
# 3. 850-2010 (scale of mi... |
library(ape)
testtree <- read.tree("12086_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="12086_0_unrooted.txt") | /codeml_files/newick_trees_processed/12086_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("12086_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="12086_0_unrooted.txt") |
# function spuRs/resources/scripts/nfact2.r
nfact2 <- function(n) {
# calculate n factorial
if (n == 1) {
cat("called nfact2(1)\n")
return(1)
} else {
cat("called nfact2(", n, ")\n", sep = "")
return(n*nfact2(n-1))
}
}
| /scientific_programming_simulation_in_R/source_code/scripts/nfact2.r | no_license | cheerzzh/R_for_fun-learning | R | false | false | 280 | r | # function spuRs/resources/scripts/nfact2.r
nfact2 <- function(n) {
# calculate n factorial
if (n == 1) {
cat("called nfact2(1)\n")
return(1)
} else {
cat("called nfact2(", n, ")\n", sep = "")
return(n*nfact2(n-1))
}
}
|
library(tidyverse)
library(forecast)
library(e1071)
library(dplyr)
library(caret)
library(ggplot2)
#Naive Bayes
df<-read.csv("melbourne.csv")
df2<-filter(df,neighborhood=="Southbank")
df3<-df2[,c(79,23,48,62,80)]
#NAs
str(df3)
df3$host_response_rate<-as.numeric(sub("%","",df3$host_response_rate))/100
df3$... | /III-2-Naive Bayes.R | no_license | Joey-lgr/Airbnb-Analytics-Project | R | false | false | 1,403 | r | library(tidyverse)
library(forecast)
library(e1071)
library(dplyr)
library(caret)
library(ggplot2)
#Naive Bayes
df<-read.csv("melbourne.csv")
df2<-filter(df,neighborhood=="Southbank")
df3<-df2[,c(79,23,48,62,80)]
#NAs
str(df3)
df3$host_response_rate<-as.numeric(sub("%","",df3$host_response_rate))/100
df3$... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7742
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7742
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/incrementer-encoder/incrementer-enc01-nonun... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/incrementer-encoder/incrementer-enc01-nonuniform-depth-4/incrementer-enc01-nonuniform-depth-4.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 699 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7742
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7742
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/incrementer-encoder/incrementer-enc01-nonun... |
#' Retrieve synonyms from various sources given input taxonomic
#' names or identifiers
#'
#' @param sci_id Vector of taxa names (character) or IDs (character or numeric)
#' @param db character; database to query. either `itis`, `tropicos`,
#' `nbn`, `worms`, or `pow`. Note that each taxonomic data source has their own... | /R/synonyms.R | permissive | zachary-foster/taxize | R | false | false | 10,712 | r | #' Retrieve synonyms from various sources given input taxonomic
#' names or identifiers
#'
#' @param sci_id Vector of taxa names (character) or IDs (character or numeric)
#' @param db character; database to query. either `itis`, `tropicos`,
#' `nbn`, `worms`, or `pow`. Note that each taxonomic data source has their own... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simple_linear_iiv.R
\name{Simple.Linear.IIV}
\alias{Simple.Linear.IIV}
\title{Imperfect instrumental variable estimator with one imperfect instrument}
\usage{
Simple.Linear.IIV(data, dep.var, endo.regressor, instrument,
cor.direction = "xxx... | /iivestimatoR/man/Simple.Linear.IIV.Rd | permissive | phi-ra/IIV | R | false | true | 977 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simple_linear_iiv.R
\name{Simple.Linear.IIV}
\alias{Simple.Linear.IIV}
\title{Imperfect instrumental variable estimator with one imperfect instrument}
\usage{
Simple.Linear.IIV(data, dep.var, endo.regressor, instrument,
cor.direction = "xxx... |
# Exploratory Data Analysis
# Assignment 1, part 3/4
# Code for creating plot #3
#
#### Reading data
# set working directory
setwd("~/Documents/coursera/DataAnalysis/4EDA/week1")
#
# Read only 2-day data: 2007-02-01 and 2007-02-02
#
library(sqldf)
#
datafile <- file("household_power_consumption.txt")
# #2007-02-01
da... | /plot3_code.R | no_license | inesgn/ExData_Plotting1 | R | false | false | 1,455 | r | # Exploratory Data Analysis
# Assignment 1, part 3/4
# Code for creating plot #3
#
#### Reading data
# set working directory
setwd("~/Documents/coursera/DataAnalysis/4EDA/week1")
#
# Read only 2-day data: 2007-02-01 and 2007-02-02
#
library(sqldf)
#
datafile <- file("household_power_consumption.txt")
# #2007-02-01
da... |
## Getting full dataset
data_full <- read.csv("/Users/Eric/Downloads/household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y")
## Subsetting the ... | /plot3.R | no_license | eleakin/ExData1 | R | false | false | 960 | r | ## Getting full dataset
data_full <- read.csv("/Users/Eric/Downloads/household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y")
## Subsetting the ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect.R
\name{installAndRunOnAster}
\alias{installAndRunOnAster}
\title{Installes the script on the Aster cluster before running it.
It will remove any previous script with the same name}
\usage{
installAndRunOnAster(path, script, mem = "un... | /man/installAndRunOnAster.Rd | no_license | kpnDataScienceLab/modelFactoryR | R | false | true | 966 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect.R
\name{installAndRunOnAster}
\alias{installAndRunOnAster}
\title{Installes the script on the Aster cluster before running it.
It will remove any previous script with the same name}
\usage{
installAndRunOnAster(path, script, mem = "un... |
###############################################################################
## Script data voor vragen fietsenstallingsgebruik
#
# Poolopdracht G4 Trainees Informatiemanagement (sep 2018- feb 2019)
# Scrumteam: Mobile Informatie Eenheid
# Door: Alma Raskadic, bewerkt door Jurriaan Duyne
#install.packages(... | /Vraag_1_bezetting.R | no_license | g4trainees/MIEFietsen | R | false | false | 3,009 | r | ###############################################################################
## Script data voor vragen fietsenstallingsgebruik
#
# Poolopdracht G4 Trainees Informatiemanagement (sep 2018- feb 2019)
# Scrumteam: Mobile Informatie Eenheid
# Door: Alma Raskadic, bewerkt door Jurriaan Duyne
#install.packages(... |
# devtools::install_github("BMEngineeR/scGNNLTMG")
# x <- read.csv("d:/my_analysis/BRIC_TEST/2.Yan/Yan_expression.csv",header = T,row.names = 1,check.names = F)
# library(scGNNLTMG)
# object <- CreateLTMGObject(x)
# object <-RunLTMG(object,Gene_use = 100)
# WriteSparse(object,path = "d:/BMBL",gene.name = FALSE, cell.n... | /R/example.R | no_license | BMEngineeR/scGNNLTMG | R | false | false | 4,838 | r | # devtools::install_github("BMEngineeR/scGNNLTMG")
# x <- read.csv("d:/my_analysis/BRIC_TEST/2.Yan/Yan_expression.csv",header = T,row.names = 1,check.names = F)
# library(scGNNLTMG)
# object <- CreateLTMGObject(x)
# object <-RunLTMG(object,Gene_use = 100)
# WriteSparse(object,path = "d:/BMBL",gene.name = FALSE, cell.n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/F022.run.imput.R
\name{run.impute}
\alias{run.impute}
\title{Impute the main data}
\usage{
run.impute(x = NULL, genes = "all_genes", k = 10, alpha = 15,
t = "auto", npca = 100, init = NULL, t.max = 20,
knn.dist.method = "euclidean", verbo... | /man/run.impute.Rd | no_license | Lelouchzhu/iCellR | R | false | true | 2,371 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/F022.run.imput.R
\name{run.impute}
\alias{run.impute}
\title{Impute the main data}
\usage{
run.impute(x = NULL, genes = "all_genes", k = 10, alpha = 15,
t = "auto", npca = 100, init = NULL, t.max = 20,
knn.dist.method = "euclidean", verbo... |
# Set working directory containing the mcmc files
# I changed this for each of the models I used.
setwd("~/Box Sync/my_R_packages/senegalHIVmodel/analyses/scripts/Models/BySubtype/C_m2/Preliminary_results/withZmatrix/PARALLEL")
fileNames <- Sys.glob("*.rds")
library(BayesianTools)
library(senegalHIVmodel)
# reads the... | /analyses/results/read_mcmc_runs.R | no_license | thednainus/senegalHIVmodel | R | false | false | 5,332 | r | # Set working directory containing the mcmc files
# I changed this for each of the models I used.
setwd("~/Box Sync/my_R_packages/senegalHIVmodel/analyses/scripts/Models/BySubtype/C_m2/Preliminary_results/withZmatrix/PARALLEL")
fileNames <- Sys.glob("*.rds")
library(BayesianTools)
library(senegalHIVmodel)
# reads the... |
library(cardidates)
### Name: plot.cardiMetacdw
### Title: Plot Method for cardiPeakwindow Objects
### Aliases: plot.cardiMetacdw
### Keywords: hplot methods
### ** Examples
## artificial test data
data(carditest)
## identify all peaks
tt <- metaCDW(carditest)
## plot it;
plot(tt, carditest)
## or with alternate... | /data/genthat_extracted_code/cardidates/examples/plot.cardiMetacdw.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 426 | r | library(cardidates)
### Name: plot.cardiMetacdw
### Title: Plot Method for cardiPeakwindow Objects
### Aliases: plot.cardiMetacdw
### Keywords: hplot methods
### ** Examples
## artificial test data
data(carditest)
## identify all peaks
tt <- metaCDW(carditest)
## plot it;
plot(tt, carditest)
## or with alternate... |
require (data.table)
require (dplyr)
require(tidyr)
require(sqldf)
?fread
tabla <- fread(file = 'train_sample.csv',data.table = F)
producto <- read.csv(file = 'producto_tabla_nuevo.csv')
# Fazendo o join entre os datasets original e o de produto
View(tabla)
View(producto)
?sqldf
tabla.Producto_ID <- sq... | /Projetos com feedback/Projeto2/analise_bimbo_3.R | no_license | v-oliveirajr/Projetos-DSA | R | false | false | 5,899 | r | require (data.table)
require (dplyr)
require(tidyr)
require(sqldf)
?fread
tabla <- fread(file = 'train_sample.csv',data.table = F)
producto <- read.csv(file = 'producto_tabla_nuevo.csv')
# Fazendo o join entre os datasets original e o de produto
View(tabla)
View(producto)
?sqldf
tabla.Producto_ID <- sq... |
/独立t检验.r | no_license | y570pc/data_analysis | R | false | false | 1,499 | r | ||
library(ncdf4)
setwd("/Users/paleolab/Downloads/phase1a_met_drivers_v2/PBL/precipf")
year = seq(850,2010,1)
month = seq(1,12,1)
character_hold = matrix(0,length(month),length(year))
for(y in 1:150){
for(m in 1:9){
character_hold[m,y] <- paste("PBL_precipf_0",year[y],"_0",month[m],sep="")
}
for(m in 10:12){
... | /summarize_drivers_linkages.R | no_license | bcow/Linkages | R | false | false | 2,667 | r | library(ncdf4)
setwd("/Users/paleolab/Downloads/phase1a_met_drivers_v2/PBL/precipf")
year = seq(850,2010,1)
month = seq(1,12,1)
character_hold = matrix(0,length(month),length(year))
for(y in 1:150){
for(m in 1:9){
character_hold[m,y] <- paste("PBL_precipf_0",year[y],"_0",month[m],sep="")
}
for(m in 10:12){
... |
ui_leafleft_chart <- function(id) {
ns <- NS(id)
leafletOutput(ns("mapPlot"))
}
server_leafleft_chart <- function(input, output, session, df) {
output$mapPlot <- renderLeaflet({
withProgress(message = 'Calculation in progress', {
df <- head(df(), 1)
width <- df$WIDTH
... | /app/modules/charts.R | no_license | sflorezp/ship_explorer | R | false | false | 2,383 | r | ui_leafleft_chart <- function(id) {
ns <- NS(id)
leafletOutput(ns("mapPlot"))
}
server_leafleft_chart <- function(input, output, session, df) {
output$mapPlot <- renderLeaflet({
withProgress(message = 'Calculation in progress', {
df <- head(df(), 1)
width <- df$WIDTH
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stnd_values.R
\name{stnd_values}
\alias{stnd_values}
\title{Standardized Score (Z-scores) for a data frame}
\usage{
stnd_values(data)
}
\arguments{
\item{data}{a data.frame of continuous variables}
}
\value{
Z a matrix of the standardized var... | /man/stnd_values.Rd | permissive | leahpom/MATH5793POMERANTZ | R | false | true | 458 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stnd_values.R
\name{stnd_values}
\alias{stnd_values}
\title{Standardized Score (Z-scores) for a data frame}
\usage{
stnd_values(data)
}
\arguments{
\item{data}{a data.frame of continuous variables}
}
\value{
Z a matrix of the standardized var... |
### 2 parameter problem
logf = function(mu,sigma.2,y,n) #log of the posterior distribution - values may be small or large
{
logf = -(n/2+1)*log(sigma.2)-1/(2*sigma.2)*sum((y-mu)^2)
return(logf)
}
# data for example from y = rnorm(20,15,2)
y = c(11.54053,16.60317,15.99318,15.38895,13.18257,18.03025,15.611... | /Metropolis-Hastings Algorithm 2.R | no_license | edwardmoradian/Bayesian-Statistics | R | false | false | 2,902 | r | ### 2 parameter problem
logf = function(mu,sigma.2,y,n) #log of the posterior distribution - values may be small or large
{
logf = -(n/2+1)*log(sigma.2)-1/(2*sigma.2)*sum((y-mu)^2)
return(logf)
}
# data for example from y = rnorm(20,15,2)
y = c(11.54053,16.60317,15.99318,15.38895,13.18257,18.03025,15.611... |
# This script will re-create a version of the RF-MAP model on your system. It is associated with the following manuscript:
# Lukens, W.E., Stinchcomb, G.E., Nordt, L.C., Driese, S.G., Kahle, D.J., and Tubbs, J.D.,
# Recursive partitioning improves paleosol estimates for rainfall,
# submitted to the American Journa... | /rf-map.R | no_license | dkahle/rf-map | R | false | false | 2,173 | r | # This script will re-create a version of the RF-MAP model on your system. It is associated with the following manuscript:
# Lukens, W.E., Stinchcomb, G.E., Nordt, L.C., Driese, S.G., Kahle, D.J., and Tubbs, J.D.,
# Recursive partitioning improves paleosol estimates for rainfall,
# submitted to the American Journa... |
#!/home/statsadmin/R/bin/Rscript
source('Step_0_init.R')
args <- commandArgs()
idx <- as.numeric(args[length(args)])
.libPaths('ysidi/lib')
dt.full.X <- readRDS(file = sprintf('dtfullwald_%d.rds',idx))
set.seed(81762+idx+69)
#generate mnar2 for 5-25% by 5% DO
dt.mnar2 <- miss.apply.do(dt.full.X, b.trt=1, b.y=-2, ... | /Step3_1_impose_miss/wald/step_3_1_type_wald_missing_mnar2_percent_10.R | no_license | yuliasidi/Binomial_PE_Progs | R | false | false | 520 | r | #!/home/statsadmin/R/bin/Rscript
source('Step_0_init.R')
args <- commandArgs()
idx <- as.numeric(args[length(args)])
.libPaths('ysidi/lib')
dt.full.X <- readRDS(file = sprintf('dtfullwald_%d.rds',idx))
set.seed(81762+idx+69)
#generate mnar2 for 5-25% by 5% DO
dt.mnar2 <- miss.apply.do(dt.full.X, b.trt=1, b.y=-2, ... |
coldcublim<- function (l1i=-4,l2i=-4,l1s=4,l2s=4, tol=1e-4, maxEval=100)
{
list(l1i=l1i, l2i=l2i,l1s=l1s, l2s=l2s, tol=tol, maxEval=maxEval)
}
| /R/coldcublim.R | no_license | cran/cold | R | false | false | 151 | r |
coldcublim<- function (l1i=-4,l2i=-4,l1s=4,l2s=4, tol=1e-4, maxEval=100)
{
list(l1i=l1i, l2i=l2i,l1s=l1s, l2s=l2s, tol=tol, maxEval=maxEval)
}
|
# This script follows the book R4ds by Hadley wickham. Source: https://r4ds.had.co.nz/
#install.packages("tidyverse")
library(tidyverse)
# 3.2 First steps
# 3.2.1 The mpg data frame
# plot mpg dataframe fuel efficiency on highway vs car engine size
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy... | /r4ds/r4ds_3_data_visualization.R | no_license | Tnecniv-Teikram/r4ds | R | false | false | 7,372 | r | # This script follows the book R4ds by Hadley wickham. Source: https://r4ds.had.co.nz/
#install.packages("tidyverse")
library(tidyverse)
# 3.2 First steps
# 3.2.1 The mpg data frame
# plot mpg dataframe fuel efficiency on highway vs car engine size
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy... |
context("test-pc_projection")
test_that("pc_projection works", {
# tolernce for results supposed to be 0s
tol <- 1e-5
nirdata <- data("NIRsoil", package = "prospectr")
Xu <- NIRsoil$spc[!as.logical(NIRsoil$train), ]
Yu <- NIRsoil$CEC[!as.logical(NIRsoil$train)]
Yr <- NIRsoil$CEC[as.logica... | /resemble/tests/testthat/test-pc_projection.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 7,898 | r | context("test-pc_projection")
test_that("pc_projection works", {
# tolernce for results supposed to be 0s
tol <- 1e-5
nirdata <- data("NIRsoil", package = "prospectr")
Xu <- NIRsoil$spc[!as.logical(NIRsoil$train), ]
Yu <- NIRsoil$CEC[!as.logical(NIRsoil$train)]
Yr <- NIRsoil$CEC[as.logica... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package.R
\docType{package}
\name{dpos}
\alias{dpos}
\alias{dpos-package}
\title{MAT253 testing}
\description{
This is a test
}
\author{
Sebastian Kopf
}
| /man/dpos.Rd | no_license | KopfLab/dpos | R | false | true | 233 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package.R
\docType{package}
\name{dpos}
\alias{dpos}
\alias{dpos-package}
\title{MAT253 testing}
\description{
This is a test
}
\author{
Sebastian Kopf
}
|
#Read the files
NEI <- readRDS("./summarySCC_PM25.rds")
SCC <- readRDS("./Source_Classification_Code.rds")
#Subset the data appropriately
subset <- NEI[(NEI$fips=="24510"|NEI$fips=="06037") & NEI$type=="ON-ROAD", ]
#Load ggplot2 package
library(ggplot2)
#Specify global graphics parameter(here: the margins for th... | /plot6.R | no_license | devvarya/ExData_Plotting2 | R | false | false | 936 | r | #Read the files
NEI <- readRDS("./summarySCC_PM25.rds")
SCC <- readRDS("./Source_Classification_Code.rds")
#Subset the data appropriately
subset <- NEI[(NEI$fips=="24510"|NEI$fips=="06037") & NEI$type=="ON-ROAD", ]
#Load ggplot2 package
library(ggplot2)
#Specify global graphics parameter(here: the margins for th... |
#! /usr/bin/env Rscript
library(simcross)
library(plyr)
library(optparse)
source("simcross.R")
opts <- list( make_option( c("-n","--nruns"), type = "integer", default = 1,
help = "number of simulation runs" ),
make_option( c("-b","--batch"), type = "integer", default = 1,
help = "batch number ... | /sim.ail.R | no_license | andrewparkermorgan/r2d2-selfish-sweep | R | false | false | 906 | r | #! /usr/bin/env Rscript
library(simcross)
library(plyr)
library(optparse)
source("simcross.R")
opts <- list( make_option( c("-n","--nruns"), type = "integer", default = 1,
help = "number of simulation runs" ),
make_option( c("-b","--batch"), type = "integer", default = 1,
help = "batch number ... |
### LIBRARY CALL ###
library("rpart")
library("rpart.plot")
rm(corpus)
#######################################################################################################
### READING DATA. YOU HAVE TO CHANGE THIS TO WHERE YOUR DATA IS ###
#call the visualizatoin libraries
library(ggplot2)
library(GGa... | /Code.R | no_license | vani-2000/DATA_MINING_PROJECT | R | false | false | 10,415 | r |
### LIBRARY CALL ###
library("rpart")
library("rpart.plot")
rm(corpus)
#######################################################################################################
### READING DATA. YOU HAVE TO CHANGE THIS TO WHERE YOUR DATA IS ###
#call the visualizatoin libraries
library(ggplot2)
library(GGa... |
# converts an object to a character vector with strings.
# NAs are converted to ""
get_strings <- function(x) {
ret <- as.character(x)
ret[is.na(ret)] <- ""
return(ret)
}
# convert a univariate vector timeseries to a univariate matrix time series,
# with the specified column name
univec2unimat <- function(x, nam... | /pkg/R/utils.R | no_license | timemod/regts | R | false | false | 834 | r | # converts an object to a character vector with strings.
# NAs are converted to ""
get_strings <- function(x) {
ret <- as.character(x)
ret[is.na(ret)] <- ""
return(ret)
}
# convert a univariate vector timeseries to a univariate matrix time series,
# with the specified column name
univec2unimat <- function(x, nam... |
#install.packages("dplyr")
## Read feature data
features <- read.table("./data/UCI HAR Dataset/features.txt")
## Read test data
xtest <- read.table("./data/UCI HAR Dataset/test/X_test.txt",
col.names = features[,2])
ytest <- read.table("./data/UCI HAR Dataset/test/y_test.txt",
... | /run_analysis.R | no_license | ahmetyusufaydin/Getting_and_Cleaning_Assignment | R | false | false | 2,641 | r | #install.packages("dplyr")
## Read feature data
features <- read.table("./data/UCI HAR Dataset/features.txt")
## Read test data
xtest <- read.table("./data/UCI HAR Dataset/test/X_test.txt",
col.names = features[,2])
ytest <- read.table("./data/UCI HAR Dataset/test/y_test.txt",
... |
.Triplicate <- function(x) if (length(x) == 1) rep(x, 3) else x
.ValidateGridLines <- function(grid.lines) {
if (!is.integer(grid.lines)) {
ceiling(grid.lines)
} else {
grid.lines
}
}
.TrianglePlot <- function(atip, btip, ctip,
alab, blab, clab,
atip.p... | /R/dot-TrianglePlot.R | no_license | ms609/Ternary | R | false | false | 7,108 | r | .Triplicate <- function(x) if (length(x) == 1) rep(x, 3) else x
.ValidateGridLines <- function(grid.lines) {
if (!is.integer(grid.lines)) {
ceiling(grid.lines)
} else {
grid.lines
}
}
.TrianglePlot <- function(atip, btip, ctip,
alab, blab, clab,
atip.p... |
library(CRSSIO)
context('Check NF file trimming function.')
dir.create('tmp')
dir.create('tmp/trace1')
dir.create('tmp/trace2')
dir.create('tmp/trace3')
dir.create('tmp/trace4')
# delete the files that were created in the tests
on.exit(unlink('tmp',recursive = T))
p1 <- '..' # for automated tests
#p1 <- 'tests'
rr <-... | /tests/testthat/test_nfTrim.R | no_license | rabutler/CRSSIO | R | false | false | 3,713 | r | library(CRSSIO)
context('Check NF file trimming function.')
dir.create('tmp')
dir.create('tmp/trace1')
dir.create('tmp/trace2')
dir.create('tmp/trace3')
dir.create('tmp/trace4')
# delete the files that were created in the tests
on.exit(unlink('tmp',recursive = T))
p1 <- '..' # for automated tests
#p1 <- 'tests'
rr <-... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/asw_taxonomy_data.R
\docType{data}
\name{asw_taxonomy}
\alias{asw_taxonomy}
\title{Amphibian Species of the World Taxonomy}
\format{R dataset}
\usage{
asw_taxonomy
}
\description{
Data table generated using the getTaxonomy() function. The dat... | /man/asw_taxonomy.Rd | no_license | cran/defrostR | R | false | true | 860 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/asw_taxonomy_data.R
\docType{data}
\name{asw_taxonomy}
\alias{asw_taxonomy}
\title{Amphibian Species of the World Taxonomy}
\format{R dataset}
\usage{
asw_taxonomy
}
\description{
Data table generated using the getTaxonomy() function. The dat... |
#' @title Decompose standard deviation into individual factor contributions
#'
#' @description Compute the factor contributions to standard deviation (SD) of
#' assets' returns based on Euler's theorem, given the fitted factor model.
#'
#' @details The factor model for an asset's return at time \code{t} has the
#' ... | /R/fmSdDecomp.R | no_license | wenjian0721/FactorAnalytics | R | false | false | 8,417 | r | #' @title Decompose standard deviation into individual factor contributions
#'
#' @description Compute the factor contributions to standard deviation (SD) of
#' assets' returns based on Euler's theorem, given the fitted factor model.
#'
#' @details The factor model for an asset's return at time \code{t} has the
#' ... |
require(ggplot2)
library(ggplot2)
d <- data.frame(layers = c(0, 1, 2, 3, 4, 5),
acc_worst = c(13.5, 7.2, 9.3, 14.4, 26.0, 52.6),
acc_under = c(11.1, 6.8, 8.8, 13.6, 24.4, 49.7),
acc_okay = c(13.5, 3.8, 3.6, 5.8, 10.6, 19.8),
acc_cool = c(12.3, 3.3, 1.9, 1.... | /2015_acl_dan/figures/perturb_plots.r | no_license | Pinafore/publications | R | false | false | 870 | r | require(ggplot2)
library(ggplot2)
d <- data.frame(layers = c(0, 1, 2, 3, 4, 5),
acc_worst = c(13.5, 7.2, 9.3, 14.4, 26.0, 52.6),
acc_under = c(11.1, 6.8, 8.8, 13.6, 24.4, 49.7),
acc_okay = c(13.5, 3.8, 3.6, 5.8, 10.6, 19.8),
acc_cool = c(12.3, 3.3, 1.9, 1.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gs_ws.R
\name{gs_ws}
\alias{gs_ws}
\title{Retrieve a worksheet-describing list from a \code{googlesheet}}
\usage{
gs_ws(ss, ws, verbose = TRUE)
}
\arguments{
\item{ss}{a registered Google spreadsheet, i.e. a \code{\link{googlesheet}}
object}
... | /man/gs_ws.Rd | no_license | colinloftin-awhere/googlesheets | R | false | true | 662 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gs_ws.R
\name{gs_ws}
\alias{gs_ws}
\title{Retrieve a worksheet-describing list from a \code{googlesheet}}
\usage{
gs_ws(ss, ws, verbose = TRUE)
}
\arguments{
\item{ss}{a registered Google spreadsheet, i.e. a \code{\link{googlesheet}}
object}
... |
# Since Nick took over
library(tidyverse)
library(brolgar)
lwage <- longnostic_all(wages, id = id, var = lnw, formula = lnw~exper)
lwage <- lwage %>% filter(l_n_obs > 2)
library(tourr)
quartz()
animate_xy(lwage[,-1], axes="bottomleft")
# Old code
library(gghighlight)
data(wages)
sl <- l_slope(wages, "id", "lnw~expe... | /inst/examples/test.R | permissive | kant/brolgar | R | false | false | 4,750 | r | # Since Nick took over
library(tidyverse)
library(brolgar)
lwage <- longnostic_all(wages, id = id, var = lnw, formula = lnw~exper)
lwage <- lwage %>% filter(l_n_obs > 2)
library(tourr)
quartz()
animate_xy(lwage[,-1], axes="bottomleft")
# Old code
library(gghighlight)
data(wages)
sl <- l_slope(wages, "id", "lnw~expe... |
#Linear Regression Model
housing <- read.csv("housing.csv")
View(housing)
# datadictonary
# price represents the sale price of a house in Rs.
# area gives the total size of a property in square feet
# bedrooms represents the number of bedrooms
# bathrooms shows the number of bathrooms
# stories variable s... | /housing.R | no_license | shankhadeep-ghosal/Housing_Price_Prediction_Multiple_Linear_Regression | R | false | false | 7,593 | r | #Linear Regression Model
housing <- read.csv("housing.csv")
View(housing)
# datadictonary
# price represents the sale price of a house in Rs.
# area gives the total size of a property in square feet
# bedrooms represents the number of bedrooms
# bathrooms shows the number of bathrooms
# stories variable s... |
require(ggplot2) ##load ggplot2
##Checks if the variable has already been created
if(!exists("NEI")){
NEI <- readRDS("summarySCC_PM25.rds")
}
if(!exists("SCC")){
SCC <- readRDS("Source Classification Code.rds")
}
SCC_Class <- SCC[4] #lists all the values in SCC
SCC_Levels <- levels(SCC_Class$EI.Se... | /plot5.R | no_license | christophermichaelharris/EDA_Project2 | R | false | false | 1,652 | r | require(ggplot2) ##load ggplot2
##Checks if the variable has already been created
if(!exists("NEI")){
NEI <- readRDS("summarySCC_PM25.rds")
}
if(!exists("SCC")){
SCC <- readRDS("Source Classification Code.rds")
}
SCC_Class <- SCC[4] #lists all the values in SCC
SCC_Levels <- levels(SCC_Class$EI.Se... |
library(data.table)
library(dplyr)
# read Human PPI from i2d database
i2d.db = read.delim("./data/external/i2d.2_9.Public.HUMAN.tab", header = TRUE, sep = "\t")
# length(unique(i2d.db$SwissProt2))
# [1] 17394
# length(unique(i2d.db$SwissProt1))
# [1] 14939
# read target protein lists for each Drugbank drugs
uni.db = ... | /update_databases/target_PPI.R | no_license | Akmazad/DrugSimDB | R | false | false | 662 | r | library(data.table)
library(dplyr)
# read Human PPI from i2d database
i2d.db = read.delim("./data/external/i2d.2_9.Public.HUMAN.tab", header = TRUE, sep = "\t")
# length(unique(i2d.db$SwissProt2))
# [1] 17394
# length(unique(i2d.db$SwissProt1))
# [1] 14939
# read target protein lists for each Drugbank drugs
uni.db = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.