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 |
|---|---|---|---|---|---|---|---|---|---|
/CodeHouse/开发版N天累计统计.R | no_license | pengjie0/Xiaomi | R | false | false | 2,247 | r | ||
rankall <- function(outcome, num = "best") {
## Read outcome data
## Check that state and outcome are valid
## For each state, find the hospital of the given rank
## Return a data frame with the hospital names and the
## (abbreviated) state name
#read in the desired data
data <- read.csv("o... | /rankall.r | no_license | AsherDDmello/R_Prog_coursera_Assignment3 | R | false | false | 2,439 | r | rankall <- function(outcome, num = "best") {
## Read outcome data
## Check that state and outcome are valid
## For each state, find the hospital of the given rank
## Return a data frame with the hospital names and the
## (abbreviated) state name
#read in the desired data
data <- read.csv("o... |
#Setup Environment
source("~/edu/mpg-envinsys-plygrnd/mpg-envinfosys-teams-2018-rs_18_axmideda/src/000_env_setup.R")
##Read in Data
#Shapefile
shp <- readOGR(dsn=paste0(envrmt$path_data_data_mo,"/uwcWaldorte_AOI.shp"), layer = "uwcWaldorte_AOI")
#List of aerial images (.tif)
listImages <- list.files(envrmt$path_data_... | /src/001_clip_aerial.R | no_license | goergen95/mof_caldern | R | false | false | 1,865 | r | #Setup Environment
source("~/edu/mpg-envinsys-plygrnd/mpg-envinfosys-teams-2018-rs_18_axmideda/src/000_env_setup.R")
##Read in Data
#Shapefile
shp <- readOGR(dsn=paste0(envrmt$path_data_data_mo,"/uwcWaldorte_AOI.shp"), layer = "uwcWaldorte_AOI")
#List of aerial images (.tif)
listImages <- list.files(envrmt$path_data_... |
# set working directory as appropriate
# use install.packages(c("readr", "plyr", "dplyr", "reshape2", "ggplot2", "stringr", "ggrepel", "devtools", "ggmap", "compstatr"))
# to install the necessary packages
# load the packages
library(readr)
library(plyr)
suppressPackageStartupMessages(library(dplyr))
library(... | /GP_Script_v2.R | no_license | bmwepkin/Group-6 | R | false | false | 29,349 | r | # set working directory as appropriate
# use install.packages(c("readr", "plyr", "dplyr", "reshape2", "ggplot2", "stringr", "ggrepel", "devtools", "ggmap", "compstatr"))
# to install the necessary packages
# load the packages
library(readr)
library(plyr)
suppressPackageStartupMessages(library(dplyr))
library(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/monitoring.R
\name{filterMoniData}
\alias{filterMoniData}
\title{Helper function: filter monitoring data}
\usage{
filterMoniData(locations = NULL, locationsCol = "moniLocation",
paras = NULL, paraCol = "moniParName", minDate = "2009-... | /man/filterMoniData.Rd | permissive | KWB-R/kwb.demeau | R | false | true | 751 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/monitoring.R
\name{filterMoniData}
\alias{filterMoniData}
\title{Helper function: filter monitoring data}
\usage{
filterMoniData(locations = NULL, locationsCol = "moniLocation",
paras = NULL, paraCol = "moniParName", minDate = "2009-... |
context("Topic name")
roc <- rd_roclet()
test_that("name captured from assignment", {
out <- roc_proc_text(roc, "
#' Title.
a <- function() {} ")[[1]]
expect_equal(get_tag(out, "name")$values, "a")
expect_equal(get_tag(out, "alias")$values, "a")
expect_equal(get_tag(out, "title")$values, "Title.")
}... | /inst/tests/test-topic-name.R | no_license | rbarraud/roxygen | R | false | false | 2,430 | r | context("Topic name")
roc <- rd_roclet()
test_that("name captured from assignment", {
out <- roc_proc_text(roc, "
#' Title.
a <- function() {} ")[[1]]
expect_equal(get_tag(out, "name")$values, "a")
expect_equal(get_tag(out, "alias")$values, "a")
expect_equal(get_tag(out, "title")$values, "Title.")
}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotlib.R
\name{ggbiplot}
\alias{ggbiplot}
\title{Draw \code{biplot} using \code{ggplot2}.}
\usage{
ggbiplot(plot.data, loadings.data = NULL, colour = NULL, size = NULL,
linetype = NULL, alpha = NULL, fill = NULL, shape = NULL,
label = FA... | /man/ggbiplot.Rd | no_license | guhjy/ggfortify | R | false | true | 3,877 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotlib.R
\name{ggbiplot}
\alias{ggbiplot}
\title{Draw \code{biplot} using \code{ggplot2}.}
\usage{
ggbiplot(plot.data, loadings.data = NULL, colour = NULL, size = NULL,
linetype = NULL, alpha = NULL, fill = NULL, shape = NULL,
label = FA... |
### --------------------------------------------------------------
### AUTOMATED DATA COLLECTION WITH R
### SIMON MUNZERT, CHRISTIAN RUBBA, PETER MEISSNER, DOMINIC NYHUIS
###
### CODE CHAPTER 3: XML AND JSON
### --------------------------------------------------------------
# load packages
library(RJSONIO)
library(str... | /r_scraping/materials/ch-3-xml/ch-3-json.r | no_license | wangzhefeng/DataSpider | R | false | false | 2,471 | r | ### --------------------------------------------------------------
### AUTOMATED DATA COLLECTION WITH R
### SIMON MUNZERT, CHRISTIAN RUBBA, PETER MEISSNER, DOMINIC NYHUIS
###
### CODE CHAPTER 3: XML AND JSON
### --------------------------------------------------------------
# load packages
library(RJSONIO)
library(str... |
/서울시응답소페이지_useNIADic이용.R | no_license | i-am-chan/2019_2_BigData | R | false | false | 978 | r | ||
#' hTest
#'
#' hTest provides some basic hypothesis statistical tests, and can detect which test method should be used based on the variable
#' modes and distribution of continuous variables.
#'
#' when there are multiple variables both in xvars and yvars params, hTest performs statistical tests on each x and y.
#'
#... | /R/hTest.R | permissive | sontron/madis | R | false | false | 8,682 | r | #' hTest
#'
#' hTest provides some basic hypothesis statistical tests, and can detect which test method should be used based on the variable
#' modes and distribution of continuous variables.
#'
#' when there are multiple variables both in xvars and yvars params, hTest performs statistical tests on each x and y.
#'
#... |
# File R/robust.inverse.R in package ergm, part of the Statnet suite
# of packages for network analysis, http://statnet.org .
#
# This software is distributed under the GPL-3 license. It is free,
# open source, and has the attribution requirements (GPL Section 7) at
# http://statnet.org/attribution
#
# Copyright... | /R/robust.inverse.R | no_license | ifellows/RDS | R | false | false | 2,239 | r | # File R/robust.inverse.R in package ergm, part of the Statnet suite
# of packages for network analysis, http://statnet.org .
#
# This software is distributed under the GPL-3 license. It is free,
# open source, and has the attribution requirements (GPL Section 7) at
# http://statnet.org/attribution
#
# Copyright... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_vignetteVII-data.R
\docType{data}
\name{data_vignetteVII data set}
\alias{data_vignetteVII data set}
\alias{data_vignetteVII}
\title{Output of the vignette \code{VII_Retro-Modelling}}
\format{
An object of class \code{list} of length 29.... | /man/data_vignetteVII-data-set.Rd | no_license | cran/GPoM | R | false | true | 565 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_vignetteVII-data.R
\docType{data}
\name{data_vignetteVII data set}
\alias{data_vignetteVII data set}
\alias{data_vignetteVII}
\title{Output of the vignette \code{VII_Retro-Modelling}}
\format{
An object of class \code{list} of length 29.... |
down_sector = read.csv('data/krx_sector.csv', row.names = 1,
stringAsFactors = FALSE)
down_ind = read.csv('data/krx_ind.csv', row.names = 1,
stringsAsFactors = FALSE)
# 두 데이터 간 중복되는 열 이름 찾기
intersect(names(down_sector), names(down_ind))
# 두 데이터에 공통적으로 없는 데이터 찾기
setdiff(down_... | /5-1-4 거래소 데이터 정리하기.R | permissive | munifico/quant-portfolio | R | false | false | 1,265 | r | down_sector = read.csv('data/krx_sector.csv', row.names = 1,
stringAsFactors = FALSE)
down_ind = read.csv('data/krx_ind.csv', row.names = 1,
stringsAsFactors = FALSE)
# 두 데이터 간 중복되는 열 이름 찾기
intersect(names(down_sector), names(down_ind))
# 두 데이터에 공통적으로 없는 데이터 찾기
setdiff(down_... |
#LMA relation to leaf anatomy (leaf thickness and mesophyllthickness)
#gmes and leaf internal anatomy
# source("C:/R-projects/EucFACE_gmes/masterscripts/functions.R")
source("masterscripts/functions.R")
# read and format data ----------------------------------------------------
#data <-read.csv("C:/R-projects/EucFACE... | /masterscripts/lma_anatomy_figure4.R | no_license | CourtneyCampany/EucFACE_gmes | R | false | false | 4,990 | r | #LMA relation to leaf anatomy (leaf thickness and mesophyllthickness)
#gmes and leaf internal anatomy
# source("C:/R-projects/EucFACE_gmes/masterscripts/functions.R")
source("masterscripts/functions.R")
# read and format data ----------------------------------------------------
#data <-read.csv("C:/R-projects/EucFACE... |
# global variables added so there are no notes in R CMD check
if(getRversion() >= "2.15.1"){
# gloabl variables from pd_get_station_md()
gv <- c("ELEV(m)", "elevation", "Elevation(m)", "ID", "LAT", "latitude",
"Latitude", "LON", "longitude", "Longitude", "name", "Name", "NAME",
"network",... | /R/global_variables.R | no_license | cran/prism | R | false | false | 445 | r | # global variables added so there are no notes in R CMD check
if(getRversion() >= "2.15.1"){
# gloabl variables from pd_get_station_md()
gv <- c("ELEV(m)", "elevation", "Elevation(m)", "ID", "LAT", "latitude",
"Latitude", "LON", "longitude", "Longitude", "name", "Name", "NAME",
"network",... |
# sclb - terminal-independent screen control package
# Ver Date Who Remarks
# --- ------- --- ------------------------------------------------------
# 04s 31Jan85 cal .Fixed bell sequence in built in dumb capabilities code.
# 04r 12Oct84 cal .Added sclinit() to allow use of sclb when terminal
# ... | /SCLB.R | no_license | jontrulson/conquest-original-vax-vms-ratfor | R | false | false | 60,977 | r | # sclb - terminal-independent screen control package
# Ver Date Who Remarks
# --- ------- --- ------------------------------------------------------
# 04s 31Jan85 cal .Fixed bell sequence in built in dumb capabilities code.
# 04r 12Oct84 cal .Added sclinit() to allow use of sclb when terminal
# ... |
setwd(UCI HAR Dataset)
#Read in all the data
features <- read.table("features.txt",header=TRUE)
colnames(features) <- c('ind','features')
activities <- read.table('activity_labels.txt')
test.subject <- read.table('test/subject_test.txt')
test.x <- read.table('test/X_test.txt')
test.y <- read.table('test/y_... | /run_analysis.R | no_license | Kdunn16/GetData | R | false | false | 2,353 | r | setwd(UCI HAR Dataset)
#Read in all the data
features <- read.table("features.txt",header=TRUE)
colnames(features) <- c('ind','features')
activities <- read.table('activity_labels.txt')
test.subject <- read.table('test/subject_test.txt')
test.x <- read.table('test/X_test.txt')
test.y <- read.table('test/y_... |
\name{print.kfhead}
\alias{print.kfhead}
\title{Print a kfhead object}
\description{
Prints the header information from the \code{kftrack.dat} file.
}
\usage{
print.kfhead(x, ...)
}
\arguments{
\item{x}{is an \code{kfhead} object}
\item{\dots}{additional arguments}
}
\author{John Sibert \email{jsibert@soest.ha... | /kftrack/man/print.kfhead.Rd | no_license | positioning/kalmanfilter | R | false | false | 436 | rd | \name{print.kfhead}
\alias{print.kfhead}
\title{Print a kfhead object}
\description{
Prints the header information from the \code{kftrack.dat} file.
}
\usage{
print.kfhead(x, ...)
}
\arguments{
\item{x}{is an \code{kfhead} object}
\item{\dots}{additional arguments}
}
\author{John Sibert \email{jsibert@soest.ha... |
load_config <- function(project_dir) {
#' read yaml files from a specified project directory
#' the directory should be located in /runs
#'
#' @param project_dir directory name within folder "runs"
#'
#' @return yaml_list: list of attributes of different runs
# create lists
file_list <- list.file... | /runs/helpers.R | permissive | digitalemuendigkeit/abmodelr | R | false | false | 7,690 | r | load_config <- function(project_dir) {
#' read yaml files from a specified project directory
#' the directory should be located in /runs
#'
#' @param project_dir directory name within folder "runs"
#'
#' @return yaml_list: list of attributes of different runs
# create lists
file_list <- list.file... |
library(sn) # sampling from the skew-normal distribution is accomplished via the 'sn' package in R
library(e1071) # needed to calculate sample skewness
###Global Declarations###
sn_mean <- 68
sn_stdev <- 12.5
sn_skew <- -0.5
cp <- c(mean=sn_mean, s.d.=sn_stdev, gamma1=sn_skew)
dp <- cp2dp(cp, family="SN") # the c... | /Bayes_Full_Changing_Mu_Sig_Gamma.R | no_license | heidyzs/MathResearch | R | false | false | 11,694 | r | library(sn) # sampling from the skew-normal distribution is accomplished via the 'sn' package in R
library(e1071) # needed to calculate sample skewness
###Global Declarations###
sn_mean <- 68
sn_stdev <- 12.5
sn_skew <- -0.5
cp <- c(mean=sn_mean, s.d.=sn_stdev, gamma1=sn_skew)
dp <- cp2dp(cp, family="SN") # the c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{fars_read_years}
\alias{fars_read_years}
\title{Print "fars_read_years"}
\usage{
fars_read_years(years)
}
\arguments{
\item{years}{A int vector with years contained in the file name}
}
\value{
This function returns a li... | /man/fars_read_years.Rd | no_license | rumorale/Fars | R | false | true | 577 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{fars_read_years}
\alias{fars_read_years}
\title{Print "fars_read_years"}
\usage{
fars_read_years(years)
}
\arguments{
\item{years}{A int vector with years contained in the file name}
}
\value{
This function returns a li... |
#Author:MK
#Title : Coursera R Programming Assignment 2
#Sub Tite: Caching Inverse of a Matrix
#Date : 18/03/2016
#Version: V1.0
#Purpose
# Program wriitten to return a matrix with functions to get/set value & get/set inverse
#makeCacheMatrix: This function creates a special "matrix" object that can cache its inve... | /cachematrix.R | no_license | melvinkurian/ProgrammingAssignment2 | R | false | false | 1,108 | r | #Author:MK
#Title : Coursera R Programming Assignment 2
#Sub Tite: Caching Inverse of a Matrix
#Date : 18/03/2016
#Version: V1.0
#Purpose
# Program wriitten to return a matrix with functions to get/set value & get/set inverse
#makeCacheMatrix: This function creates a special "matrix" object that can cache its inve... |
dir_check <- function() {
if (!dir.exists("plots")) {
dir.create("plots")
}
if (!dir.exists("plots/term_frequency")) {
dir.create("plots/term_frequency")
}
if (!dir.exists("plots/tf_idf")) {
dir.create("plots/tf_idf")
}
if (!dir.exists("plots/pos")) {
dir.create("plots/pos")
... | /analysis.R | permissive | kevin931/JaneEyre | R | false | false | 6,710 | r | dir_check <- function() {
if (!dir.exists("plots")) {
dir.create("plots")
}
if (!dir.exists("plots/term_frequency")) {
dir.create("plots/term_frequency")
}
if (!dir.exists("plots/tf_idf")) {
dir.create("plots/tf_idf")
}
if (!dir.exists("plots/pos")) {
dir.create("plots/pos")
... |
# setwd("D:\\USFCA\\6_Spring_Moduel_II\\622_Visualization\\HAG\\2due0403j")
library(ggplot2)
library(shiny)
library(scales)
# Objects defined outside of shinyServer() are visible to
# all sessions. Objects defined instead of shinyServer()
# are created per session. Place large shared data outside
# and modify (filter/s... | /homework2/server.R | no_license | excelsky/msan622 | R | false | false | 7,692 | r | # setwd("D:\\USFCA\\6_Spring_Moduel_II\\622_Visualization\\HAG\\2due0403j")
library(ggplot2)
library(shiny)
library(scales)
# Objects defined outside of shinyServer() are visible to
# all sessions. Objects defined instead of shinyServer()
# are created per session. Place large shared data outside
# and modify (filter/s... |
#' Pick points in geomorph scatterplots to visualize shape variation
#'
#' Function plots the shape corresponding to a clicked point in the area of a geomorph plot
#'
#' THIS FUNCTION IS A BIT EXPERIMENTAL!
#'
#' This function recycles plots generated by \code{\link{plot.gm.prcomp}}, \code{\link{plot.procD.lm}},
#... | /R/picknplot.shape.r | no_license | geomorphR/geomorph | R | false | false | 11,215 | r | #' Pick points in geomorph scatterplots to visualize shape variation
#'
#' Function plots the shape corresponding to a clicked point in the area of a geomorph plot
#'
#' THIS FUNCTION IS A BIT EXPERIMENTAL!
#'
#' This function recycles plots generated by \code{\link{plot.gm.prcomp}}, \code{\link{plot.procD.lm}},
#... |
#/usr/bin/env Rscript
# nathan dot lazar at gmail dot com
# Usage: BaTFLED3D_binary_run.R <mode1 data> <mode2 data> <mode3 data>
# <response>
# <mode1 fold matrix>
# <mode2 fold matrix>
# <mode3 fold matrix>
# ... | /not_in_pkg/BaTFLED3D_binary_run.R | permissive | singletrips/BaTFLED3D | R | false | false | 44,538 | r | #/usr/bin/env Rscript
# nathan dot lazar at gmail dot com
# Usage: BaTFLED3D_binary_run.R <mode1 data> <mode2 data> <mode3 data>
# <response>
# <mode1 fold matrix>
# <mode2 fold matrix>
# <mode3 fold matrix>
# ... |
sigma_z <- 1
h2_ps <- 0.02
h_ps <- sqrt(h2_ps)
k <- 0.15 # prevalence
N <- seq(1, 20, 1) # enough to show first few
gain <- numeric(length = length(N))
q_exclude <- 0.5 # 0.1 is decile
gamma <- qnorm(q_exclude, 0, h_ps) # threshold for exclusion. Doesn't have to be the same k
# Used inside integral of f_x_ma... | /code/R/disease/decile_limit_integration.R | no_license | orzuk/EmbryoSelectionCalculator | R | false | false | 2,378 | r | sigma_z <- 1
h2_ps <- 0.02
h_ps <- sqrt(h2_ps)
k <- 0.15 # prevalence
N <- seq(1, 20, 1) # enough to show first few
gain <- numeric(length = length(N))
q_exclude <- 0.5 # 0.1 is decile
gamma <- qnorm(q_exclude, 0, h_ps) # threshold for exclusion. Doesn't have to be the same k
# Used inside integral of f_x_ma... |
#################################################################################
# Manuscript: Clinical and Molecular Characteristics of ER-Positive Ultralow Risk
# Breast Cancer Tumors Identified by the 70-Gene Signature
# Author: Annelie Johansson & Nancy Yu -- modified code from Nick Tobin
# Modified las... | /Code/create_gene_modules_scores.R | no_license | annelieewa/Ultralow_risk_STO3 | R | false | false | 6,970 | r | #################################################################################
# Manuscript: Clinical and Molecular Characteristics of ER-Positive Ultralow Risk
# Breast Cancer Tumors Identified by the 70-Gene Signature
# Author: Annelie Johansson & Nancy Yu -- modified code from Nick Tobin
# Modified las... |
# This file is part of the standard setup for testthat.
# It is recommended that you do not modify it.
#
# Where should you do additional test configuration?
# Learn more about the roles of various files in:
# * https://r-pkgs.org/tests.html
# * https://testthat.r-lib.org/reference/test_package.html#special-files
libr... | /tests/testthat.R | no_license | ashleych/OLSModelSelector | R | false | false | 378 | r | # This file is part of the standard setup for testthat.
# It is recommended that you do not modify it.
#
# Where should you do additional test configuration?
# Learn more about the roles of various files in:
# * https://r-pkgs.org/tests.html
# * https://testthat.r-lib.org/reference/test_package.html#special-files
libr... |
#' @title Transform Data into Row-Column-Value Format
#' @description Transform raw Eurostat data table into the row-column-value
#' format (RCV).
#' @param dat a data_frame from \code{\link{get_eurostat_raw}}.
#' @param time_format a string giving a type of the conversion of the
#' time column from ... | /R/tidy_eurostat.R | permissive | jhuovari/eurostat | R | false | false | 5,069 | r | #' @title Transform Data into Row-Column-Value Format
#' @description Transform raw Eurostat data table into the row-column-value
#' format (RCV).
#' @param dat a data_frame from \code{\link{get_eurostat_raw}}.
#' @param time_format a string giving a type of the conversion of the
#' time column from ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{fars_read}
\alias{fars_read}
\title{Reads data from a file and returns a tibble dataframe}
\usage{
fars_read(filename)
}
\arguments{
\item{filename}{path to the input csv data file, as a character string.}
}
\value{
A t... | /man/fars_read.Rd | no_license | Roger-Li/farsPackage | R | false | true | 999 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{fars_read}
\alias{fars_read}
\title{Reads data from a file and returns a tibble dataframe}
\usage{
fars_read(filename)
}
\arguments{
\item{filename}{path to the input csv data file, as a character string.}
}
\value{
A t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loglike.R
\name{logLik.ddhazard}
\alias{logLik.ddhazard}
\title{Log Likelihood of Mean Path of ddhazard Object}
\usage{
\method{logLik}{ddhazard}(object, data = NULL, id, ...)
}
\arguments{
\item{object}{an object of class \code{ddhazard}.}
... | /dynamichazard/man/logLik.ddhazard.Rd | no_license | akhikolla/TestedPackages-NoIssues | R | false | true | 1,015 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loglike.R
\name{logLik.ddhazard}
\alias{logLik.ddhazard}
\title{Log Likelihood of Mean Path of ddhazard Object}
\usage{
\method{logLik}{ddhazard}(object, data = NULL, id, ...)
}
\arguments{
\item{object}{an object of class \code{ddhazard}.}
... |
testlist <- list(a = -163L, b = 0L, x = c(-1751672937L, NA, -1751672937L, -1751672937L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610131848-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 150 | r | testlist <- list(a = -163L, b = 0L, x = c(-1751672937L, NA, -1751672937L, -1751672937L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
library(rvest)
library(httr)
library(tidyverse)
options(stringsAsFactors = F)
httr::set_config(httr::config(http_version = 0))
# MBP:113*20
# Macbook Pro:1148*20
# MBA:31
# Macbook Air:1148*20
# MAC:2375
# iphone:9625*20
# ipad:3418*20
# Mac Air:19
# environment
getwd()
wd_path <- "/Users/Andy 1/Google 雲端硬碟 (r083230... | /1_data_scraping/20201221-DataScience_PTT_Macshop_v2.R | no_license | a0981906660/PTT_Macshop | R | false | false | 3,053 | r | library(rvest)
library(httr)
library(tidyverse)
options(stringsAsFactors = F)
httr::set_config(httr::config(http_version = 0))
# MBP:113*20
# Macbook Pro:1148*20
# MBA:31
# Macbook Air:1148*20
# MAC:2375
# iphone:9625*20
# ipad:3418*20
# Mac Air:19
# environment
getwd()
wd_path <- "/Users/Andy 1/Google 雲端硬碟 (r083230... |
ggheatmap.example = function() {
mydata <- mtcars[, c(1,3,4,5,6,7)]
head(mydata)
cormat <- round(cor(mydata),2)
head(cormat)
library(reshape2)
melted_cormat <- melt(cormat)
head(melted_cormat)
library(ggplot2)
print(
ggplot(data = melted_cormat, aes(x=Var1, y=Var2, fill=value)) +
geom_tile()
)
# Get lower triangle... | /libplot/R/ggheatmap.example.R | no_license | bereginyas/rlib | R | false | false | 2,471 | r | ggheatmap.example = function() {
mydata <- mtcars[, c(1,3,4,5,6,7)]
head(mydata)
cormat <- round(cor(mydata),2)
head(cormat)
library(reshape2)
melted_cormat <- melt(cormat)
head(melted_cormat)
library(ggplot2)
print(
ggplot(data = melted_cormat, aes(x=Var1, y=Var2, fill=value)) +
geom_tile()
)
# Get lower triangle... |
# Repartiția chi-squared
chisquare <- function(){
cat("Repartiția chi-squared\nDEFINIȚIE: Spunem că variabila aleatoare X are o distribuție χ^2 (Chi-squared) cu n ∈ N grade de
libertate dacă are densitatea: \n
|cx^(n/2 - 1)e(-x/2), x >= 0
f(x) = |
| 0, în rest \n
unde c = 1/(2^(n/2)Γ(n/2)... | /miiv/R/Repartitii/rep_chisq.R | permissive | VMadalina/miiv-package | R | false | false | 809 | r | # Repartiția chi-squared
chisquare <- function(){
cat("Repartiția chi-squared\nDEFINIȚIE: Spunem că variabila aleatoare X are o distribuție χ^2 (Chi-squared) cu n ∈ N grade de
libertate dacă are densitatea: \n
|cx^(n/2 - 1)e(-x/2), x >= 0
f(x) = |
| 0, în rest \n
unde c = 1/(2^(n/2)Γ(n/2)... |
context("testing divisorsBig")
test_that("divisorsBig generates correct numbers", {
options(scipen = 999)
expect_equal(length(divisorsBig(1:100)), 100)
expect_equal(divisorsBig(2), c(1, 2))
expect_equal(divisorsBig(1), 1)
expect_equal(divisorsBig(-10), c(-10, -5, -2, -1, 1, 2, 5, 10))
expect_eq... | /fuzzedpackages/RcppBigIntAlgos/tests/testthat/testDivisorsBig.R | no_license | akhikolla/testpackages | R | false | false | 2,609 | r | context("testing divisorsBig")
test_that("divisorsBig generates correct numbers", {
options(scipen = 999)
expect_equal(length(divisorsBig(1:100)), 100)
expect_equal(divisorsBig(2), c(1, 2))
expect_equal(divisorsBig(1), 1)
expect_equal(divisorsBig(-10), c(-10, -5, -2, -1, 1, 2, 5, 10))
expect_eq... |
#' Iteratively forecast using a BSTS model
#'
#' @param min_points Numeric, defaults to 3. The minimum number of time points at which to begin
#' iteratively evaluating the forecast.
#' @return
#' @export
#' @inheritParams forecast_rt
#'
#' @importFrom purrr map_dfr safely
#' @importFrom dplyr filter
#' @examples
#'
#'... | /R/iterative_rt_forecast.R | permissive | medewitt/EpiSoon | R | false | false | 1,641 | r | #' Iteratively forecast using a BSTS model
#'
#' @param min_points Numeric, defaults to 3. The minimum number of time points at which to begin
#' iteratively evaluating the forecast.
#' @return
#' @export
#' @inheritParams forecast_rt
#'
#' @importFrom purrr map_dfr safely
#' @importFrom dplyr filter
#' @examples
#'
#'... |
leverage = function(xt,X){
# leverage at point xt for data X (explanatory variables)
# MSE*leverage = Variance for reggression function at xt.
# xt is an argument of yhat(xt) -- the regression function
# X = [ 1 x ] -- design matrix (with 1's) ie.
# X = model.matrix(model).
# If one of the expl.variable is factor then... | /old/leverage.r | no_license | RCanDo/RPacks | R | false | false | 2,075 | r | leverage = function(xt,X){
# leverage at point xt for data X (explanatory variables)
# MSE*leverage = Variance for reggression function at xt.
# xt is an argument of yhat(xt) -- the regression function
# X = [ 1 x ] -- design matrix (with 1's) ie.
# X = model.matrix(model).
# If one of the expl.variable is factor then... |
library(plotly)
library(markdown)
library(shiny)
library(shinydashboard)
library(shinyjs)
tags$style(type="text/css",
".shiny-output-error { visibility: hidden; }",
".shiny-output-error:before { visibility: hidden; }"
)
navbarPage("AUTO-CRISP",
tabPanel("Welcome",
... | /ui.R | permissive | marcospruit/AutoCrisp | R | false | false | 54,692 | r | library(plotly)
library(markdown)
library(shiny)
library(shinydashboard)
library(shinyjs)
tags$style(type="text/css",
".shiny-output-error { visibility: hidden; }",
".shiny-output-error:before { visibility: hidden; }"
)
navbarPage("AUTO-CRISP",
tabPanel("Welcome",
... |
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=
# Article:
# Integrative meta-analysis of epigenome-wide association studies
# identifies genomic and
# epigenomics differences in the brain and the blood in Alzheimer’s disease
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-... | /code/TWAS_pathway_analysis/go_brain_vs_blood_permutation.R | no_license | TransBioInfoLab/AD-meta-analysis-blood | R | false | false | 7,630 | r | #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=
# Article:
# Integrative meta-analysis of epigenome-wide association studies
# identifies genomic and
# epigenomics differences in the brain and the blood in Alzheimer’s disease
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-... |
## Uses relaxed priors
## Daniel should refactor and stop spawning pseudo-copies
library(dplyr)
library(outbreaks)
library(rstan)
ll <- mers_korea_2015$linelist
d0 <- as.numeric(min(ll$dt_start_exp, na.rm=TRUE))
d1 <- 23
## This assumes that the first person infected is most likely infector
cc <- mers_korea_2015$co... | /analysis/mers_analysis_full_relax.R | no_license | parksw3/latentGeneration | R | false | false | 1,959 | r | ## Uses relaxed priors
## Daniel should refactor and stop spawning pseudo-copies
library(dplyr)
library(outbreaks)
library(rstan)
ll <- mers_korea_2015$linelist
d0 <- as.numeric(min(ll$dt_start_exp, na.rm=TRUE))
d1 <- 23
## This assumes that the first person infected is most likely infector
cc <- mers_korea_2015$co... |
with(a31cc840e8367400ba8c144ef2a4249ee, {ROOT <- 'D:/ATS2.0/SEMOSS/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/1c4fa71c-191c-4da9-8102-b247ffddc5d3';options(digits.secs=NULL);FRAME481253[,(c('DATA_COLLECTION_TIME')) := lapply(.SD, function(x) as.POSIXct(fast_strptime(x, format... | /1c4fa71c-191c-4da9-8102-b247ffddc5d3/R/Temp/afMDyihyLrjYq.R | no_license | ayanmanna8/test | R | false | false | 384 | r | with(a31cc840e8367400ba8c144ef2a4249ee, {ROOT <- 'D:/ATS2.0/SEMOSS/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/1c4fa71c-191c-4da9-8102-b247ffddc5d3';options(digits.secs=NULL);FRAME481253[,(c('DATA_COLLECTION_TIME')) := lapply(.SD, function(x) as.POSIXct(fast_strptime(x, format... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metaboliteqc.R
\name{each_sample}
\alias{each_sample}
\title{Apply function to every sample}
\usage{
each_sample(mat, f, ...)
}
\arguments{
\item{mat}{Matrix with samples as columns and metabolites as rows}
\item{f}{Function to apply to samp... | /man/each_sample.Rd | no_license | alenzhao/metaboliteqc | R | false | true | 769 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metaboliteqc.R
\name{each_sample}
\alias{each_sample}
\title{Apply function to every sample}
\usage{
each_sample(mat, f, ...)
}
\arguments{
\item{mat}{Matrix with samples as columns and metabolites as rows}
\item{f}{Function to apply to samp... |
# © Gabriel Pigeon
# Version 1 date: 2017-07-14
# Script for functions used in the analysis
# source()
library(parallel)
#############################################################################.
# function to calculate CV
CV <- function(x, na.rm){
ave<-mean(x, na.rm=na.rm)
dev<-sd(x, na.rm=na.rm)
... | /R/myfunc1.R | no_license | GabrielPigeon/GeneticEWS | R | false | false | 5,809 | r | # © Gabriel Pigeon
# Version 1 date: 2017-07-14
# Script for functions used in the analysis
# source()
library(parallel)
#############################################################################.
# function to calculate CV
CV <- function(x, na.rm){
ave<-mean(x, na.rm=na.rm)
dev<-sd(x, na.rm=na.rm)
... |
library(gethr)
### Name: eth_blockNumber
### Title: Current block number.
### Aliases: eth_blockNumber
### ** Examples
## No test:
eth_blockNumber()
## End(No test)
| /data/genthat_extracted_code/gethr/examples/eth_blockNumber.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 174 | r | library(gethr)
### Name: eth_blockNumber
### Title: Current block number.
### Aliases: eth_blockNumber
### ** Examples
## No test:
eth_blockNumber()
## End(No test)
|
timestamp <- Sys.time()
library(caret)
model <- "sbf_nb"
#########################################################################
set.seed(2)
training_class <- twoClassSim(50)
testing_class <- twoClassSim(500)
trainX_class <- training_class[, -ncol(training_class)]
trainY_class <- training_class$Class
testX_class ... | /RegressionTests/Code/sbf_nb.R | no_license | JackStat/caret | R | false | false | 2,096 | r | timestamp <- Sys.time()
library(caret)
model <- "sbf_nb"
#########################################################################
set.seed(2)
training_class <- twoClassSim(50)
testing_class <- twoClassSim(500)
trainX_class <- training_class[, -ncol(training_class)]
trainY_class <- training_class$Class
testX_class ... |
library(dplyr)
rm(list = ls())
setwd("~/Downloads/Arpit Study /Spring 19 Classes/Practicum/Data Folder/Final")
# Reading the file for Dallas Geoids
dallas_geoids <- read_csv("Dallas_geoids.csv", col_types = cols(geoid = col_character()))
tx_wac_SE01 <- read_csv("tx_wac_SE01_JT00_2015.csv", col_types = cols(w_geocode =... | /Code/Master_Final_Script.R | no_license | goyaltarun/Child-Poverty-Action-Lab-Project-Data-for-Good | R | false | false | 4,702 | r | library(dplyr)
rm(list = ls())
setwd("~/Downloads/Arpit Study /Spring 19 Classes/Practicum/Data Folder/Final")
# Reading the file for Dallas Geoids
dallas_geoids <- read_csv("Dallas_geoids.csv", col_types = cols(geoid = col_character()))
tx_wac_SE01 <- read_csv("tx_wac_SE01_JT00_2015.csv", col_types = cols(w_geocode =... |
rm(list=ls())
setwd('/Volumes/Bennett_BACKUP/Research/curtobacterium/chapter5_curto-evolution/transplant_communitybags/metagenomic_analyses/curto_coregenes/pplacer_output/pplacer_analysis/')
library(ggplot2)
library(reshape2) # for melt
abund <- read.table('subcladeXsite_abundance_matrix_ABSOLUTE.txt', header = T, se... | /curtodiversity/plot_curtoabundance.R | no_license | alex-b-chase/curtoEvol | R | false | false | 17,726 | r | rm(list=ls())
setwd('/Volumes/Bennett_BACKUP/Research/curtobacterium/chapter5_curto-evolution/transplant_communitybags/metagenomic_analyses/curto_coregenes/pplacer_output/pplacer_analysis/')
library(ggplot2)
library(reshape2) # for melt
abund <- read.table('subcladeXsite_abundance_matrix_ABSOLUTE.txt', header = T, se... |
% File man/Lq.o_MM1K.Rd
\name{Lq.o_MM1K}
\alias{Lq.o_MM1K}
\title{Returns the mean number of customers in the queue in the M/M/1/K queueing model}
\description{
Returns the mean number of customers in the queue in the M/M/1/K queueing model
}
\usage{
\method{Lq}{o_MM1K}(x, \dots)
}
\arguments{
\item{x}{a object o... | /man/Lq.o_MM1K.Rd | no_license | cran/queueing | R | false | false | 1,026 | rd | % File man/Lq.o_MM1K.Rd
\name{Lq.o_MM1K}
\alias{Lq.o_MM1K}
\title{Returns the mean number of customers in the queue in the M/M/1/K queueing model}
\description{
Returns the mean number of customers in the queue in the M/M/1/K queueing model
}
\usage{
\method{Lq}{o_MM1K}(x, \dots)
}
\arguments{
\item{x}{a object o... |
#' A function that given a matriz of log2FCH calculates the (signed) FCH
#' @description A function that reads GMT files and returns a list where each element is a list of genes
#' @param coefs.lg: matrix of log fold changes, usually the estimated coeficients of the limma model (ebfit$coef)
#' @examples
#' A=rnor... | /R/calcFCH.R | no_license | mssm-msf-2019/BiostatsALL | R | false | false | 592 | r | #' A function that given a matriz of log2FCH calculates the (signed) FCH
#' @description A function that reads GMT files and returns a list where each element is a list of genes
#' @param coefs.lg: matrix of log fold changes, usually the estimated coeficients of the limma model (ebfit$coef)
#' @examples
#' A=rnor... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/complete.R
\name{complete}
\alias{complete}
\title{Complete a data frame with missing combinations of data.}
\usage{
complete(data, ..., fill = list())
}
\arguments{
\item{data}{A data frame}
\item{...}{Specification of columns to expand.
... | /man/complete.Rd | no_license | joshkatz/tidyr | R | false | true | 1,690 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/complete.R
\name{complete}
\alias{complete}
\title{Complete a data frame with missing combinations of data.}
\usage{
complete(data, ..., fill = list())
}
\arguments{
\item{data}{A data frame}
\item{...}{Specification of columns to expand.
... |
## LOGISTIC REGRESSION - WORLD CUP 2019
wc = read.csv('WC_Train.csv')
## Data From 2007 World Cup till 2018 Cricket Matches
train = wc[which(wc$Year >= 2007 & wc$Year <=2019),]
#train = wc
attach(train)
## Creat dummy variable sfor Team A and Team B TRAIN
Team.A.matrix = model.matrix(~ Trim.Tea... | /LOGISTIC REG WC 2019.R | permissive | saurabac/Cricket-World-Cup-2019 | R | false | false | 2,569 | r |
## LOGISTIC REGRESSION - WORLD CUP 2019
wc = read.csv('WC_Train.csv')
## Data From 2007 World Cup till 2018 Cricket Matches
train = wc[which(wc$Year >= 2007 & wc$Year <=2019),]
#train = wc
attach(train)
## Creat dummy variable sfor Team A and Team B TRAIN
Team.A.matrix = model.matrix(~ Trim.Tea... |
comp.model0.lavaan <- '
# Measurement model
VC =~ mslqvcigo + mslqvcego + mslqvctv
EC =~ mslqeccolb + mslqecse
V =~ avsisee + avsinbi + avsisra
M =~ VC + EC
V ~~ 0*V
'
comp.model2.lavaan <- '
# Measurement model
VC =~ mslqvcigo + mslqvcego + mslqvctv
EC =~ mslqeccolb + mslqecse
V =~ avsisee + avsinbi + avsis... | /R/composite.lavaan.R | no_license | jbryer/NursingSRL | R | false | false | 756 | r | comp.model0.lavaan <- '
# Measurement model
VC =~ mslqvcigo + mslqvcego + mslqvctv
EC =~ mslqeccolb + mslqecse
V =~ avsisee + avsinbi + avsisra
M =~ VC + EC
V ~~ 0*V
'
comp.model2.lavaan <- '
# Measurement model
VC =~ mslqvcigo + mslqvcego + mslqvctv
EC =~ mslqeccolb + mslqecse
V =~ avsisee + avsinbi + avsis... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lmerNIfTI.R
\name{lmerNIfTI}
\alias{lmerNIfTI}
\title{Run a Linear Mixed Effet Model on a NIfTI image and output a parametric maps}
\usage{
lmerNIfTI(image, mask, fourdOut = NULL, formula, subjData,
mc.preschedule = TRUE, ncores = 1, method... | /man/lmerNIfTI.Rd | no_license | PennBBL/voxel | R | false | true | 2,291 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lmerNIfTI.R
\name{lmerNIfTI}
\alias{lmerNIfTI}
\title{Run a Linear Mixed Effet Model on a NIfTI image and output a parametric maps}
\usage{
lmerNIfTI(image, mask, fourdOut = NULL, formula, subjData,
mc.preschedule = TRUE, ncores = 1, method... |
#' TexHelp round/signif chars
#'
#' t_td forces there to be d digits after the decimal for the numeric input x, without messing with the "integer part" of x; t_sd messes with the integer part (i.e. uses significant digits). Both are vectorized over x.
#'
#' @param x numeric to clean; if not numeric, will be coe... | /R/texhelp.R | no_license | rdisalv2/dismisc | R | false | false | 5,875 | r |
#' TexHelp round/signif chars
#'
#' t_td forces there to be d digits after the decimal for the numeric input x, without messing with the "integer part" of x; t_sd messes with the integer part (i.e. uses significant digits). Both are vectorized over x.
#'
#' @param x numeric to clean; if not numeric, will be coe... |
# read data from file
data<- read.table("data/household_power_consumption.txt", sep=";", header=T, quote= "", strip.white=TRUE, stringsAsFactors = F, na.strings=c("NA", "-", "?"))
# gert only the two days:
data<- subset(data, (data$Date == "1/2/2007" | data$Date== "2/2/2007"))
# correct date format
data$Date <- as... | /plot4.R | no_license | petruz/ExData_Plotting1 | R | false | false | 1,235 | r | # read data from file
data<- read.table("data/household_power_consumption.txt", sep=";", header=T, quote= "", strip.white=TRUE, stringsAsFactors = F, na.strings=c("NA", "-", "?"))
# gert only the two days:
data<- subset(data, (data$Date == "1/2/2007" | data$Date== "2/2/2007"))
# correct date format
data$Date <- as... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pcadaptUtils.R
\name{get.pc}
\alias{get.pc}
\title{Get the principal component the most associated with a genetic marker}
\usage{
get.pc(x, list)
}
\arguments{
\item{x}{an object of class `pcadapt`.}
\item{list}{a list of integers correspond... | /man/get.pc.Rd | no_license | bcm-uga/pcadapt | R | false | true | 538 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pcadaptUtils.R
\name{get.pc}
\alias{get.pc}
\title{Get the principal component the most associated with a genetic marker}
\usage{
get.pc(x, list)
}
\arguments{
\item{x}{an object of class `pcadapt`.}
\item{list}{a list of integers correspond... |
data_full <- read.csv("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 data
data <- subset(data_full, subset=(Date >= "200... | /plot1.R | no_license | lanie00008/Exploratory-Data-Analysis-Project-1 | R | false | false | 710 | r |
data_full <- read.csv("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 data
data <- subset(data_full, subset=(Date >= "200... |
# exploring around
library(caret)
library(ggplot2)
library(gridExtra)
library(data.table)
setwd("/Users/ethen/Desktop/homesite_quote_conversion")
data_train <- fread( "data/train.csv", stringsAsFactors = TRUE, select = 2:299 )
dim(data_train)
# 260753 observations
# 299 features, the first two being ID and Dates
... | /kaggle/homesite_quote_conversion/explore.R | no_license | ethen8181/programming | R | false | false | 5,454 | r | # exploring around
library(caret)
library(ggplot2)
library(gridExtra)
library(data.table)
setwd("/Users/ethen/Desktop/homesite_quote_conversion")
data_train <- fread( "data/train.csv", stringsAsFactors = TRUE, select = 2:299 )
dim(data_train)
# 260753 observations
# 299 features, the first two being ID and Dates
... |
data <- read.csv('./dataset/household_power_consumption.txt',skip=66637,nrows=2880,sep=";",header = FALSE,stringsAsFactors=FALSE)
names(data) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
data$Date <- as.Date(data$Date,... | /plot1.R | no_license | ysinjab/ExData_Plotting1 | R | false | false | 568 | r | data <- read.csv('./dataset/household_power_consumption.txt',skip=66637,nrows=2880,sep=";",header = FALSE,stringsAsFactors=FALSE)
names(data) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
data$Date <- as.Date(data$Date,... |
## load data
## setwd("DataScience/04_Exploratory_Data_Analysis/Course Project")
library(sqldf)
filename<-c("household_power_consumption.txt")
data <- read.csv.sql(filename, sql = "select * from file where Date == '1/2/2007' or Date == '2/2/2007'",sep=";")
## set plot
with(data,hist(Global_active_power,col="red",xlab=... | /plot1.R | no_license | sysint09/ExData_Plotting1 | R | false | false | 632 | r | ## load data
## setwd("DataScience/04_Exploratory_Data_Analysis/Course Project")
library(sqldf)
filename<-c("household_power_consumption.txt")
data <- read.csv.sql(filename, sql = "select * from file where Date == '1/2/2007' or Date == '2/2/2007'",sep=";")
## set plot
with(data,hist(Global_active_power,col="red",xlab=... |
## ------------------------------------------------------------------------
dir <- file.path("~","Desktop","fars_data")
## ------------------------------------------------------------------------
dir <- system.file("extdata",package="msdr3pam")
## ----make filename-----------------------------------------------------... | /vignettes/Read_and_Summarize_Data.R | no_license | mmiesch/msdr3pam | R | false | false | 501 | r | ## ------------------------------------------------------------------------
dir <- file.path("~","Desktop","fars_data")
## ------------------------------------------------------------------------
dir <- system.file("extdata",package="msdr3pam")
## ----make filename-----------------------------------------------------... |
#Getting AMAZON stock dataset and loading the needed packages
if(!require(quantmod)) install.packages("quantmod")
if(!require(forecast)) install.packages("forecast")
if(!require(xlsx)) install.packages("xlsx")
if(!require(tseries)) install.packages("tseries")
if(!require(timeSeries)) install.packages("timeSeries")... | /Stock Price Forecasting Using Time Series Analysis, Machine Learning.R | no_license | MarkCichonski/Dockship-Learn-ML-2021-Grand-AI-Challenge | R | false | false | 3,017 | r | #Getting AMAZON stock dataset and loading the needed packages
if(!require(quantmod)) install.packages("quantmod")
if(!require(forecast)) install.packages("forecast")
if(!require(xlsx)) install.packages("xlsx")
if(!require(tseries)) install.packages("tseries")
if(!require(timeSeries)) install.packages("timeSeries")... |
#!/usr/bin/env Rscript
rm(list=ls())
library(nlme)
library(sjstats)
main <- function() {
args <- commandArgs(trailingOnly = TRUE)
filename <- args[1]
dat <- read.csv(file = filename, header = TRUE)
df = as.data.frame(dat)
names(df) <- c("idx", "partitions", "subjects", "data_srcs", "values")
df$partiti... | /stats/R_scripts/mean_abs_rdm_script.r | no_license | VPNL/submillimeter_representations | R | false | false | 878 | r | #!/usr/bin/env Rscript
rm(list=ls())
library(nlme)
library(sjstats)
main <- function() {
args <- commandArgs(trailingOnly = TRUE)
filename <- args[1]
dat <- read.csv(file = filename, header = TRUE)
df = as.data.frame(dat)
names(df) <- c("idx", "partitions", "subjects", "data_srcs", "values")
df$partiti... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 2182
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 2182
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query02_query64_1344/query02_query64_1344.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 707 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 2182
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 2182
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q... |
plot(density(rnorm(100)),col="red")
x=5
x<-5
assign("x",5)
x
x<-c(1,3,6,7)
char<-c("8","edge","turn8k");
logic<-c(TRUE,FALSE,TRUE,FALSE)
dynam<-c(8,"dds", TRUE)
dynam<-c(1,0,1,1,TRUE)
dynam
log(x,10)
log(base=10,x)
x=10
... | /Zadanie1.R | no_license | Luibov/matemmodeling | R | false | false | 1,883 | r | plot(density(rnorm(100)),col="red")
x=5
x<-5
assign("x",5)
x
x<-c(1,3,6,7)
char<-c("8","edge","turn8k");
logic<-c(TRUE,FALSE,TRUE,FALSE)
dynam<-c(8,"dds", TRUE)
dynam<-c(1,0,1,1,TRUE)
dynam
log(x,10)
log(base=10,x)
x=10
... |
library(httr)
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
dataFolder <- "data"
if(!file.exists(dataFolder)){
dir.create(dataFolder)
}
dataFileArchive <- paste(getwd(), "/data/household_power_consumption.zip", sep = "")
if(!file.exists(dataFileArchive)){
d... | /load_data.R | no_license | binbsr/ExData_Plotting1 | R | false | false | 431 | r | library(httr)
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
dataFolder <- "data"
if(!file.exists(dataFolder)){
dir.create(dataFolder)
}
dataFileArchive <- paste(getwd(), "/data/household_power_consumption.zip", sep = "")
if(!file.exists(dataFileArchive)){
d... |
# Rachel Keller
# ST 558
# November 18, 2020
# Purpose: To create shiny app for star predictions
# Load in shiny package
library(shiny)
library(plotly)
# Create UI for Star Type Prediction App
shinyUI(
navbarPage("Predicting Star Types",
# Information tab
tabPane... | /PredictingStarTypes/ui.R | permissive | rekelle3/ST-558-Project-3 | R | false | false | 26,188 | r | # Rachel Keller
# ST 558
# November 18, 2020
# Purpose: To create shiny app for star predictions
# Load in shiny package
library(shiny)
library(plotly)
# Create UI for Star Type Prediction App
shinyUI(
navbarPage("Predicting Star Types",
# Information tab
tabPane... |
computeSkinny <- function(AlphaArea, AlphaPerimeter,Bins){
#in general, the volume of an n-sphere with radius R is given by:
#V_{n} = pi^{n/2}*r^{n}/(gamma(n/2 + 1))
#The surface area is given by:
#S_{n} = 2*pi^{(n+1)/2}r^{n}/gamma((n+1)/2)
#Take V_{n}^{1/n}/S_{n}^{1/(n-1)}
#We want to find a cons... | /R/computeSkinny.R | no_license | AdamRahman/scagnostics2 | R | false | false | 779 | r | computeSkinny <- function(AlphaArea, AlphaPerimeter,Bins){
#in general, the volume of an n-sphere with radius R is given by:
#V_{n} = pi^{n/2}*r^{n}/(gamma(n/2 + 1))
#The surface area is given by:
#S_{n} = 2*pi^{(n+1)/2}r^{n}/gamma((n+1)/2)
#Take V_{n}^{1/n}/S_{n}^{1/(n-1)}
#We want to find a cons... |
plot(mydata$v20, mydata$V22, col=mydata$V35,
main="Relationship between A1 and A2 by Season",
xlab="V22", ylab="V20")
| /AppliedDataMining/AppliedDataMining/HW2/2.2/sb1.R | no_license | keithhickman08/IUH | R | false | false | 128 | r | plot(mydata$v20, mydata$V22, col=mydata$V35,
main="Relationship between A1 and A2 by Season",
xlab="V22", ylab="V20")
|
library("swephR")
# 'Heliacal event related constants
HELIACAL_LONG_SEARCH <-
as.integer(128) # ' e.g. for mercury, if no event found, try next synodic period
SE_HELIACAL_HIGH_PRECISION <-
as.integer(256) # if not set, program runs in faster low precision mode
SE_HELFLAG_NO_DETAILS <-
as.integer(1024)... | /R/Heliacal-events.R | no_license | vreijs/ARCHAEOCOSMO | R | false | false | 10,294 | r | library("swephR")
# 'Heliacal event related constants
HELIACAL_LONG_SEARCH <-
as.integer(128) # ' e.g. for mercury, if no event found, try next synodic period
SE_HELIACAL_HIGH_PRECISION <-
as.integer(256) # if not set, program runs in faster low precision mode
SE_HELFLAG_NO_DETAILS <-
as.integer(1024)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apigateway_operations.R
\name{apigateway_update_request_validator}
\alias{apigateway_update_request_validator}
\title{Updates a RequestValidator of a given RestApi}
\usage{
apigateway_update_request_validator(restApiId, requestValidatorId,
... | /cran/paws.networking/man/apigateway_update_request_validator.Rd | permissive | TWarczak/paws | R | false | true | 1,245 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apigateway_operations.R
\name{apigateway_update_request_validator}
\alias{apigateway_update_request_validator}
\title{Updates a RequestValidator of a given RestApi}
\usage{
apigateway_update_request_validator(restApiId, requestValidatorId,
... |
"benchstats" <-
structure(c(1527.56852, 3042.44997500001, 2167.10592327016, 0.334602909528699,
21.3952772745395, 1066.22807536413, 3108.27390518326, 0.241399354005255,
0.478412943833268, 23.8415845603296, 69.503117446785, 0.00539785365280285,
0.518994073152718, 27.2796486124696, 71.8877553203144, 0.0065916991537614
... | /packages/nimble/inst/classic-bugs/vol1/dyes/bench-test1.R | permissive | nimble-dev/nimble | R | false | false | 478 | r | "benchstats" <-
structure(c(1527.56852, 3042.44997500001, 2167.10592327016, 0.334602909528699,
21.3952772745395, 1066.22807536413, 3108.27390518326, 0.241399354005255,
0.478412943833268, 23.8415845603296, 69.503117446785, 0.00539785365280285,
0.518994073152718, 27.2796486124696, 71.8877553203144, 0.0065916991537614
... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "PhishingWebsites")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Result")
lrn = makeL... | /models/openml_PhishingWebsites/classification_Result/c4680fd5120fb2597cb8138d9d7016b0/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 732 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "PhishingWebsites")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Result")
lrn = makeL... |
#************************
#
# Graphics and Visualization
#
#***********************
# Packages
library(lattice)
library(GGally)
library(ggplot2)
library(MASS)
library(tcltk)
library(aplpack)
library(reshape2)
library(vcd)
library(mgcv)
#***********************
#
# Get the Train Data
#
#***********************
... | /Fall/DS_6001/R-visualizations/GraphViz.R | no_license | Marcus-Rosti/MSDS | R | false | false | 18,203 | r |
#************************
#
# Graphics and Visualization
#
#***********************
# Packages
library(lattice)
library(GGally)
library(ggplot2)
library(MASS)
library(tcltk)
library(aplpack)
library(reshape2)
library(vcd)
library(mgcv)
#***********************
#
# Get the Train Data
#
#***********************
... |
#' Title: Generates a dissimilarity matrix from weighted Euclidean matrix
#'
#' @param marker either a marker name from the rownames of X or an index
#' @param x matrix of the expression of the cells from a patient sample
#' @param y matrix of the expression of the cells taken from all the healthy samples.
#' ... | /R/weightCalc.R | no_license | shenorrLabTRDF/tuMap | R | false | false | 1,069 | r | #' Title: Generates a dissimilarity matrix from weighted Euclidean matrix
#'
#' @param marker either a marker name from the rownames of X or an index
#' @param x matrix of the expression of the cells from a patient sample
#' @param y matrix of the expression of the cells taken from all the healthy samples.
#' ... |
#' @include AllGenerics.R
NULL
#' @describeIn remove_relation Removes a relation between elements and sets.
#' @export
setMethod("remove_relation",
signature = signature(object = "TidySet",
elements = "characterORfactor",
sets = "characterORfact... | /R/remove.R | permissive | annakrystalli/BaseSet | R | false | false | 1,734 | r | #' @include AllGenerics.R
NULL
#' @describeIn remove_relation Removes a relation between elements and sets.
#' @export
setMethod("remove_relation",
signature = signature(object = "TidySet",
elements = "characterORfactor",
sets = "characterORfact... |
#############################################################################
###### Load and process data ######################################
#############################################################################
# Load household_power_consumption.txt into table four_year_data. Columns are
# rea... | /plot1.R | no_license | jieliang/ExData_Plotting1 | R | false | false | 2,540 | r | #############################################################################
###### Load and process data ######################################
#############################################################################
# Load household_power_consumption.txt into table four_year_data. Columns are
# rea... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/f7Messages.R
\name{updateF7MessageBar}
\alias{updateF7MessageBar}
\title{Update message bar on the server side}
\usage{
updateF7MessageBar(
inputId,
value = NULL,
placeholder = NULL,
session = shiny::getDefaultReactiveDomain()
)
}
\ar... | /man/updateF7MessageBar.Rd | no_license | HosseinKhandani/shinyMobile | R | false | true | 1,926 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/f7Messages.R
\name{updateF7MessageBar}
\alias{updateF7MessageBar}
\title{Update message bar on the server side}
\usage{
updateF7MessageBar(
inputId,
value = NULL,
placeholder = NULL,
session = shiny::getDefaultReactiveDomain()
)
}
\ar... |
rm(list=ls())
library(lme4)
Jcode <- function(){
dt = data.frame(ijk=ijk, prop=prop, trials=trials)
mod1=glmer(prop~1|ijk, weights=trials,family=binomial(link="logit"), data=dt)
return(predict(mod1,type="response"))
} | /trunk/AMAPVox/AMAPVoxCore/src/main/resources/codeR/AMAPglme.R | no_license | Falindir/AMAPVox | R | false | false | 231 | r |
rm(list=ls())
library(lme4)
Jcode <- function(){
dt = data.frame(ijk=ijk, prop=prop, trials=trials)
mod1=glmer(prop~1|ijk, weights=trials,family=binomial(link="logit"), data=dt)
return(predict(mod1,type="response"))
} |
/DM_BaseTools.R | no_license | lxyandy66/YangtzeProject | R | false | false | 19,797 | r | ||
library(testthat)
library(glmnet)
library(Metrics)
context("Test the output of cross_validation().")
test_that("Your cross_validation() function finds the same lambda.min with the same inputs in an easy case.", {
data(iris)
fit_cv_glmnet <- cv.glmnet(model.matrix(Sepal.Length ~ ., iris), as.matrix(iris[,1]), al... | /.Rproj.user/BA98F512/sources/s-1383C10B/A9855150-contents | no_license | emmacallen/BIS557 | R | false | false | 1,138 | library(testthat)
library(glmnet)
library(Metrics)
context("Test the output of cross_validation().")
test_that("Your cross_validation() function finds the same lambda.min with the same inputs in an easy case.", {
data(iris)
fit_cv_glmnet <- cv.glmnet(model.matrix(Sepal.Length ~ ., iris), as.matrix(iris[,1]), al... | |
assimetria <- function(vet){
resp <- list(assimetria = 0,
classificacao = "simétrico")
n <- length(vet)
sd_pop <- sqrt((n-1)/n) * sd(vet)
# quartis e decis
medidas <- medidas_posicao(vet)
a <- 3 * (mean(vet) - medidas$q2) / sd_pop
resp$assimetria = a
if (a >= 1) {
resp$clas... | /Estatistica_descritiva.R | no_license | samuelmacedo83/IFPE_aulas | R | false | false | 1,755 | r |
assimetria <- function(vet){
resp <- list(assimetria = 0,
classificacao = "simétrico")
n <- length(vet)
sd_pop <- sqrt((n-1)/n) * sd(vet)
# quartis e decis
medidas <- medidas_posicao(vet)
a <- 3 * (mean(vet) - medidas$q2) / sd_pop
resp$assimetria = a
if (a >= 1) {
resp$clas... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Obs_poly}
\alias{Obs_poly}
\title{Observation block with support}
\usage{
Obs_poly(pol_df, name = "Obs_poly", alpha0 = NA, av_dist = NA, ...)
}
\arguments{
\item{pol_df}{a wide table format data frame identifying support of observation, or the path to a file co... | /man/Obs_poly.Rd | no_license | shazhe/mvst0 | R | false | false | 1,634 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{Obs_poly}
\alias{Obs_poly}
\title{Observation block with support}
\usage{
Obs_poly(pol_df, name = "Obs_poly", alpha0 = NA, av_dist = NA, ...)
}
\arguments{
\item{pol_df}{a wide table format data frame identifying support of observation, or the path to a file co... |
testlist <- list(rates = numeric(0), thresholds = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = numeric(0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) | /grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610382987-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 158 | r | testlist <- list(rates = numeric(0), thresholds = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = numeric(0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) |
#' Performs initial checks for trelliData objects
#'
#' This function runs necessary checks for pmartR trelliscope plotting
#' functions. It cleans any parameters (rounding numerics to integers, etc.),
#' and returns them.
#'
#' @param trelliData trelliData object the user passed to a plotting
#' function
#' @param t... | /R/trelliPlots.R | permissive | clabornd/pmartR | R | false | false | 80,971 | r | #' Performs initial checks for trelliData objects
#'
#' This function runs necessary checks for pmartR trelliscope plotting
#' functions. It cleans any parameters (rounding numerics to integers, etc.),
#' and returns them.
#'
#' @param trelliData trelliData object the user passed to a plotting
#' function
#' @param t... |
#' Definition for epoch class
#' @description Trial epoch, contains the following information: \code{Block}
#' experiment block/session string; \code{Time} trial onset within that block;
#' \code{Trial} trial number; \code{Condition} trial condition. Other optional
#' columns are \code{Event_xxx} (starts with "Event").... | /R/class-epoch.R | no_license | dipterix/ravecore | R | false | false | 4,618 | r | #' Definition for epoch class
#' @description Trial epoch, contains the following information: \code{Block}
#' experiment block/session string; \code{Time} trial onset within that block;
#' \code{Trial} trial number; \code{Condition} trial condition. Other optional
#' columns are \code{Event_xxx} (starts with "Event").... |
#####################################################################
#SVMfor Diabities dataset
#####################################################################
#Diabetes.csv
require(caTools)
require(e1071)
setwd("C:/Users/Akshay.Akshay-PC.000/Downloads/CI SVM")
# Input data
data <- read.csv("Diabetes.csv",h... | /diabetesSVMinR.R | permissive | akshayseth7/NN-SVM-Assignment | R | false | false | 1,342 | r | #####################################################################
#SVMfor Diabities dataset
#####################################################################
#Diabetes.csv
require(caTools)
require(e1071)
setwd("C:/Users/Akshay.Akshay-PC.000/Downloads/CI SVM")
# Input data
data <- read.csv("Diabetes.csv",h... |
library(ProTrackR)
### Name: PTCell-class
### Title: The PTCell class
### Aliases: PTCell-class PTCell
### ** Examples
data("mod.intro")
## get the PTCell from mod.intro at
## PTPattern #1, PTTrack #1 and row #1:
cell <- PTCell(mod.intro, 1, 1, 1)
## get the note of this cell:
note(cell)
## get the octave of th... | /data/genthat_extracted_code/ProTrackR/examples/PTCell-class.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 572 | r | library(ProTrackR)
### Name: PTCell-class
### Title: The PTCell class
### Aliases: PTCell-class PTCell
### ** Examples
data("mod.intro")
## get the PTCell from mod.intro at
## PTPattern #1, PTTrack #1 and row #1:
cell <- PTCell(mod.intro, 1, 1, 1)
## get the note of this cell:
note(cell)
## get the octave of th... |
library(pg13)
create_test_schema <-
function(conn) {
if (!schema_exists(conn = conn,
schema = "test_schema")) {
cli::cli_rule("Create 'test_schema' Schema")
create_schema(conn = conn,
... | /inst/example/summary.R | no_license | jimsforks/pg13 | R | false | false | 1,819 | r | library(pg13)
create_test_schema <-
function(conn) {
if (!schema_exists(conn = conn,
schema = "test_schema")) {
cli::cli_rule("Create 'test_schema' Schema")
create_schema(conn = conn,
... |
library(nnet)
library(caret)
library(plyr)
library(doMC)
library(e1071)
rm(list = ls())
registerDoMC(cores = 6)
## Model Performance Metric
metric = function(confusion) {
sensitivity = confusion[4] / (confusion[2] + confusion[4])
specificity = confusion[1] / (confusion[1] + confusion[3])
score = (sensitivity ... | /R-Scripts/07_model_nnet.R | no_license | JestonBlu/Driving | R | false | false | 10,393 | r | library(nnet)
library(caret)
library(plyr)
library(doMC)
library(e1071)
rm(list = ls())
registerDoMC(cores = 6)
## Model Performance Metric
metric = function(confusion) {
sensitivity = confusion[4] / (confusion[2] + confusion[4])
specificity = confusion[1] / (confusion[1] + confusion[3])
score = (sensitivity ... |
#' Get the time required to traverse a target distance.
#'
#' @param d_traverse target distance in meters.
#' @param get_traverse_time traverse velocity [m/s].
#' @param average_slippage_rate
#'
#' @return
#' @export
#'
#' @examples
get_traverse_time = function(d_traverse, v_traverse=0.02, average_slippage_rate=0.15){... | /assets/scripts/R/utils/utils.R | no_license | georgeslabreche/master-thesis-sherpatt-solar-array | R | false | false | 546 | r | #' Get the time required to traverse a target distance.
#'
#' @param d_traverse target distance in meters.
#' @param get_traverse_time traverse velocity [m/s].
#' @param average_slippage_rate
#'
#' @return
#' @export
#'
#' @examples
get_traverse_time = function(d_traverse, v_traverse=0.02, average_slippage_rate=0.15){... |
## Both function togheter create an special 'matrix' object
## and compute its inverse-R programming assignment 2
## Function that creates an special matrix object that
## can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- f... | /cachematrix.R | no_license | MarielaNR/ProgrammingAssignment2 | R | false | false | 852 | r | ## Both function togheter create an special 'matrix' object
## and compute its inverse-R programming assignment 2
## Function that creates an special matrix object that
## can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- f... |
#' Make image showing phenology response to temperatures during two phases
#'
#' The timing of many developmental stages of temperate plants is understood to
#' depend on temperatures during two phases. This function seeks to illustrate
#' this dependency by plotting phenological dates as colored surface, as a
#'... | /fuzzedpackages/chillR/R/make_pheno_trend_plot.R | no_license | akhikolla/testpackages | R | false | false | 11,782 | r | #' Make image showing phenology response to temperatures during two phases
#'
#' The timing of many developmental stages of temperate plants is understood to
#' depend on temperatures during two phases. This function seeks to illustrate
#' this dependency by plotting phenological dates as colored surface, as a
#'... |
# Functions for reading DTI tracking data from files in MRtrix TCK format.
# See http://mrtrix.readthedocs.io/en/latest/getting_started/image_data.html?highlight=format#tracks-file-format-tck for a spec.
#' @title Read DTI tracking data from file in MRtrix 'TCK' format.
#'
#' @param filepath character string, path to... | /R/read_dti_tck.R | permissive | dfsp-spirit/freesurferformats | R | false | false | 7,708 | r | # Functions for reading DTI tracking data from files in MRtrix TCK format.
# See http://mrtrix.readthedocs.io/en/latest/getting_started/image_data.html?highlight=format#tracks-file-format-tck for a spec.
#' @title Read DTI tracking data from file in MRtrix 'TCK' format.
#'
#' @param filepath character string, path to... |
testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615854083-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 659 | r | testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e... |
# ==================
# MODEL SELECTION
# ==================
# Packages ----
library(mgcv)
# Custom functions ----
## Cross validation
cv <- function(data, model, k, repeats = 1, seed = NULL){
# Create refitting function
refit <- function(i, data_shuffle, folds){
# Segment data by fold
test_ids <- which... | /Range Test/Manuscript/additional_file_2.R | no_license | mhpob/WEA-Analysis | R | false | false | 11,878 | r | # ==================
# MODEL SELECTION
# ==================
# Packages ----
library(mgcv)
# Custom functions ----
## Cross validation
cv <- function(data, model, k, repeats = 1, seed = NULL){
# Create refitting function
refit <- function(i, data_shuffle, folds){
# Segment data by fold
test_ids <- which... |
library(ipred)
library(caret)
load("data/credit_ch1_train_test.RData")
load("data/credit_ch3_ex3_model.RData")
# Generate predicted classes using the model object
class_prediction <- predict(object = credit_model,
newdata = credit_test,
type = "class... | /exercises/solution_03_05.R | permissive | open-data-courses/tree-based-models-in-r | R | false | false | 601 | r | library(ipred)
library(caret)
load("data/credit_ch1_train_test.RData")
load("data/credit_ch3_ex3_model.RData")
# Generate predicted classes using the model object
class_prediction <- predict(object = credit_model,
newdata = credit_test,
type = "class... |
# AREA module functions for
# "iQuaCalc (Lite).R"
volumeNumericModuleInput <- function(id) {
ns <- NS(id)
tagList(
splitLayout(cellWidths = c('25%', '50%', '25%'),
numericInput(ns('volume_input'), 'Volume',
value = 1,
... | /modules/volume_numeric_input_module.R | no_license | aquacalc/iQuaCalc_R | R | false | false | 4,080 | r | # AREA module functions for
# "iQuaCalc (Lite).R"
volumeNumericModuleInput <- function(id) {
ns <- NS(id)
tagList(
splitLayout(cellWidths = c('25%', '50%', '25%'),
numericInput(ns('volume_input'), 'Volume',
value = 1,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.