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 |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/emdr_results.R
\name{plot_emdr}
\alias{plot_emdr}
\title{Plot coefficients of EMD-regression}
\usage{
plot_emdr(x, periods = NULL, lower = NULL, upper = NULL,
ci.args = list(), period.log2 = TRUE, trend.label = "Trend",
show.coef = c("all... | /man/plot_emdr.Rd | no_license | exclusivemekus/emdr | R | false | true | 3,531 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/emdr_results.R
\name{plot_emdr}
\alias{plot_emdr}
\title{Plot coefficients of EMD-regression}
\usage{
plot_emdr(x, periods = NULL, lower = NULL, upper = NULL,
ci.args = list(), period.log2 = TRUE, trend.label = "Trend",
show.coef = c("all... |
#' @export
#' @rdname geom_linerange
geom_pointrange <- function(mapping = NULL, data = NULL, stat = "identity",
position = "identity", show.legend = NA,
inherit.aes = TRUE, ...) {
layer(
data = data,
mapping = mapping,
stat = stat,
geom = GeomPo... | /R/geom-pointrange.r | no_license | andrewla/ggplot2 | R | false | false | 1,132 | r | #' @export
#' @rdname geom_linerange
geom_pointrange <- function(mapping = NULL, data = NULL, stat = "identity",
position = "identity", show.legend = NA,
inherit.aes = TRUE, ...) {
layer(
data = data,
mapping = mapping,
stat = stat,
geom = GeomPo... |
library(tidyverse)
library(RColorBrewer)
library(Cairo)
library(effsize)
# 1. UKB depression status compared to neuroticism, online MDD, antidepressant count, polygenic MDD PRS
# Step 1: Read/Prepare data
# -----------
project_dir = '/gpfs/milgram/project/holmes/kma52/mdd_sst'
pheno_path = paste0(project_dir, '/dat... | /scripts/02_mdd_imaging/02_ukb_mdd_pheno_plots.R | no_license | JujiaoKang/2020_PNAS_Depression | R | false | false | 7,263 | r | library(tidyverse)
library(RColorBrewer)
library(Cairo)
library(effsize)
# 1. UKB depression status compared to neuroticism, online MDD, antidepressant count, polygenic MDD PRS
# Step 1: Read/Prepare data
# -----------
project_dir = '/gpfs/milgram/project/holmes/kma52/mdd_sst'
pheno_path = paste0(project_dir, '/dat... |
#由於 [13其他] 只佔有0%,不具參考價值,所以將該列刪除
seg_le_pct <- seg_le_pct[seg_le_pct$產業別 != "13其他", ]
seg_me_pct <- seg_me_pct[seg_me_pct$產業別 != "13其他", ]
seg_se_pct <- seg_se_pct[seg_se_pct$產業別 != "13其他", ]
row_se_pct <- c("201704","11投資業","0%")
seg_se_pct <- rbind(seg_se_pct[1:394, ], row_se_pct, seg_se_pct[1:395, ])
loan_industry201... | /data_clean.R | no_license | Vivian19970428/R-project | R | false | false | 3,746 | r | #由於 [13其他] 只佔有0%,不具參考價值,所以將該列刪除
seg_le_pct <- seg_le_pct[seg_le_pct$產業別 != "13其他", ]
seg_me_pct <- seg_me_pct[seg_me_pct$產業別 != "13其他", ]
seg_se_pct <- seg_se_pct[seg_se_pct$產業別 != "13其他", ]
row_se_pct <- c("201704","11投資業","0%")
seg_se_pct <- rbind(seg_se_pct[1:394, ], row_se_pct, seg_se_pct[1:395, ])
loan_industry201... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grid2latlong.R
\name{grid2latlong}
\alias{grid2latlong}
\title{Convert Coordinates from Grid to Latitude/Longitude}
\usage{
grid2latlong(input)
}
\arguments{
\item{input}{A data frame with columns named \code{x} and \code{y} of the UTM coordi... | /man/grid2latlong.Rd | no_license | Arrendi/SpatialEpi | R | false | true | 1,893 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grid2latlong.R
\name{grid2latlong}
\alias{grid2latlong}
\title{Convert Coordinates from Grid to Latitude/Longitude}
\usage{
grid2latlong(input)
}
\arguments{
\item{input}{A data frame with columns named \code{x} and \code{y} of the UTM coordi... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
p_skater <- function(k, xp_w, data, n_vars, scale_method, distance_method, bound_vals, min_bound, seed, cpu_threads) {
.Call('_rgeoda_p_skater', PACKAGE = 'rgeoda', k, xp_w, data, n_vars, s... | /R/RcppExports.R | no_license | whaibao/rgeoda | R | false | false | 13,994 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
p_skater <- function(k, xp_w, data, n_vars, scale_method, distance_method, bound_vals, min_bound, seed, cpu_threads) {
.Call('_rgeoda_p_skater', PACKAGE = 'rgeoda', k, xp_w, data, n_vars, s... |
#this is the data wrangling for the master dataset (middle/elementary school)
library(dplyr)
library(stringr)
#-------------------------------------------------------------------------------
#this is where we load our directories (and also select only the relevant columns)
middle_dir <- read.csv("~/DataClean/Datasets... | /DataClean/2018_Masterdataset_Clean.R | no_license | sci4ny/PIT-DSC-STEM-Inequality | R | false | false | 10,229 | r | #this is the data wrangling for the master dataset (middle/elementary school)
library(dplyr)
library(stringr)
#-------------------------------------------------------------------------------
#this is where we load our directories (and also select only the relevant columns)
middle_dir <- read.csv("~/DataClean/Datasets... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/athena.R
\docType{methods}
\name{dbSendQuery,AthenaConnection,character-method}
\alias{dbSendQuery,AthenaConnection,character-method}
\title{Execute an Athena Query}
\usage{
\S4method{dbSendQuery}{AthenaConnection,character}(conn, statement, ... | /man/dbSendQuery-AthenaConnection-character-method.Rd | no_license | hrbrmstr/AWR.Athena | R | false | true | 481 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/athena.R
\docType{methods}
\name{dbSendQuery,AthenaConnection,character-method}
\alias{dbSendQuery,AthenaConnection,character-method}
\title{Execute an Athena Query}
\usage{
\S4method{dbSendQuery}{AthenaConnection,character}(conn, statement, ... |
library(keras)
library(rsample)
library(tidyverse)
library(ISLR)
library(tidyverse)
library(polycor)
library(esquisse)
library(recipes)
raw_data<-read.csv("D:\\deep learning\\BUS_CSC 386 Homework Data\\supersym.csv")
glimpse(raw_data)
dim(raw_data)
plot_missing(raw_data)
recepie_obj <- recipe(targ... | /Super_Symetry_Predictor/Super_Symetry_Predictor_Neural_Network.R | no_license | GioLomia/Deep_Learning_Models_Projects | R | false | false | 4,100 | r | library(keras)
library(rsample)
library(tidyverse)
library(ISLR)
library(tidyverse)
library(polycor)
library(esquisse)
library(recipes)
raw_data<-read.csv("D:\\deep learning\\BUS_CSC 386 Homework Data\\supersym.csv")
glimpse(raw_data)
dim(raw_data)
plot_missing(raw_data)
recepie_obj <- recipe(targ... |
#' Validating fitted subgroup identification models
#'
#' @description Validates subgroup treatment effects for fitted
#' subgroup identification model class of Chen, et al (2017)
#'
#' @param model fitted model object returned by \code{fit.subgroup()} function
#' @param method validation method. \code{"boot_bias_corr... | /R/validate_subgroup.R | no_license | Shuai-Dong/personalized | R | false | false | 12,372 | r | #' Validating fitted subgroup identification models
#'
#' @description Validates subgroup treatment effects for fitted
#' subgroup identification model class of Chen, et al (2017)
#'
#' @param model fitted model object returned by \code{fit.subgroup()} function
#' @param method validation method. \code{"boot_bias_corr... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/geom-curve.r, R/geom-segment.r
\name{geom_curve}
\alias{geom_curve}
\alias{geom_segment}
\title{Line segments and curves.}
\usage{
geom_curve(mapping = NULL, data = NULL, stat = "identity",
position = "identity", curvature = 0.5, an... | /man/geom_segment.Rd | no_license | ctaimal/ggplot2 | R | false | false | 3,915 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/geom-curve.r, R/geom-segment.r
\name{geom_curve}
\alias{geom_curve}
\alias{geom_segment}
\title{Line segments and curves.}
\usage{
geom_curve(mapping = NULL, data = NULL, stat = "identity",
position = "identity", curvature = 0.5, an... |
library(UsingR)
library(forecast)
library(caret)
data("diamond")
modelfit <- train(price~., method="glm", data = diamond)
diamondprice <- function(carat){
newval <- data.frame(carat=carat);
result <- predict(modelfit, newdata=newval)
result
}
shinyServer(
function(input, output) {
output$inputValue <- re... | /server.R | no_license | ashokchhilar/dataproducts | R | false | false | 416 | r | library(UsingR)
library(forecast)
library(caret)
data("diamond")
modelfit <- train(price~., method="glm", data = diamond)
diamondprice <- function(carat){
newval <- data.frame(carat=carat);
result <- predict(modelfit, newdata=newval)
result
}
shinyServer(
function(input, output) {
output$inputValue <- re... |
### This code reads the data between 1/2/2007 and 2/2/2007 and creates a PNG file containing the 4 plots required
### The text file household_power_consumption.txt needs to be in your working directory
## Read the text file for dates of 1/2/2007 and 2/2/2007
dat_orig <- read.table(pipe('findstr /B /R ^[1-2]/2/2007 hou... | /plot4.R | no_license | trjim2k7/ExData_Plotting1 | R | false | false | 2,433 | r | ### This code reads the data between 1/2/2007 and 2/2/2007 and creates a PNG file containing the 4 plots required
### The text file household_power_consumption.txt needs to be in your working directory
## Read the text file for dates of 1/2/2007 and 2/2/2007
dat_orig <- read.table(pipe('findstr /B /R ^[1-2]/2/2007 hou... |
#(1) Two-sample t-test
nx = 10
ny = 20
first = rnorm(nx, 0, 1)
second = rnorm(ny, -1, 1)
x = mean(first)
y = mean(second)
semX = sd(first)/(sqrt(nx))
semY = sd(second)/(sqrt(ny))
tXY = (x-y)/(sqrt(semX^2+ semY^2))
tXY
#p-value
varY = var(second)
varX = var(first)
v = (varY/ny+varX/nx)^2/((varY/ny)^2/(ny-1) + (varX/n... | /Kathi/Homework8.R | no_license | KA-coder-tiff/Statistik-R | R | false | false | 992 | r | #(1) Two-sample t-test
nx = 10
ny = 20
first = rnorm(nx, 0, 1)
second = rnorm(ny, -1, 1)
x = mean(first)
y = mean(second)
semX = sd(first)/(sqrt(nx))
semY = sd(second)/(sqrt(ny))
tXY = (x-y)/(sqrt(semX^2+ semY^2))
tXY
#p-value
varY = var(second)
varX = var(first)
v = (varY/ny+varX/nx)^2/((varY/ny)^2/(ny-1) + (varX/n... |
######################################################################
#
# scantwo.R
#
# copyright (c) 2001-9, Karl W Broman and Hao Wu
# last modified May, 2009
# first written Nov, 2001
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Lice... | /R/scantwo.R | no_license | pjotrp/rqtl | R | false | false | 56,713 | r | ######################################################################
#
# scantwo.R
#
# copyright (c) 2001-9, Karl W Broman and Hao Wu
# last modified May, 2009
# first written Nov, 2001
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Lice... |
###################################################
########### Randomise Microsat Plates ###########
###################################################
### >>> Configure R session
library(dplyr)
library(inbolimsintern)
logfile <- logfile_start(prefix = "MICROSATS_RUN")
call_id <- 0 #40
try({
args <- inbolimsi... | /inbolimsintern/inst/lims_scripts/gen_ms_plate_randomise.R | permissive | inbo/inbolimsintern | R | false | false | 1,028 | r | ###################################################
########### Randomise Microsat Plates ###########
###################################################
### >>> Configure R session
library(dplyr)
library(inbolimsintern)
logfile <- logfile_start(prefix = "MICROSATS_RUN")
call_id <- 0 #40
try({
args <- inbolimsi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iHEAD_previsao.R
\name{probabilidade_avaria_MT}
\alias{probabilidade_avaria_MT}
\title{Estimar probabilidade de avaria para as linhas MT}
\usage{
probabilidade_avaria_MT(...,atualizar_modelo=c("nao","sim"),afinamento=c("nao","sim"),Tipo_linha... | /iHEAD/man/probabilidade_avaria_MT.Rd | no_license | diaxz12/iHEAD_package_development | R | false | true | 1,359 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iHEAD_previsao.R
\name{probabilidade_avaria_MT}
\alias{probabilidade_avaria_MT}
\title{Estimar probabilidade de avaria para as linhas MT}
\usage{
probabilidade_avaria_MT(...,atualizar_modelo=c("nao","sim"),afinamento=c("nao","sim"),Tipo_linha... |
# Name: First Last
# Lab 6: SVM
#
# Exercise 1:
x1 = -10:10
x2 = 1 + 3 * x1
plot(x1, x2, type = "l", col = "red")
text(c(0), c(-20), "greater than 0", col = "red")
text(c(0), c(20), "less than 0", col = "red")
lines(x1, 1 - x1/2)
text(c(0), c(-15), "less than 0")
text(c(0), c(15), "greater than 0")
# Exe... | /Data Mining/Labs/lab7.R | no_license | jalague/Projects | R | false | false | 2,141 | r | # Name: First Last
# Lab 6: SVM
#
# Exercise 1:
x1 = -10:10
x2 = 1 + 3 * x1
plot(x1, x2, type = "l", col = "red")
text(c(0), c(-20), "greater than 0", col = "red")
text(c(0), c(20), "less than 0", col = "red")
lines(x1, 1 - x1/2)
text(c(0), c(-15), "less than 0")
text(c(0), c(15), "greater than 0")
# Exe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lmer.rsquared.R
\name{r.squared.merMod}
\alias{r.squared.merMod}
\title{Marginal and conditional r-squared for merMod objects}
\usage{
\method{r.squared}{merMod}(mdl)
}
\arguments{
\item{mdl}{an merMod model (usually fit using \code{\link{lme... | /man/r.squared.merMod.Rd | no_license | anhnguyendepocen/gamlj | R | false | true | 655 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lmer.rsquared.R
\name{r.squared.merMod}
\alias{r.squared.merMod}
\title{Marginal and conditional r-squared for merMod objects}
\usage{
\method{r.squared}{merMod}(mdl)
}
\arguments{
\item{mdl}{an merMod model (usually fit using \code{\link{lme... |
#' Returns the name of the project's output directory. runAnalysis() should save its output here, and submitAnalysis() will expect to read from this location. This function checks to make sure the location exists, and if not, creates it. for the MyAnalysis project
#'
#' @keywords 4CE
#' @export
getProjectOutputDirect... | /FourCePhase2.1MyAnalysis/R/getProjectOutputDirectory.R | no_license | covidclinical/Phase2.1MyAnalysisRPackage | R | false | false | 891 | r |
#' Returns the name of the project's output directory. runAnalysis() should save its output here, and submitAnalysis() will expect to read from this location. This function checks to make sure the location exists, and if not, creates it. for the MyAnalysis project
#'
#' @keywords 4CE
#' @export
getProjectOutputDirect... |
name1 <- readline("Enter name 1 ")
name2 <- readline("Enter name 2 ")
name3 <- readline("Enter name 3 ")
fnames <- c(name1, name2, name3)
lnames <- c("Bozak","Tarasenko","Schenn")
print(paste(fnames, lnames)) | /Advanced Applications of R Level 2/Ex1.R | no_license | akuelker/advanced_R_2 | R | false | false | 215 | r | name1 <- readline("Enter name 1 ")
name2 <- readline("Enter name 2 ")
name3 <- readline("Enter name 3 ")
fnames <- c(name1, name2, name3)
lnames <- c("Bozak","Tarasenko","Schenn")
print(paste(fnames, lnames)) |
# Load packages ----
library(shiny)
library(shiny.i18n)
library(dplyr)
library(ggplot2)
# Time zone ----
Sys.setenv(TZ="Africa/Bamako") #Sys.getenv("TZ") # to check
# The json file with translations ----
i18n <- Translator$new(translation_json_path = "https://raw.githubusercontent.com/fousseynoubah/ssm/master/shiny/... | /shiny/ssm7_fr/app.R | no_license | fousseynoubah/ssm | R | false | false | 3,610 | r | # Load packages ----
library(shiny)
library(shiny.i18n)
library(dplyr)
library(ggplot2)
# Time zone ----
Sys.setenv(TZ="Africa/Bamako") #Sys.getenv("TZ") # to check
# The json file with translations ----
i18n <- Translator$new(translation_json_path = "https://raw.githubusercontent.com/fousseynoubah/ssm/master/shiny/... |
##################################
# Investigate relationships between promoter DNAme and other variables (Klughammer et al. Nature Medicine).
# Updated: 2021.05.12
# Author: Kevin J.
###################################
# Working directory for this analysis.
mybasedir = "/Users/johnsk/Documents/Single-Cell-DNAmethylat... | /analysis/Fig5c-e-klughammer.R | permissive | millersan/singlecellglioma-verhaaklab | R | false | false | 19,116 | r | ##################################
# Investigate relationships between promoter DNAme and other variables (Klughammer et al. Nature Medicine).
# Updated: 2021.05.12
# Author: Kevin J.
###################################
# Working directory for this analysis.
mybasedir = "/Users/johnsk/Documents/Single-Cell-DNAmethylat... |
if(!exists(".initialised")){
source(file.path("04_baseline_model", "00_init.R"))
}
source(file.path(.dir_custom, "parsnip", "parsnip_mfp.R"))
source(file.path(.dir_custom, "parsnip", "parsnip_hal.R"))
# Logistic regressions ----------------------------------------------------
# Unregularised
engine_log_reg <- ... | /chapters_5_6/04_baseline_model/00c_models.R | no_license | prockenschaub/phd_code | R | false | false | 1,492 | r |
if(!exists(".initialised")){
source(file.path("04_baseline_model", "00_init.R"))
}
source(file.path(.dir_custom, "parsnip", "parsnip_mfp.R"))
source(file.path(.dir_custom, "parsnip", "parsnip_hal.R"))
# Logistic regressions ----------------------------------------------------
# Unregularised
engine_log_reg <- ... |
library(rquery)
### Name: rsummary_node
### Title: Create an rsumary relop operator node.
### Aliases: rsummary_node
### ** Examples
if (requireNamespace("DBI", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) {
d <- data.frame(p= c(TRUE, FALSE, NA),
s= NA,
w= 1... | /data/genthat_extracted_code/rquery/examples/rsummary_node.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 917 | r | library(rquery)
### Name: rsummary_node
### Title: Create an rsumary relop operator node.
### Aliases: rsummary_node
### ** Examples
if (requireNamespace("DBI", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) {
d <- data.frame(p= c(TRUE, FALSE, NA),
s= NA,
w= 1... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modeling.R
\name{estimateSizeFactorsForDenseMatrix}
\alias{estimateSizeFactorsForDenseMatrix}
\title{Estimate size factors dense matrix}
\usage{
estimateSizeFactorsForDenseMatrix(
counts,
locfunc = median,
round_exprs = TRUE,
method =... | /man/estimateSizeFactorsForDenseMatrix.Rd | no_license | zhanglhbioinfor/DIRECT-NET | R | false | true | 926 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modeling.R
\name{estimateSizeFactorsForDenseMatrix}
\alias{estimateSizeFactorsForDenseMatrix}
\title{Estimate size factors dense matrix}
\usage{
estimateSizeFactorsForDenseMatrix(
counts,
locfunc = median,
round_exprs = TRUE,
method =... |
#!/usr/bin/env Rscript
##########################################################################################
## INTRODUCTION AND HELP
##
##----------------------------------------------------------------------------------------
## This is the main settings file for the moving knots proje... | /inst/examples/simul_hwang_interaction_1p_1000n_s.R | no_license | Philharmoni/movingknots | R | false | false | 18,167 | r | #!/usr/bin/env Rscript
##########################################################################################
## INTRODUCTION AND HELP
##
##----------------------------------------------------------------------------------------
## This is the main settings file for the moving knots proje... |
testlist <- list(latLongs = structure(c(2.77429924043539e+180, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(1L, 10L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) | /MGDrivE/inst/testfiles/calcCos/libFuzzer_calcCos/calcCos_valgrind_files/1612726643-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 175 | r | testlist <- list(latLongs = structure(c(2.77429924043539e+180, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(1L, 10L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) |
library(lubridate)
library(ggplot2)
library(dplyr)
library(gganimate)
library(plotly)
setwd("/path/to/F. exsecta analysis/Data")
#----------------------------------------- Data prep ----------------------------------------------
temp <- read.csv("first_temp.csv", header = TRUE) # First monitoring period (Active nes... | /F.exsecta_analysis/R/temp_plots.R | permissive | zibbini/minor_projects | R | false | false | 4,364 | r | library(lubridate)
library(ggplot2)
library(dplyr)
library(gganimate)
library(plotly)
setwd("/path/to/F. exsecta analysis/Data")
#----------------------------------------- Data prep ----------------------------------------------
temp <- read.csv("first_temp.csv", header = TRUE) # First monitoring period (Active nes... |
# Project for class Getting and Cleaning Data through Coursera
# Source of data for Project
# https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
# Script will perform the following steps.
# 1. Merges the training and the test sets to create one data set.
# Load the test data to corre... | /run_analysis.R | no_license | js1600/Getting_and_Cleaning_Data | R | false | false | 2,918 | r | # Project for class Getting and Cleaning Data through Coursera
# Source of data for Project
# https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
# Script will perform the following steps.
# 1. Merges the training and the test sets to create one data set.
# Load the test data to corre... |
#!/usr/bin/env Rscript
# https://stackoverflow.com/questions/18306362/run-r-script-from-command-line
# CALL
# ./cli-random-forest.R ~/workspace/R test_corp
source("cli-input.R")
if (length(args) < 2) {
stop("Not all arguments provided.")
}
project_name <- args[2]
source("interfaces/random-forest.R")
results <- ... | /cli/cli-random-forest.R | no_license | AMCeScience/R-topicmodelling | R | false | false | 359 | r | #!/usr/bin/env Rscript
# https://stackoverflow.com/questions/18306362/run-r-script-from-command-line
# CALL
# ./cli-random-forest.R ~/workspace/R test_corp
source("cli-input.R")
if (length(args) < 2) {
stop("Not all arguments provided.")
}
project_name <- args[2]
source("interfaces/random-forest.R")
results <- ... |
# Spatial interpolation
# teacher script
library(dplyr)
library(sf)
library(sp)
library(rgeos)
library(cartography)
# functions written by Thibault Laurent
# https://github.com/tibo31/spatial_project/blob/master/AIM.R
source("https://raw.githubusercontent.com/tibo31/spatial_project/master/AIM.R")
# import the censu... | /ArealInterpolation_StudentScript.R | no_license | SunHaoming0603/SpatialEcon_Students | R | false | false | 7,719 | r | # Spatial interpolation
# teacher script
library(dplyr)
library(sf)
library(sp)
library(rgeos)
library(cartography)
# functions written by Thibault Laurent
# https://github.com/tibo31/spatial_project/blob/master/AIM.R
source("https://raw.githubusercontent.com/tibo31/spatial_project/master/AIM.R")
# import the censu... |
library("fs")
library("wbstats")
library(tidyverse)
# source("Summary Board/utils.R", local = T)
# Function to download timeseries data on covid-19 from github page of John Hopkins CSSEGIS
downloadGithubData <- function() {
base_url <- "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_... | /Summary Board/src/get_data.R | no_license | bteinstein/COVID-19-Viz | R | false | false | 6,249 | r | library("fs")
library("wbstats")
library(tidyverse)
# source("Summary Board/utils.R", local = T)
# Function to download timeseries data on covid-19 from github page of John Hopkins CSSEGIS
downloadGithubData <- function() {
base_url <- "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_... |
library(assertive.data.uk)
### Name: assert_all_are_uk_national_insurance_numbers
### Title: Is the string a valid UK national insurance number?
### Aliases: assert_all_are_uk_national_insurance_numbers
### assert_any_are_uk_national_insurance_numbers
### is_uk_national_insurance_number
### ** Examples
ni_numbe... | /data/genthat_extracted_code/assertive.data.uk/examples/is_uk_national_insurance_number.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,316 | r | library(assertive.data.uk)
### Name: assert_all_are_uk_national_insurance_numbers
### Title: Is the string a valid UK national insurance number?
### Aliases: assert_all_are_uk_national_insurance_numbers
### assert_any_are_uk_national_insurance_numbers
### is_uk_national_insurance_number
### ** Examples
ni_numbe... |
p <- qplot(mpg, cyl, data=mtcars, size=cyl)
p + scale_x_discrete(name ="Dose (mg)",
limits=c(LETTERS[1:35]))
p + scale_size("number\nof\ncylinders")
p + scale_size(to = c(0, 10))
p + scale_size(to = c(1, 2))
# Map area, instead of width/radius
# Perceptually, this is a little better
p + scale_ar... | /play.R | no_license | ntabgoba/WholeFuku | R | false | false | 1,210 | r | p <- qplot(mpg, cyl, data=mtcars, size=cyl)
p + scale_x_discrete(name ="Dose (mg)",
limits=c(LETTERS[1:35]))
p + scale_size("number\nof\ncylinders")
p + scale_size(to = c(0, 10))
p + scale_size(to = c(1, 2))
# Map area, instead of width/radius
# Perceptually, this is a little better
p + scale_ar... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ee_check.R
\name{ee_check-tools}
\alias{ee_check-tools}
\alias{ee_check}
\alias{ee_check_python}
\alias{ee_check_rgee_python_packages}
\alias{ee_check_drivers}
\alias{ee_check_credentials}
\alias{ee_install_drivers}
\alias{ee_install_rgee_pyt... | /man/ee_check-tools.Rd | permissive | percyelbis/rgee | R | false | true | 1,837 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ee_check.R
\name{ee_check-tools}
\alias{ee_check-tools}
\alias{ee_check}
\alias{ee_check_python}
\alias{ee_check_rgee_python_packages}
\alias{ee_check_drivers}
\alias{ee_check_credentials}
\alias{ee_install_drivers}
\alias{ee_install_rgee_pyt... |
# JAMES HYER SOLEY
# MATH 504 NUMERICAL METHODS
# 4/19/2015
# HOMEWORK #12
# QUESTION #2
# PART A
# CREATE MATRICES
set.seed(3)
A = matrix(sample(seq(100:999),4),2,2)
B = matrix(sample(c(-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9),4),2,2)
C = matrix(sample(seq(100:999)*-1,4),2,2)
Z = matrix(c(0,0,0,0),2,2)
M1 = cb... | /HW#12.R | no_license | soleyjh/Math_504 | R | false | false | 4,093 | r | # JAMES HYER SOLEY
# MATH 504 NUMERICAL METHODS
# 4/19/2015
# HOMEWORK #12
# QUESTION #2
# PART A
# CREATE MATRICES
set.seed(3)
A = matrix(sample(seq(100:999),4),2,2)
B = matrix(sample(c(-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9),4),2,2)
C = matrix(sample(seq(100:999)*-1,4),2,2)
Z = matrix(c(0,0,0,0),2,2)
M1 = cb... |
test = function(){
print("Hello, world! Again! And again!")
}
| /testing.r | no_license | magentalab/personalization-models | R | false | false | 64 | r | test = function(){
print("Hello, world! Again! And again!")
}
|
# NIR FGM: Variable Importance Selection - Honeycrisp, Random Forest
# author: Jimmy Larson
# created: 10.12.21
# last edited: 10.12.21
## load packages----
library(tidyverse)
library(caret)
library(randomForest)
library(cowplot)
## set seed----
set.seed(123)
## read in data-----
meas1Smoted <- read_csv("data/2021/hon... | /code/2021/honeycrisp/RF_model_variable_selection.R | no_license | LarsonJimmy/NIR_FGM | R | false | false | 18,228 | r | # NIR FGM: Variable Importance Selection - Honeycrisp, Random Forest
# author: Jimmy Larson
# created: 10.12.21
# last edited: 10.12.21
## load packages----
library(tidyverse)
library(caret)
library(randomForest)
library(cowplot)
## set seed----
set.seed(123)
## read in data-----
meas1Smoted <- read_csv("data/2021/hon... |
power <- read.csv("household_power_consumption.txt", na.strings = "?", sep = ";")
dataofinterest <- subset(power, Date == "1/2/2007" | Date == "2/2/2007")
timeanddate <- paste(as.Date(dataofinterest$Date, format="%d/%m/%Y"),dataofinterest$Time, sep = " ")
goodtimeanddate <- strptime(timeanddate[1:2880], format="%Y-%... | /plot2.R | no_license | JohnPlaxco/ExData_Plotting1 | R | false | false | 571 | r | power <- read.csv("household_power_consumption.txt", na.strings = "?", sep = ";")
dataofinterest <- subset(power, Date == "1/2/2007" | Date == "2/2/2007")
timeanddate <- paste(as.Date(dataofinterest$Date, format="%d/%m/%Y"),dataofinterest$Time, sep = " ")
goodtimeanddate <- strptime(timeanddate[1:2880], format="%Y-%... |
####### MAIN
#' extracts features from tremor task handToNose accelerometer and gyroscope JSON data file
#'
#'
#' @param tremorJsonFileLoc path to tremor accelerometer json file
#' @return data frame of tremor features
#' @export
#' @examples
#' @author Thanneer Malai Perumal, Meghasyam Tummalacherla
getKineticTremorF... | /R/getKineticTremorFeatures.R | no_license | Sage-Bionetworks/mpowertools | R | false | false | 10,489 | r | ####### MAIN
#' extracts features from tremor task handToNose accelerometer and gyroscope JSON data file
#'
#'
#' @param tremorJsonFileLoc path to tremor accelerometer json file
#' @return data frame of tremor features
#' @export
#' @examples
#' @author Thanneer Malai Perumal, Meghasyam Tummalacherla
getKineticTremorF... |
pollutantMean <- function(directory, pollutant, id = 1:332) {
if(id[1] < 10){
CompDataFrame <- read.csv(paste(directory,"/00",id[1],".csv", sep=""))
}
else if(id[1] < 100){
CompDataFrame <- read.csv(paste(directory,"/0",id[1],".csv", sep=""))
}
else {
CompDataFrame <- read.csv(paste(directory,"/",... | /pollutantmean.R | permissive | kjsalchow/datasciencecoursera | R | false | false | 848 | r | pollutantMean <- function(directory, pollutant, id = 1:332) {
if(id[1] < 10){
CompDataFrame <- read.csv(paste(directory,"/00",id[1],".csv", sep=""))
}
else if(id[1] < 100){
CompDataFrame <- read.csv(paste(directory,"/0",id[1],".csv", sep=""))
}
else {
CompDataFrame <- read.csv(paste(directory,"/",... |
# Check what prices are not in the filehash and report ....
#
#
# Written by Adrian Dragulescu on 6-Mar-2008
################################################################################
# External Libraries
#
source("H:/user/R/RMG/Utilities/RLogger.R")
source("H:/user/R/RMG/Utilities/sendemail.R")
source("H:/user... | /R Extension/RMG/Energy/VaR/Overnight/PRICE_FILEHASH_CHECK.R | no_license | uhasan1/QLExtension-backup | R | false | false | 2,315 | r | # Check what prices are not in the filehash and report ....
#
#
# Written by Adrian Dragulescu on 6-Mar-2008
################################################################################
# External Libraries
#
source("H:/user/R/RMG/Utilities/RLogger.R")
source("H:/user/R/RMG/Utilities/sendemail.R")
source("H:/user... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Graphics.R
\name{scale_fill_Publication}
\alias{scale_fill_Publication}
\title{Set the fills for all the ggplots}
\usage{
scale_fill_Publication()
}
\description{
This standardises the fills for any ggplot plot produced.
If you do use it, lik... | /man/scale_fill_Publication.Rd | permissive | ropensci/EndoMineR | R | false | true | 655 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Graphics.R
\name{scale_fill_Publication}
\alias{scale_fill_Publication}
\title{Set the fills for all the ggplots}
\usage{
scale_fill_Publication()
}
\description{
This standardises the fills for any ggplot plot produced.
If you do use it, lik... |
#Vector
print("Hello World")
str <- "Hello"
print(str)
#colon (:) Operator
1:4 + 1:4
#Adding
c(1,2,3,4)+c(1,2,3,4)
#Boolean
A <- TRUE
print(A)
print(class(A))
#Number
B <- 123
print(class(B))
#Integer
C <- 123L
print(class(C))
#Character
D <- "Hello"
print(class(D))
#Raw
E <- charToRaw("Hello")
print(E)
#Use o... | /Vectors.R | no_license | mehaktawakley/R-Programming | R | false | false | 855 | r | #Vector
print("Hello World")
str <- "Hello"
print(str)
#colon (:) Operator
1:4 + 1:4
#Adding
c(1,2,3,4)+c(1,2,3,4)
#Boolean
A <- TRUE
print(A)
print(class(A))
#Number
B <- 123
print(class(B))
#Integer
C <- 123L
print(class(C))
#Character
D <- "Hello"
print(class(D))
#Raw
E <- charToRaw("Hello")
print(E)
#Use o... |
inferCopulaFactorModel <- function (Y, Lambda = diag(ncol(Y)), trueSigma = NULL, nsamp = 100, rand.start = F,
odens = max(1, round(nsamp/1000)), impute = any(is.na(Y)),
plugin.threshold = 20, plugin.marginal = (apply(Y, 2, function(x) {
... | /R/inferCopulaFactorModel.R | no_license | cuiruifei/CopulaFactorModel | R | false | false | 6,893 | r | inferCopulaFactorModel <- function (Y, Lambda = diag(ncol(Y)), trueSigma = NULL, nsamp = 100, rand.start = F,
odens = max(1, round(nsamp/1000)), impute = any(is.na(Y)),
plugin.threshold = 20, plugin.marginal = (apply(Y, 2, function(x) {
... |
install.packages('quantmod')
library(quantmod)
install.packages('TTR')
library(TTR)
| /installQuantmod.R | no_license | emmanuelol/BMV1 | R | false | false | 84 | r | install.packages('quantmod')
library(quantmod)
install.packages('TTR')
library(TTR)
|
#' Distinct elements of a list
#'
#' \code{distinct} takes a list of integer vectors and
#' returns the list indices that contain unique combinations
#' of elements. This function is NOT robust against misuse,
#' so please use properly.
#'
#' Assume that \code{k} is the largest integer value in
#' \code{x}. A... | /R/distinct.R | no_license | cran/smerc | R | false | false | 1,614 | r | #' Distinct elements of a list
#'
#' \code{distinct} takes a list of integer vectors and
#' returns the list indices that contain unique combinations
#' of elements. This function is NOT robust against misuse,
#' so please use properly.
#'
#' Assume that \code{k} is the largest integer value in
#' \code{x}. A... |
library(deldir)
library(ggplot2)
args = commandArgs(trailingOnly=TRUE)
if (length(args)==0) {
stop("Missing argument for input file.", call.=FALSE)
}
r = read.table(file=args[1], header=FALSE, skip=2, col.names=c("fcv","x","y","cls"))
r$cls = factor(r$cls)
sel = 1 + as.integer(scan(file="sel/tmp.csv", what="int", ... | /utilities/subsets/PlotVoronoi.R | no_license | afloresv/nnc | R | false | false | 1,056 | r | library(deldir)
library(ggplot2)
args = commandArgs(trailingOnly=TRUE)
if (length(args)==0) {
stop("Missing argument for input file.", call.=FALSE)
}
r = read.table(file=args[1], header=FALSE, skip=2, col.names=c("fcv","x","y","cls"))
r$cls = factor(r$cls)
sel = 1 + as.integer(scan(file="sel/tmp.csv", what="int", ... |
#' ---
#' title: "Use Case K-means"
#' author: "Dietmar H. and Fabian P."
#' date: "Aug 2019"
#' ---
#+ dummy, include=FALSE
# github_document: default
# html_document: default
# pdf_document: default
#+ global_options, include = FALSE
knitr::opts_chunk$set(eval = TRUE)
#setwd(dirname(rstudioapi::getActiv... | /k-means.R | no_license | boehm-florian/K-means | R | false | false | 14,134 | r | #' ---
#' title: "Use Case K-means"
#' author: "Dietmar H. and Fabian P."
#' date: "Aug 2019"
#' ---
#+ dummy, include=FALSE
# github_document: default
# html_document: default
# pdf_document: default
#+ global_options, include = FALSE
knitr::opts_chunk$set(eval = TRUE)
#setwd(dirname(rstudioapi::getActiv... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_folds.R
\name{check_folds}
\alias{check_folds}
\title{Check Folds}
\usage{
check_folds(data.set, cName, fold.info)
}
| /man/check_folds.Rd | no_license | ntyndall/mltools | R | false | true | 201 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_folds.R
\name{check_folds}
\alias{check_folds}
\title{Check Folds}
\usage{
check_folds(data.set, cName, fold.info)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nycsociodemo.R
\docType{data}
\name{nycsociodemo}
\alias{nycsociodemo}
\title{NYC Education and Sociodemographics}
\format{
An sf data frame with 2,166 rows, 114 variables, and a geometry column:
\describe{
\item{ carto_id }{ Carto unique ID... | /man/nycsociodemo.Rd | permissive | spatialanalysis/geodaData | R | false | true | 8,255 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nycsociodemo.R
\docType{data}
\name{nycsociodemo}
\alias{nycsociodemo}
\title{NYC Education and Sociodemographics}
\format{
An sf data frame with 2,166 rows, 114 variables, and a geometry column:
\describe{
\item{ carto_id }{ Carto unique ID... |
#distribution of bugs across topics for ones assigned which were not in fixed category
library(lda)
library(ggplot2)
library(reshape2)
library(tm)
library(SnowballC)
library(RMySQL)
library(stringr)
drv=dbDriver("MySQL")
con=dbConnect(drv,dbname='bug_report',user='root')
stat0="select report_id,timestamp,what from upda... | /productreassignmentsmoz.R | no_license | suparna-ghanvatkar/bug_lda | R | false | false | 1,175 | r | #distribution of bugs across topics for ones assigned which were not in fixed category
library(lda)
library(ggplot2)
library(reshape2)
library(tm)
library(SnowballC)
library(RMySQL)
library(stringr)
drv=dbDriver("MySQL")
con=dbConnect(drv,dbname='bug_report',user='root')
stat0="select report_id,timestamp,what from upda... |
library(shiny)
library(ggplot2)
library(ggmap)
library(leaflet)
shinyServer(function(input, output) {
artcoord <- read.table('artemisia_californica_occurrances.txt',
header = T,
sep = ",")
names(artcoord)[3:4] <- c("lat", "long")
fires = read.table('opt... | /server.R | no_license | ClimateActionUCI/Team-Optimus-Prime | R | false | false | 1,609 | r | library(shiny)
library(ggplot2)
library(ggmap)
library(leaflet)
shinyServer(function(input, output) {
artcoord <- read.table('artemisia_californica_occurrances.txt',
header = T,
sep = ",")
names(artcoord)[3:4] <- c("lat", "long")
fires = read.table('opt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.kinesisanalyticsv2_operations.R
\name{add_application_input_processing_configuration}
\alias{add_application_input_processing_configuration}
\title{Adds an InputProcessingConfiguration to an SQL-based Kinesis Data Analytics application}
... | /service/paws.kinesisanalyticsv2/man/add_application_input_processing_configuration.Rd | permissive | CR-Mercado/paws | R | false | true | 1,874 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.kinesisanalyticsv2_operations.R
\name{add_application_input_processing_configuration}
\alias{add_application_input_processing_configuration}
\title{Adds an InputProcessingConfiguration to an SQL-based Kinesis Data Analytics application}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-tile-rast.R
\name{geom_tile_rast}
\alias{geom_tile_rast}
\title{This geom is similar to \code{\link[ggplot2]{geom_tile}}, but creates a raster layer}
\usage{
geom_tile_rast(
...,
raster.dpi = getOption("ggrastr.default.dpi", 300),
... | /man/geom_tile_rast.Rd | permissive | jan-glx/ggrastr | R | false | true | 1,641 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-tile-rast.R
\name{geom_tile_rast}
\alias{geom_tile_rast}
\title{This geom is similar to \code{\link[ggplot2]{geom_tile}}, but creates a raster layer}
\usage{
geom_tile_rast(
...,
raster.dpi = getOption("ggrastr.default.dpi", 300),
... |
library(shiny)
library(plotly)
df <- read.csv("Data.csv", stringsAsFactors = FALSE)
df$Year <- as.Date(ISOdate(df$Year,12,31))
shinyUI (fluidPage(
titlePanel("Oman Education Statistics"),
sidebarLayout(
sidebarPanel(
helpText("This application will hel... | /ui.R | no_license | Fadeela/EduStat | R | false | false | 2,539 | r | library(shiny)
library(plotly)
df <- read.csv("Data.csv", stringsAsFactors = FALSE)
df$Year <- as.Date(ISOdate(df$Year,12,31))
shinyUI (fluidPage(
titlePanel("Oman Education Statistics"),
sidebarLayout(
sidebarPanel(
helpText("This application will hel... |
"segIBD"<-function(files, map, minSNP=20, minL=1.0, unitP="Mb", unitL="Mb", a=0.0, keep=NULL, skip=NA, cskip=NA, cores=1){
##################################################
# Convert data tables to data frames #
##################################################
mapAsDataTable <- "data.table"... | /fuzzedpackages/optiSel/R/segIBD.R | no_license | akhikolla/testpackages | R | false | false | 5,541 | r |
"segIBD"<-function(files, map, minSNP=20, minL=1.0, unitP="Mb", unitL="Mb", a=0.0, keep=NULL, skip=NA, cskip=NA, cores=1){
##################################################
# Convert data tables to data frames #
##################################################
mapAsDataTable <- "data.table"... |
#Region "Microsoft.ROpen::0f45f7fe6c882771617e79125cc4f0ee, zzz.R"
# Summaries:
# cluster.cores <- function(cores = NULL) {...
# .onLoad <- function(libname, pkgname) {...
#End Region
#' Get/Set cluster cores for metaDNA iteration
#'
cluster.cores <- function(cores = NULL) {
anonymous <- "metaDNA_cl... | /Rscript/R/MetaDNA/R/zzz.R | permissive | xieguigang/mzkit | R | false | false | 1,891 | r | #Region "Microsoft.ROpen::0f45f7fe6c882771617e79125cc4f0ee, zzz.R"
# Summaries:
# cluster.cores <- function(cores = NULL) {...
# .onLoad <- function(libname, pkgname) {...
#End Region
#' Get/Set cluster cores for metaDNA iteration
#'
cluster.cores <- function(cores = NULL) {
anonymous <- "metaDNA_cl... |
# This file was created by `documentation::extract_tests` on 2018-04-30 09:40:02.
# Once present, this file will not be overwritten and changes will persist.
# To recreate the default version of this file delete and rerun `extract_tests`.
library(testthat)
test_check("short")
| /tests/testthat.R | permissive | halpo/short | R | false | false | 277 | r | # This file was created by `documentation::extract_tests` on 2018-04-30 09:40:02.
# Once present, this file will not be overwritten and changes will persist.
# To recreate the default version of this file delete and rerun `extract_tests`.
library(testthat)
test_check("short")
|
\name{predict.agelme}
\alias{predict.agelme}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ Predicts the Calibrated age }
\description{
This function uses the output from 'agelme' to predict the Calibrated ages for specified depths.
}
\usage{
\method{predict}{agelme}(object, v = 1, depth,...)
... | /man/predict.agelme.Rd | no_license | cran/palaeoSig | R | false | false | 1,635 | rd | \name{predict.agelme}
\alias{predict.agelme}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ Predicts the Calibrated age }
\description{
This function uses the output from 'agelme' to predict the Calibrated ages for specified depths.
}
\usage{
\method{predict}{agelme}(object, v = 1, depth,...)
... |
# Reading all the train and test files into dataframes
X.train <- read.table("train/X_train.txt")
Y.train <- read.table("train/y_train.txt")
Subject.train <- read.table("train/subject_train.txt")
X.test <- read.table("test/X_test.txt")
Y.test <- read.table("test/y_test.txt")
Subject.test <- read.table("test/subject_tes... | /run_analysis.R | no_license | adityagadgil/accelerometeranalysis | R | false | false | 1,542 | r | # Reading all the train and test files into dataframes
X.train <- read.table("train/X_train.txt")
Y.train <- read.table("train/y_train.txt")
Subject.train <- read.table("train/subject_train.txt")
X.test <- read.table("test/X_test.txt")
Y.test <- read.table("test/y_test.txt")
Subject.test <- read.table("test/subject_tes... |
../../../../System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/ControlDefinitions.r | /MacOSX10.2.8.sdk/Developer/Headers/CFMCarbon/HIToolbox/ControlDefinitions.r | no_license | alexey-lysiuk/macos-sdk | R | false | false | 114 | r | ../../../../System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/ControlDefinitions.r |
#' @include joinMicroSaplings.R
#' @include joinLocEvent.R
#' @title sumSapDBHDist: calculates DBH distribution of saplings
#'
#' @importFrom dplyr arrange between case_when filter group_by mutate select summarize
#' @importFrom magrittr %>%
#' @importFrom stringr str_sub
#'
#' @description This function calculates DBH... | /R/sumSapDBHDist.R | permissive | KateMMiller/forestNETN | R | false | false | 9,198 | r | #' @include joinMicroSaplings.R
#' @include joinLocEvent.R
#' @title sumSapDBHDist: calculates DBH distribution of saplings
#'
#' @importFrom dplyr arrange between case_when filter group_by mutate select summarize
#' @importFrom magrittr %>%
#' @importFrom stringr str_sub
#'
#' @description This function calculates DBH... |
################################################################################
################## get CPM model results for data with 1 cp ####################
################################################################################
setwd("C:/Users/Yuyu/Dropbox/7.6 HMM project/data")
### import the sour... | /ModelCompare_1cp_CPM.R | no_license | fanyuyu/scale_drift_quality_control | R | false | false | 5,904 | r | ################################################################################
################## get CPM model results for data with 1 cp ####################
################################################################################
setwd("C:/Users/Yuyu/Dropbox/7.6 HMM project/data")
### import the sour... |
#!/usr/bin/env Rscript
###################################################################
# ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ #
###################################################################
###################################################################
# This script is an alt... | /utils/cortCon2.R | permissive | PennLINC/xcpEngine | R | false | false | 4,212 | r | #!/usr/bin/env Rscript
###################################################################
# ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ ⊗ #
###################################################################
###################################################################
# This script is an alt... |
#
# Quiz 7
#
# Quetion 2
library(splines)
library(medley)
set.seed(53535)
xValues = seq(0,2*pi,length=100)
yValues = rnorm(100) + sin(xValues)
for (i in 1:10) {
ns1 <- ns(yValues, df=i)
lm1 <- lm(yValues ~ ns1)
print(sprintf('DF: %02d %.20f', i, rmse(yValues, lm1$fitted)))
}
# question 3
library(simpleboo... | /Quiz7.R | no_license | vsaulys/DataAnalysisCourse | R | false | false | 1,858 | r | #
# Quiz 7
#
# Quetion 2
library(splines)
library(medley)
set.seed(53535)
xValues = seq(0,2*pi,length=100)
yValues = rnorm(100) + sin(xValues)
for (i in 1:10) {
ns1 <- ns(yValues, df=i)
lm1 <- lm(yValues ~ ns1)
print(sprintf('DF: %02d %.20f', i, rmse(yValues, lm1$fitted)))
}
# question 3
library(simpleboo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paragraphs_scrap.R
\name{paragraphs_scrap}
\alias{paragraphs_scrap}
\title{Website text paragraph scraping}
\usage{
paragraphs_scrap(link, contain = NULL, collapse = FALSE, askRobot = FALSE)
}
\arguments{
\item{link}{the link of the web page ... | /man/paragraphs_scrap.Rd | permissive | romainfrancois/ralger | R | false | true | 952 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paragraphs_scrap.R
\name{paragraphs_scrap}
\alias{paragraphs_scrap}
\title{Website text paragraph scraping}
\usage{
paragraphs_scrap(link, contain = NULL, collapse = FALSE, askRobot = FALSE)
}
\arguments{
\item{link}{the link of the web page ... |
#' @include translate-sql-conditional.R
#' @include translate-sql-window.R
#' @include translate-sql-helpers.R
#' @include translate-sql-paste.R
#' @include translate-sql-string.R
#' @include translate-sql-quantile.R
#' @include escape.R
#' @include sql.R
#' @include utils.R
NULL
#' @export
sql_translate_env.DBIConnec... | /R/backend-.R | permissive | rjpat/dbplyr | R | false | false | 14,647 | r | #' @include translate-sql-conditional.R
#' @include translate-sql-window.R
#' @include translate-sql-helpers.R
#' @include translate-sql-paste.R
#' @include translate-sql-string.R
#' @include translate-sql-quantile.R
#' @include escape.R
#' @include sql.R
#' @include utils.R
NULL
#' @export
sql_translate_env.DBIConnec... |
context('elicit_prior')
test_that("elicit_prior works", {
set.seed(1)
prior_par <- list(mu_psi = -0.4, sigma_psi = 1.2,
mu_beta = 0.2, sigma_beta = 0.6)
probs <- c(.25, .5, .75)
whats <- c("logor", "or", "rrisk", "arisk")
hypotheses <- c("H1", "H+", "H-")
for (what in whats) {
f... | /abtest/tests/testthat/test-elicit_prior.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 983 | r | context('elicit_prior')
test_that("elicit_prior works", {
set.seed(1)
prior_par <- list(mu_psi = -0.4, sigma_psi = 1.2,
mu_beta = 0.2, sigma_beta = 0.6)
probs <- c(.25, .5, .75)
whats <- c("logor", "or", "rrisk", "arisk")
hypotheses <- c("H1", "H+", "H-")
for (what in whats) {
f... |
###########################################################################
# Copyright 2008-2012 Janssen Research & Development, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | /web-app/Rscripts/PCA/LoadPCA.R | permissive | tranSMART-RC/Rmodules | R | false | false | 11,694 | r | ###########################################################################
# Copyright 2008-2012 Janssen Research & Development, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... |
### UI code for the 'Create Ensemble Predictions' tab
ui.createEns <- function() {
tabItem(
tabName = "createEns",
conditionalPanel("output.ens_display_flag == false", ui.notice.no.pred.overlaid()),
conditionalPanel(
condition = "output.ens_display_flag",
#############################... | /inst/shiny/ui_files/ui_3_createEns.R | no_license | cran/eSDM | R | false | false | 25,937 | r | ### UI code for the 'Create Ensemble Predictions' tab
ui.createEns <- function() {
tabItem(
tabName = "createEns",
conditionalPanel("output.ens_display_flag == false", ui.notice.no.pred.overlaid()),
conditionalPanel(
condition = "output.ens_display_flag",
#############################... |
############################
## Regularized Regression ##
############################
library(ElemStatLearn)
data(prostate)
str(prostate)
covnames <- names(prostate[-(9:10)])
y <- prostate$lpsa
x <- prostate[,covnames]
form <- as.formula(paste("lpsa~", paste(covnames, collapse="+"), sep=""))
summary(lm(form, data=p... | /Practical_Machine_Learning/Notes/regularized_regression.R | no_license | fentontaylor/CourseraDataScience | R | false | false | 2,836 | r | ############################
## Regularized Regression ##
############################
library(ElemStatLearn)
data(prostate)
str(prostate)
covnames <- names(prostate[-(9:10)])
y <- prostate$lpsa
x <- prostate[,covnames]
form <- as.formula(paste("lpsa~", paste(covnames, collapse="+"), sep=""))
summary(lm(form, data=p... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 41902
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 41902
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query08_query03_1344/query08_query03_1344.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 717 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 41902
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 41902
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4... |
library(corrplot)
library(qgraph)
marathon <- read.csv("MarathonData.csv")
km4week <- marathon$km4week
marathonTime <- marathon$MarathonTime
speed4week <-marathon$sp4week
diff <- marathon$Wall21
grades <- read.csv("nyc_school_explorer_refined.csv")
attendance <- grades$Student.Attendance.Rate
absent <- grades$Percent... | /Lab3.R | no_license | ksush23/Lab-correlation-analysis | R | false | false | 3,805 | r | library(corrplot)
library(qgraph)
marathon <- read.csv("MarathonData.csv")
km4week <- marathon$km4week
marathonTime <- marathon$MarathonTime
speed4week <-marathon$sp4week
diff <- marathon$Wall21
grades <- read.csv("nyc_school_explorer_refined.csv")
attendance <- grades$Student.Attendance.Rate
absent <- grades$Percent... |
# Don A Moore, Samuel A Swift, Zachariah S Sharek, Francesca Gino (2010)
# Correspondence Bias in Performance Evaluation: Why Grade Inflation Works
# Personality and Social Psychology Bulletin 36 (6) p.843-852
#clean slate
rm(list=ls())
#load libraries
library(reshape2)
library(psych)
####Experiment 1 (Project Code:... | /SCSC3 Analysis.R | no_license | swiftsam/AcademicResearch | R | false | false | 3,349 | r | # Don A Moore, Samuel A Swift, Zachariah S Sharek, Francesca Gino (2010)
# Correspondence Bias in Performance Evaluation: Why Grade Inflation Works
# Personality and Social Psychology Bulletin 36 (6) p.843-852
#clean slate
rm(list=ls())
#load libraries
library(reshape2)
library(psych)
####Experiment 1 (Project Code:... |
c# UI for Mass Spec Data Visulization
# Geoffrey F. Schau
# Layout Description
# - input field for GO term
# - radio button for x-variable
# - radio button for y-variable
library(shiny)
fluidPage(
titlePanel('Mass Spec Visualization Tool'),
sidebarLayout(
sidebarPanel(
fileInput('dataFile','Select D... | /ui.R | no_license | schaugf/massSpecShinyViewer | R | false | false | 684 | r | c# UI for Mass Spec Data Visulization
# Geoffrey F. Schau
# Layout Description
# - input field for GO term
# - radio button for x-variable
# - radio button for y-variable
library(shiny)
fluidPage(
titlePanel('Mass Spec Visualization Tool'),
sidebarLayout(
sidebarPanel(
fileInput('dataFile','Select D... |
### Regression (Subset selection)
### Needed package and datasets
library(ISLR)
attach(Carseats)
Carseats=na.omit(Carseats) # Get rid of NAs
install.packages("leaps")
library(leaps)
##### Searching all subset models up to size 8 by default
regfit.full=regsubsets(Sales~.,data=Carseats)
summary(regfit.full)
##### Searc... | /Assignment2/Examples and Case studies/Regression_Carseats.R | no_license | voraankur/ADS_Assignment1 | R | false | false | 1,085 | r | ### Regression (Subset selection)
### Needed package and datasets
library(ISLR)
attach(Carseats)
Carseats=na.omit(Carseats) # Get rid of NAs
install.packages("leaps")
library(leaps)
##### Searching all subset models up to size 8 by default
regfit.full=regsubsets(Sales~.,data=Carseats)
summary(regfit.full)
##### Searc... |
#Install bsaR package
remotes::install_github("xuzhougeng/bsaR")
#Load additional packages
library(vcfR)
library(bsaR)
#Store vcf file name
vcf.file <- "dataset2.vcf"
#Choose which chromosomes will be included in the analysis
Chroms <- paste0(rep("SL4.0ch0", 9), 1:9)
Chroms <- append(Chroms, paste0(rep(... | /Plots/existingTools/scripts/bsaR_ourData_ds2.R | permissive | ARose94/BSAvis_GP_2020 | R | false | false | 1,014 | r | #Install bsaR package
remotes::install_github("xuzhougeng/bsaR")
#Load additional packages
library(vcfR)
library(bsaR)
#Store vcf file name
vcf.file <- "dataset2.vcf"
#Choose which chromosomes will be included in the analysis
Chroms <- paste0(rep("SL4.0ch0", 9), 1:9)
Chroms <- append(Chroms, paste0(rep(... |
# METADATA ====
# Description: Wrangling data
# Created: 2019-06-30 (Neil Rankin)
# Last updated: 2019-06-30 (Neil Rankin)
# Last reviewed: NA
# SUMMARY: An introduction following https://r4ds.had.co.nz/transform.html
# INITIALISE ====
#> setup environment ----
options(digits=2)
#> additional libraries ----
libr... | /scripts/3_wrangling.R | no_license | neilrankinza/ix_cape_town_ds_2019_class_examples | R | false | false | 1,703 | r | # METADATA ====
# Description: Wrangling data
# Created: 2019-06-30 (Neil Rankin)
# Last updated: 2019-06-30 (Neil Rankin)
# Last reviewed: NA
# SUMMARY: An introduction following https://r4ds.had.co.nz/transform.html
# INITIALISE ====
#> setup environment ----
options(digits=2)
#> additional libraries ----
libr... |
################################################################################
## This software is in the public domain, furnished "as is", without technical
## support, and with no warranty, express or implied, as to its usefulness for
## any purpose.
##
## RunAll.R
#
# Launch all the scripts in the HBEF package
# ... | /Scripts/RunAll.R | no_license | littlefoxhome/hbef | R | false | false | 1,115 | r | ################################################################################
## This software is in the public domain, furnished "as is", without technical
## support, and with no warranty, express or implied, as to its usefulness for
## any purpose.
##
## RunAll.R
#
# Launch all the scripts in the HBEF package
# ... |
# Load data ---------------------------------------------------------------
source('./R/data_loading.R')
# Load libraries ----------------------------------------------------------
library(tidyverse)
library(rgdal)
replace_RSSI_strongweak <- T
remove_userID6_weird_signals <- T
normal_scaling <- T
# Replace variables... | /wifi/R/Triangulation/locate_WAPS.R | no_license | Taros007/ubiqum_projects | R | false | false | 2,709 | r | # Load data ---------------------------------------------------------------
source('./R/data_loading.R')
# Load libraries ----------------------------------------------------------
library(tidyverse)
library(rgdal)
replace_RSSI_strongweak <- T
remove_userID6_weird_signals <- T
normal_scaling <- T
# Replace variables... |
#' Construct sq object from character vector
#'
#' @templateVar alph_null_ok TRUE
#'
#' @description This function allows the user to construct objects of
#' \code{\link[=sq-class]{class sq}} from a character vector.
#'
#' @param x [\code{character}]\cr
#' Vector to construct \code{sq} object from.
#' @template alp... | /R/sq.R | no_license | minghao2016/tidysq | R | false | false | 10,517 | r | #' Construct sq object from character vector
#'
#' @templateVar alph_null_ok TRUE
#'
#' @description This function allows the user to construct objects of
#' \code{\link[=sq-class]{class sq}} from a character vector.
#'
#' @param x [\code{character}]\cr
#' Vector to construct \code{sq} object from.
#' @template alp... |
library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/pancreas.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.2,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/pancreas/pancreas_035.txt',appen... | /Model/EN/ReliefF/pancreas/pancreas_035.R | no_license | leon1003/QSMART | R | false | false | 357 | r | library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/pancreas.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.2,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/pancreas/pancreas_035.txt',appen... |
# ==============================================================================
# Functions for retrieving current values for visual properties.
#
# I. General functions for getting node, edge and network properties
# II. Specific functions for getting particular node, edge and network properties
#
# =================... | /R/StyleValues.R | permissive | cytoscape/RCy3 | R | false | false | 19,381 | r | # ==============================================================================
# Functions for retrieving current values for visual properties.
#
# I. General functions for getting node, edge and network properties
# II. Specific functions for getting particular node, edge and network properties
#
# =================... |
\name{rp.tables}
\alias{rp.tables}
\title{Interactive statistical tables}
\description{
This function launches a panel which allows standard normal, t, chi-squared and F distributions to be plotted, with interactive control of parameters, tail probability and p-value calculations.
}
\usage{
rp.tables(panel = TRUE... | /man/rp.tables.Rd | no_license | cran/rpanel | R | false | false | 3,165 | rd | \name{rp.tables}
\alias{rp.tables}
\title{Interactive statistical tables}
\description{
This function launches a panel which allows standard normal, t, chi-squared and F distributions to be plotted, with interactive control of parameters, tail probability and p-value calculations.
}
\usage{
rp.tables(panel = TRUE... |
### plotBrier.R ---
#----------------------------------------------------------------------
## author: Thomas Alexander Gerds
## created: Feb 23 2017 (11:07)
## Version:
## last-updated: Mar 5 2017 (14:44)
## By: Thomas Alexander Gerds
## Update #: 33
#------------------------------------------------... | /R/plotBrier.R | no_license | PablitoCho/riskRegression | R | false | false | 8,322 | r | ### plotBrier.R ---
#----------------------------------------------------------------------
## author: Thomas Alexander Gerds
## created: Feb 23 2017 (11:07)
## Version:
## last-updated: Mar 5 2017 (14:44)
## By: Thomas Alexander Gerds
## Update #: 33
#------------------------------------------------... |
library(tidyverse)
library(easystats)
library(ggeffects)
library(patchwork)
#read data and subset
mm <- read_csv("data/decomp_with_covar.csv") %>%
filter(trt %in% c("T", "C") &
!is.na(termite_exposure) &
species != "Simarouba_amara") %>%
mutate(date_diff_years = date_diff/365)
#get site leve... | /R/decay_models.R | permissive | Zanne-Lab/global_termite_microbe_wd | R | false | false | 7,012 | r | library(tidyverse)
library(easystats)
library(ggeffects)
library(patchwork)
#read data and subset
mm <- read_csv("data/decomp_with_covar.csv") %>%
filter(trt %in% c("T", "C") &
!is.na(termite_exposure) &
species != "Simarouba_amara") %>%
mutate(date_diff_years = date_diff/365)
#get site leve... |
library(shiny)
library(TOSTER)
#Create SGPV funtion from https://github.com/LucyMcGowan/sgpvalue/blob/master/R/p_delta.R
#' Second Generation P-value
p_delta <- function(lb, ub, delta_lb, delta_ub) {
# special case: infinite CI and H0 bounds in the same direction
if ((delta_lb == -Inf & lb == -Inf) | (delta_ub... | /TOST_vs_SGPV_app/app.R | no_license | Lakens/TOST_vs_SGPV | R | false | false | 6,877 | r | library(shiny)
library(TOSTER)
#Create SGPV funtion from https://github.com/LucyMcGowan/sgpvalue/blob/master/R/p_delta.R
#' Second Generation P-value
p_delta <- function(lb, ub, delta_lb, delta_ub) {
# special case: infinite CI and H0 bounds in the same direction
if ((delta_lb == -Inf & lb == -Inf) | (delta_ub... |
nei <- readRDS("data/summarySCC_PM25.rds")
scc <- readRDS("data/Source_Classification_Code.rds")
library('data.table')
library('ggplot2')
merged <- merge(nei, scc, by="SCC")
df <- data.table(merged)
# Filter records to those which contains the word 'coal' in Short.Name
coal <- grepl("coal", df$Short.Name, ignore.ca... | /plot4.R | no_license | olkarls/Exploratory-Data-Analysis-Course-Project-2 | R | false | false | 741 | r | nei <- readRDS("data/summarySCC_PM25.rds")
scc <- readRDS("data/Source_Classification_Code.rds")
library('data.table')
library('ggplot2')
merged <- merge(nei, scc, by="SCC")
df <- data.table(merged)
# Filter records to those which contains the word 'coal' in Short.Name
coal <- grepl("coal", df$Short.Name, ignore.ca... |
#' Get or set the directory of the BiocFileCache used by tximeta
#'
#' Running \code{getTximetaBFC} will report the saved directory,
#' if it has been determined, or will return NULL.
#' Running \code{setTximetaBFC} will ask the user to specify a
#' BiocFileCache directory for accessing and saving TxDb sqlite files.
#'... | /R/bfcLocation.R | no_license | ericblanc20/tximeta | R | false | false | 3,925 | r | #' Get or set the directory of the BiocFileCache used by tximeta
#'
#' Running \code{getTximetaBFC} will report the saved directory,
#' if it has been determined, or will return NULL.
#' Running \code{setTximetaBFC} will ask the user to specify a
#' BiocFileCache directory for accessing and saving TxDb sqlite files.
#'... |
#read that week's csv file into the environment
IL17_week_two_in_vivo <- read_csv("~/Dropbox/Tulane/You_lab/Metastasis_project/MPC3/Experiments/Orthotopic_luciferase_imaging/IL17_metastasis_study/DMC20171002095728/IL17_week_two_in_vivo.csv")
log_con_2_week_mean <- log(mean(IL17_week_two_in_vivo$`Avg Radiance [p/s/cm_/s... | /half_million_cell_experiment/2_week_post_inoculation_line_graph.R | no_license | davemc528/Metastasis_project | R | false | false | 1,453 | r | #read that week's csv file into the environment
IL17_week_two_in_vivo <- read_csv("~/Dropbox/Tulane/You_lab/Metastasis_project/MPC3/Experiments/Orthotopic_luciferase_imaging/IL17_metastasis_study/DMC20171002095728/IL17_week_two_in_vivo.csv")
log_con_2_week_mean <- log(mean(IL17_week_two_in_vivo$`Avg Radiance [p/s/cm_/s... |
#' @rdname synthesize
#' @title Synthesize Speech
#' @description Pass text to the synthesis API and return an audio file
#' @param text Either a plain text character string (maximum 1500 characters) or a character string containing SSML (\code{ssml} should be set to \code{TRUE}).
#' @param voice A character string spe... | /R/synthesize.R | no_license | cran/aws.polly | R | false | false | 2,267 | r | #' @rdname synthesize
#' @title Synthesize Speech
#' @description Pass text to the synthesis API and return an audio file
#' @param text Either a plain text character string (maximum 1500 characters) or a character string containing SSML (\code{ssml} should be set to \code{TRUE}).
#' @param voice A character string spe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/normaliseData.R
\name{normaliseData}
\alias{normaliseData}
\title{Apply normalisation on a data frame using specific Lambda value}
\usage{
normaliseData(dat, lambdas)
}
\arguments{
\item{dat}{a data frame containing the variables.}
... | /man/normaliseData.Rd | no_license | cran/normalr | R | false | true | 651 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/normaliseData.R
\name{normaliseData}
\alias{normaliseData}
\title{Apply normalisation on a data frame using specific Lambda value}
\usage{
normaliseData(dat, lambdas)
}
\arguments{
\item{dat}{a data frame containing the variables.}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/postlasso.R
\name{post_lasso}
\alias{post_lasso}
\title{post-selection estimation}
\usage{
post_lasso(x, y, coef.est, intercept = TRUE, scalex = FALSE)
}
\arguments{
\item{x}{Predictor matrix (n-by-p matrix)}
\item{y}{Response variable}
\it... | /man/post_lasso.Rd | no_license | zhan-gao/LasForecast | R | false | true | 627 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/postlasso.R
\name{post_lasso}
\alias{post_lasso}
\title{post-selection estimation}
\usage{
post_lasso(x, y, coef.est, intercept = TRUE, scalex = FALSE)
}
\arguments{
\item{x}{Predictor matrix (n-by-p matrix)}
\item{y}{Response variable}
\it... |
###There are two functions below, which are to cache inverse matrix without calculating repeatedly
## This is the first function that makes a special matrix
##The sepcial matrix is to cache inverse matrix
makeCacheMatrix <- function(x = matrix()) {
m<-NULL
set<-function(y){
x<<-y
m<<-NULL
}
get<-function()x... | /cachematrix.R | no_license | liujygithub/ProgrammingAssignment2 | R | false | false | 864 | r | ###There are two functions below, which are to cache inverse matrix without calculating repeatedly
## This is the first function that makes a special matrix
##The sepcial matrix is to cache inverse matrix
makeCacheMatrix <- function(x = matrix()) {
m<-NULL
set<-function(y){
x<<-y
m<<-NULL
}
get<-function()x... |
#First, go ahead and log into the spotify API
#today we will use the Weird Al example
Al<-search_spotify("Weird Al")
ABBA<-search_spotify("ABBA")
Drake<-search_spotify("Drake")
Drake$tracks$items$popularity
Drake$tracks$items$name
#take an unnested dataframe
song_level_lyrics_spotify<-function(x){
Z<-unite(x, id... | /music examples/spotifyextenders.R | no_license | dcfaltesek/team | R | false | false | 746 | r | #First, go ahead and log into the spotify API
#today we will use the Weird Al example
Al<-search_spotify("Weird Al")
ABBA<-search_spotify("ABBA")
Drake<-search_spotify("Drake")
Drake$tracks$items$popularity
Drake$tracks$items$name
#take an unnested dataframe
song_level_lyrics_spotify<-function(x){
Z<-unite(x, id... |
testlist <- list(A = structure(c(4.77830972673648e-299, 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, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), left = 0L, right = 0L, x = numeric(0))
result <- do.call(mgss:::MVP_normalfactor_rcpp,testlist)
str(result) | /mgss/inst/testfiles/MVP_normalfactor_rcpp/AFL_MVP_normalfactor_rcpp/MVP_normalfactor_rcpp_valgrind_files/1615949680-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 292 | r | testlist <- list(A = structure(c(4.77830972673648e-299, 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, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), left = 0L, right = 0L, x = numeric(0))
result <- do.call(mgss:::MVP_normalfactor_rcpp,testlist)
str(result) |
# install package
#install.packages("sqldf")
library(sqldf);
# Read only needed data
householdPower <- read.csv.sql("household_power_consumption.txt", sql="select * from file where Date in ('1/2/2007', '2/2/2007')", sep=";")
# Convert data type
householdPower$DT <- paste(householdPower$Date, householdPower$Time)
hou... | /plot2.R | no_license | KuanDu/ExData_Plotting1 | R | false | false | 575 | r | # install package
#install.packages("sqldf")
library(sqldf);
# Read only needed data
householdPower <- read.csv.sql("household_power_consumption.txt", sql="select * from file where Date in ('1/2/2007', '2/2/2007')", sep=";")
# Convert data type
householdPower$DT <- paste(householdPower$Date, householdPower$Time)
hou... |
rm(list=ls(all=TRUE))
source("gridWorld.R")
g = newGrid()
# set V0 to 0 for all states
v = matrix(0,nrow=10, ncol=10)
vUpdate = matrix(0,nrow=10, ncol=10)
# set delta to 0
delta = 0
gamma = .5
# repeat until convergence gamma=0.5
repeat
{
before <- norm(v)
for (i in 1:10){
for(j i... | /GridWorld/valueIt.R | no_license | jfgilman/ShinyGrid | R | false | false | 859 | r | rm(list=ls(all=TRUE))
source("gridWorld.R")
g = newGrid()
# set V0 to 0 for all states
v = matrix(0,nrow=10, ncol=10)
vUpdate = matrix(0,nrow=10, ncol=10)
# set delta to 0
delta = 0
gamma = .5
# repeat until convergence gamma=0.5
repeat
{
before <- norm(v)
for (i in 1:10){
for(j i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.