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 |
|---|---|---|---|---|---|---|---|---|---|
# Author : Moksha Menghaney
# Date : October 27th, 2020
# This piece of code will generate tract & zipcode level urban/suburban/rural classification
# for policy scan, files HS02
# It also generates county level % rurality metrics for policy scan which is stored
# in raw files folder for further processing.
library... | /code/ruralityRUCA_T_Z.R | no_license | sterlingfearing/opioid-policy-scan | R | false | false | 3,554 | r | # Author : Moksha Menghaney
# Date : October 27th, 2020
# This piece of code will generate tract & zipcode level urban/suburban/rural classification
# for policy scan, files HS02
# It also generates county level % rurality metrics for policy scan which is stored
# in raw files folder for further processing.
library... |
window_select_SI_calculation <-
function(workspace){
parameter<-c("Kw","ce","cd","ch","coef_mix_conv","coef_wind_stir","coef_mix_shear","coef_mix_turb","coef_mix_KH","coef_mix_hyp","seepage_rate","inflow_factor","outflow_factor","rain_factor","wind_factor")
win_SI <- gwindow("Calculate SI-value", width = 400, visib... | /R/window_select_SI_calculation.R | no_license | jsta/glmgui | R | false | false | 6,713 | r | window_select_SI_calculation <-
function(workspace){
parameter<-c("Kw","ce","cd","ch","coef_mix_conv","coef_wind_stir","coef_mix_shear","coef_mix_turb","coef_mix_KH","coef_mix_hyp","seepage_rate","inflow_factor","outflow_factor","rain_factor","wind_factor")
win_SI <- gwindow("Calculate SI-value", width = 400, visib... |
#' Skip to content
#' This repository
#' Search
#' Pull requests
#' Issues
#' Gist
#' @aptperson
#' Watch 282
#' Star 1,918
#' Fork 1,097 dmlc/xgboost
#' Code Issues 113 Pull requests 6 Wiki Pulse Graphs
#' Branch: master Find file Copy pathxgboost/R-package/R/utils.R
#' 4db3dfe 27 days ago
#' @hetong007 hetong... | /xgbHelpers.r | no_license | aptperson/telstra | R | false | false | 12,561 | r | #' Skip to content
#' This repository
#' Search
#' Pull requests
#' Issues
#' Gist
#' @aptperson
#' Watch 282
#' Star 1,918
#' Fork 1,097 dmlc/xgboost
#' Code Issues 113 Pull requests 6 Wiki Pulse Graphs
#' Branch: master Find file Copy pathxgboost/R-package/R/utils.R
#' 4db3dfe 27 days ago
#' @hetong007 hetong... |
library(quantmod)
library(xlsx) | /prophet.R | no_license | Bassem16/testR | R | false | false | 31 | r | library(quantmod)
library(xlsx) |
data <- read.csv(file.choose(),header=TRUE,na.string=".")
attach(data)
names(data)
data
treatment1 <- c(enter treatment 1 header)
treatment2 <- c(enter treatment 2 header)
mean(treatment1)
mean(treatment2)
se <- function(x) {sd(x,na.rm=TRUE)/sqrt(length(x))}
se(treatment1)
se(treatment2)
t.test(treatment2,treatment1, ... | /Rtemplate_t-test (1).R | no_license | ishika-patel/EvolutionaryBioCode | R | false | false | 333 | r | data <- read.csv(file.choose(),header=TRUE,na.string=".")
attach(data)
names(data)
data
treatment1 <- c(enter treatment 1 header)
treatment2 <- c(enter treatment 2 header)
mean(treatment1)
mean(treatment2)
se <- function(x) {sd(x,na.rm=TRUE)/sqrt(length(x))}
se(treatment1)
se(treatment2)
t.test(treatment2,treatment1, ... |
### Heatmap Sensitivity ====
# Authors: Quinn Webber, Michel Laforge, Maegwin Bonar, Chris Hart,
# Alec Robitaille, Sana Zabihi-Seissan, Eric Vander Wal
### Packages ----
libs <- c('raster', 'lme4', 'piecewiseSEM',
'data.table', 'ggplot2')
lapply(libs, require, character.only = TRUE)
### Set var... | /R/sensitivity/7.1-HeatmapSensitivity.R | no_license | wildlifeevoeco/MovingAcrossGradients | R | false | false | 4,596 | r | ### Heatmap Sensitivity ====
# Authors: Quinn Webber, Michel Laforge, Maegwin Bonar, Chris Hart,
# Alec Robitaille, Sana Zabihi-Seissan, Eric Vander Wal
### Packages ----
libs <- c('raster', 'lme4', 'piecewiseSEM',
'data.table', 'ggplot2')
lapply(libs, require, character.only = TRUE)
### Set var... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_functions.R
\name{targetHttpProxies.list}
\alias{targetHttpProxies.list}
\title{Retrieves the list of TargetHttpProxy resources available to the specified project.}
\usage{
targetHttpProxies.list(project, filter = NULL, maxResults = N... | /googlecomputev1.auto/man/targetHttpProxies.list.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 1,360 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_functions.R
\name{targetHttpProxies.list}
\alias{targetHttpProxies.list}
\title{Retrieves the list of TargetHttpProxy resources available to the specified project.}
\usage{
targetHttpProxies.list(project, filter = NULL, maxResults = N... |
library(scalpel)
### Name: reviewNeuronsInteractive
### Title: Manually classify the identified neurons from SCALPEL.
### Aliases: reviewNeuronsInteractive
### ** Examples
## Not run:
##D ### many of the functions in this package are interconnected so the
##D ### easiest way to learn to use the package is by worki... | /data/genthat_extracted_code/scalpel/examples/reviewNeuronsInteractive.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,069 | r | library(scalpel)
### Name: reviewNeuronsInteractive
### Title: Manually classify the identified neurons from SCALPEL.
### Aliases: reviewNeuronsInteractive
### ** Examples
## Not run:
##D ### many of the functions in this package are interconnected so the
##D ### easiest way to learn to use the package is by worki... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 21990
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 21990
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc05-uniform-dep... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/trafficlight-controller/tlc05-uniform-depth-23/tlc05-uniform-depth-23.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 685 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 21990
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 21990
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc05-uniform-dep... |
# script for making plots
# histogram of estimated # causal variants
dat<-read.table("path/to/output_1",header = T,sep="\t")
hist(dat$N_Causal,breaks=100,xlab = "# estimaed causal variants",main="")
# Posterior Probs distribution boxplots
# Pre Probs
dat<-read.table("path/to/output_2",header = T,sep="\t")
dat$N_Causa... | /04_making_plots.R | no_license | saorisakaue/SS_FINEMAP | R | false | false | 860 | r | # script for making plots
# histogram of estimated # causal variants
dat<-read.table("path/to/output_1",header = T,sep="\t")
hist(dat$N_Causal,breaks=100,xlab = "# estimaed causal variants",main="")
# Posterior Probs distribution boxplots
# Pre Probs
dat<-read.table("path/to/output_2",header = T,sep="\t")
dat$N_Causa... |
TwoSampleSeqCrossOver.Equivalence <-
function(alpha,beta,sigma,sequence,delta,margin){
n<-(qnorm(1-alpha)+qnorm(1-beta/2))^2*sigma/(sequence*(margin-abs(delta))^2)
n
}
| /R/TwoSampleSeqCrossOver.Equivalence.R | no_license | cran/TrialSize | R | false | false | 173 | r | TwoSampleSeqCrossOver.Equivalence <-
function(alpha,beta,sigma,sequence,delta,margin){
n<-(qnorm(1-alpha)+qnorm(1-beta/2))^2*sigma/(sequence*(margin-abs(delta))^2)
n
}
|
# define a function for Twitter Search
get_twitter<-function(input_str) {
## Read secret keys from a local file
myProp <- read.table(secretLoc,header=FALSE, sep="=", row.names=1, strip.white=TRUE, na.strings="NA", stringsAsFactors=FALSE)
TWITTER_API_KEY <- myProp["TWITTER_API_KEY",1]
TWITTER_API_SECRET <- myProp["TW... | /wordcloud.R | no_license | pietersv/pogo | R | false | false | 1,498 | r |
# define a function for Twitter Search
get_twitter<-function(input_str) {
## Read secret keys from a local file
myProp <- read.table(secretLoc,header=FALSE, sep="=", row.names=1, strip.white=TRUE, na.strings="NA", stringsAsFactors=FALSE)
TWITTER_API_KEY <- myProp["TWITTER_API_KEY",1]
TWITTER_API_SECRET <- myProp["TW... |
library(dplyr)
library(readr)
library(tibble)
library(sf)
# load geometry data
df_geom <- readr::read_delim("~/Projects/azmpdata/tmp/data/polygons/SS_coordinates.csv",
col_names=T, delim=",")
# load attributes data - id/names
df_attrib <- readr::read_delim("~/Projects/azmpdata/tmp/data/po... | /tmp/BC/R/SS_csv2sf.R | permissive | casaultb/azmpdata | R | false | false | 711 | r | library(dplyr)
library(readr)
library(tibble)
library(sf)
# load geometry data
df_geom <- readr::read_delim("~/Projects/azmpdata/tmp/data/polygons/SS_coordinates.csv",
col_names=T, delim=",")
# load attributes data - id/names
df_attrib <- readr::read_delim("~/Projects/azmpdata/tmp/data/po... |
library(ggtree)
library(tidyverse)
library(reshape2)
library(patchwork)
library(gdata)
setwd("~/Users/islekbro/Desktop/Rstudio/interactions/fzd-gα/")
preabDat <- read_csv("interactions_binary.csv")
#premat <- as.matrix(preabDat)
#rownames(premat) <- preabDat$X1
#premat <- premat[1:nrow(premat),2:ncol(premat)]
#matCi... | /fzd-g_alpha_interactions.R | no_license | islekburak/R-codes | R | false | false | 3,043 | r | library(ggtree)
library(tidyverse)
library(reshape2)
library(patchwork)
library(gdata)
setwd("~/Users/islekbro/Desktop/Rstudio/interactions/fzd-gα/")
preabDat <- read_csv("interactions_binary.csv")
#premat <- as.matrix(preabDat)
#rownames(premat) <- preabDat$X1
#premat <- premat[1:nrow(premat),2:ncol(premat)]
#matCi... |
\name{labeledHeatmap}
\alias{labeledHeatmap}
\title{ Produce a labeled heatmap plot }
\description{
Plots a heatmap plot with color legend, row and column annotation, and optional text within th heatmap.
}
\usage{
labeledHeatmap(
Matrix,
xLabels, yLabels = NULL,
xSymbols = NULL, ySymbols = NULL,
... | /man/labeledHeatmap.Rd | no_license | pdicarl3/WGCNA | R | false | false | 11,904 | rd | \name{labeledHeatmap}
\alias{labeledHeatmap}
\title{ Produce a labeled heatmap plot }
\description{
Plots a heatmap plot with color legend, row and column annotation, and optional text within th heatmap.
}
\usage{
labeledHeatmap(
Matrix,
xLabels, yLabels = NULL,
xSymbols = NULL, ySymbols = NULL,
... |
/ZirkoniumOld/AudioUnit/Zirk2.r | no_license | eriser/zirkonium | R | false | false | 3,657 | r | ||
## run_analysis.R - course assignment for Coursera Data Science - Getting and Cleaning Data
## 1. Merges the training and the test sets to create one data set.
###################################################################
## read x, y and subject TRAINING data
x_train <- read.table("./train/X_train.txt")
y_tra... | /run_analysis.R | no_license | jarmojam/getting_and_cleaning_data | R | false | false | 2,650 | r | ## run_analysis.R - course assignment for Coursera Data Science - Getting and Cleaning Data
## 1. Merges the training and the test sets to create one data set.
###################################################################
## read x, y and subject TRAINING data
x_train <- read.table("./train/X_train.txt")
y_tra... |
require(rjson)
require(readr)
require(tidyr)
require(dplyr)
require(magrittr)
require(stringr)
library(argparse)
parser = ArgumentParser(description = "return status json")
parser$add_argument(
"-s",
"--submission_file",
type = "character",
required = TRUE,
help = "submission file")
parser$add_ar... | /round1b/validate/bin/validate.R | permissive | allaway/IDG-DREAM-Drug-Kinase-Challenge | R | false | false | 6,010 | r | require(rjson)
require(readr)
require(tidyr)
require(dplyr)
require(magrittr)
require(stringr)
library(argparse)
parser = ArgumentParser(description = "return status json")
parser$add_argument(
"-s",
"--submission_file",
type = "character",
required = TRUE,
help = "submission file")
parser$add_ar... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Correlation/urinary_tract.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="mse",alpha=0.35,family="gaussian",standardize=TRUE)
sink('./urinary_tract_045.txt... | /Model/EN/Correlation/urinary_tract/urinary_tract_045.R | no_license | esbgkannan/QSMART | R | false | false | 364 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Correlation/urinary_tract.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="mse",alpha=0.35,family="gaussian",standardize=TRUE)
sink('./urinary_tract_045.txt... |
library(languageR)
### Name: makeSplineData.fnc
### Title: generate simulated data set with nonlinear function
### Aliases: makeSplineData.fnc
### Keywords: regression
### ** Examples
## Not run:
##D require("rms")
##D require("optimx")
##D require("lmerTest")
##D dfr = makeSplineData.fnc()
##D table(dfr$Subject)
... | /data/genthat_extracted_code/languageR/examples/makeSplineData.fnc.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,486 | r | library(languageR)
### Name: makeSplineData.fnc
### Title: generate simulated data set with nonlinear function
### Aliases: makeSplineData.fnc
### Keywords: regression
### ** Examples
## Not run:
##D require("rms")
##D require("optimx")
##D require("lmerTest")
##D dfr = makeSplineData.fnc()
##D table(dfr$Subject)
... |
shinyUI(
fluidPage(
includeHTML("documentation.html"),
sidebarPanel(
h4(strong("Filter by Node")),
uiOutput("nameUI"),
uiOutput("typeUI")
),
mainPanel(
... | /ui.R | no_license | dmd123/DDP_Project2 | R | false | false | 388 | r | shinyUI(
fluidPage(
includeHTML("documentation.html"),
sidebarPanel(
h4(strong("Filter by Node")),
uiOutput("nameUI"),
uiOutput("typeUI")
),
mainPanel(
... |
################################################################################
######################################### Configurações globais pacotes e pastas
################################################################################
#Limpa o ambiente
rm(list = ls())
#Configurações Gerais dos Dígitos
... | /Leitura_Dados.R | permissive | mairapinheiro/fractais | R | false | false | 6,090 | r | ################################################################################
######################################### Configurações globais pacotes e pastas
################################################################################
#Limpa o ambiente
rm(list = ls())
#Configurações Gerais dos Dígitos
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metaX.R
\docType{methods}
\name{sampleListFile<-}
\alias{sampleListFile<-}
\title{sampleListFile}
\usage{
sampleListFile(para) <- value
}
\arguments{
\item{para}{An object of metaXpara}
\item{value}{value}
}
\value{
An object ... | /man/sampleListFile.Rd | no_license | jaspershen/metaX | R | false | true | 499 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metaX.R
\docType{methods}
\name{sampleListFile<-}
\alias{sampleListFile<-}
\title{sampleListFile}
\usage{
sampleListFile(para) <- value
}
\arguments{
\item{para}{An object of metaXpara}
\item{value}{value}
}
\value{
An object ... |
# Plots found in the article are commented with "ARTICLE"
############
# Preamble #
############
library(plyr)
library(dplyr)
library(tidyr)
library(ggplot2)
#library(rgl)
twins_blue <- "#0C2341"
twins_red <- "#BA0C2E"
twins_gold <- "#CFAB7A"
colors_vec <- c("FF" = twins_blue, "SL" = twins_red, "CH"... | /Ervin_Santana.R | no_license | jackoliverwerner/Twins-Rotation-Preview | R | false | false | 23,306 | r | # Plots found in the article are commented with "ARTICLE"
############
# Preamble #
############
library(plyr)
library(dplyr)
library(tidyr)
library(ggplot2)
#library(rgl)
twins_blue <- "#0C2341"
twins_red <- "#BA0C2E"
twins_gold <- "#CFAB7A"
colors_vec <- c("FF" = twins_blue, "SL" = twins_red, "CH"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/slim_lang.R
\name{outputMS}
\alias{outputMS}
\alias{Genome$outputMS}
\alias{.G$outputMS}
\title{SLiM method outputMS}
\usage{
outputMS(filePath, append, filterMonomorphic)
}
\arguments{
\item{filePath}{An object of type null or string. Must b... | /man/outputMS.Rd | permissive | rdinnager/slimrlang | R | false | true | 3,118 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/slim_lang.R
\name{outputMS}
\alias{outputMS}
\alias{Genome$outputMS}
\alias{.G$outputMS}
\title{SLiM method outputMS}
\usage{
outputMS(filePath, append, filterMonomorphic)
}
\arguments{
\item{filePath}{An object of type null or string. Must b... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.R
\name{qry_sparql}
\alias{qry_sparql}
\title{Constructor function for SPARQL queries.}
\usage{
qry_sparql(query_string, params = NULL)
}
\arguments{
\item{query_string}{SPARQL query string.}
\item{params}{Sequence of named query param... | /man/qry_sparql.Rd | permissive | MarkEdmondson1234/data.world-r | R | false | true | 427 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.R
\name{qry_sparql}
\alias{qry_sparql}
\title{Constructor function for SPARQL queries.}
\usage{
qry_sparql(query_string, params = NULL)
}
\arguments{
\item{query_string}{SPARQL query string.}
\item{params}{Sequence of named query param... |
#Revision for test
#ex1
colony <- read.csv("D:/University of Brighton/2016-2017 Data Analytics MSc/2016 MM705 - Multivariate Analysis and Statistical Modelling OPTIONAL SEM 2 20CR/colony.csv")
plot(colony)
lines(colony) #line connecting the instances
abline(lm(colony$Count~colony$Time), col="red") # regression line (y~... | /MM705/revision test.R | no_license | pkkirilov/MSc-Data-Analytics | R | false | false | 492 | r | #Revision for test
#ex1
colony <- read.csv("D:/University of Brighton/2016-2017 Data Analytics MSc/2016 MM705 - Multivariate Analysis and Statistical Modelling OPTIONAL SEM 2 20CR/colony.csv")
plot(colony)
lines(colony) #line connecting the instances
abline(lm(colony$Count~colony$Time), col="red") # regression line (y~... |
rm(list=ls())
library(data.table)
library(smbinning)
library(plyr)
library(caTools)
library(glmnet)
library(glm)
library(glm2)
library(rpart)
library(rpart.plot)
library(RColorBrewer)
library(rattle)
library(glmulti)
setwd('D:/Confidential/Projects/Steel/LD2 BDS/prelim_analysis/data/second iteration/co... | /model_building_level_three.R | no_license | anurgbht/BDS_modelling | R | false | false | 810 | r | rm(list=ls())
library(data.table)
library(smbinning)
library(plyr)
library(caTools)
library(glmnet)
library(glm)
library(glm2)
library(rpart)
library(rpart.plot)
library(RColorBrewer)
library(rattle)
library(glmulti)
setwd('D:/Confidential/Projects/Steel/LD2 BDS/prelim_analysis/data/second iteration/co... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mod.prev.R
\name{prevalence_het}
\alias{prevalence_het}
\title{Prevalence Module}
\usage{
prevalence_het(dat, at)
}
\arguments{
\item{dat}{Master data list object of class \code{dat} containing networks,
individual-level attributes, and summa... | /man/prevalence_het.Rd | no_license | EpiModel/EpiModelHIVhet | R | false | true | 544 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mod.prev.R
\name{prevalence_het}
\alias{prevalence_het}
\title{Prevalence Module}
\usage{
prevalence_het(dat, at)
}
\arguments{
\item{dat}{Master data list object of class \code{dat} containing networks,
individual-level attributes, and summa... |
#test_math_funcs.r
# library(testthat)
library(tibble)
# Unit tests for num_order_to_word() ####
test_that("Missing and incorrect input to x", {
expect_error(num_order_to_word())
expect_error(num_order_to_word(x = "a"))
expect_error(num_order_to_word(x = list(5435435, 55435435)))
expect_error(num_order_to_wor... | /tests/testthat/test-math_funcs.R | no_license | tomhopper/numbr | R | false | false | 1,665 | r | #test_math_funcs.r
# library(testthat)
library(tibble)
# Unit tests for num_order_to_word() ####
test_that("Missing and incorrect input to x", {
expect_error(num_order_to_word())
expect_error(num_order_to_word(x = "a"))
expect_error(num_order_to_word(x = list(5435435, 55435435)))
expect_error(num_order_to_wor... |
#' Super resolution GAN model
#'
#' Super resolution generative adverserial network from the paper:
#'
#' https://arxiv.org/abs/1609.04802
#'
#' and ported from the Keras (python) implementation:
#'
#' https://github.com/eriklindernoren/Keras-GAN/blob/master/srgan/srgan.py
#'
#' @docType class
#'
#'
#' @section Arg... | /R/createSuperResolutionGanModel.R | permissive | ANTsX/ANTsRNet | R | false | false | 16,135 | r | #' Super resolution GAN model
#'
#' Super resolution generative adverserial network from the paper:
#'
#' https://arxiv.org/abs/1609.04802
#'
#' and ported from the Keras (python) implementation:
#'
#' https://github.com/eriklindernoren/Keras-GAN/blob/master/srgan/srgan.py
#'
#' @docType class
#'
#'
#' @section Arg... |
data <- read.csv("../data/all.csv", as.is=TRUE)
stopifnot(all(!is.na(data$n)))
# everything has a student count
stopifnot(all(!duplicated(data[, 1:4])))
# exactly one row per DBN-grade-year-subject
# best not to use the pre-computed sums; one error as seen earlier
data <- subset(data, grade != "All Grades")
data$gra... | /code/figure5.r | no_license | ajschumacher/NYCtests | R | false | false | 2,031 | r |
data <- read.csv("../data/all.csv", as.is=TRUE)
stopifnot(all(!is.na(data$n)))
# everything has a student count
stopifnot(all(!duplicated(data[, 1:4])))
# exactly one row per DBN-grade-year-subject
# best not to use the pre-computed sums; one error as seen earlier
data <- subset(data, grade != "All Grades")
data$gra... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genericrules.R
\name{field_format}
\alias{field_format}
\title{Check whether a field conforms to a regular expression}
\usage{
field_format(x, pattern, type = c("glob", "regex"), ...)
}
\arguments{
\item{x}{Bare (unquoted) name of a variable.... | /man/field_format.Rd | no_license | cran/validate | R | false | true | 869 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genericrules.R
\name{field_format}
\alias{field_format}
\title{Check whether a field conforms to a regular expression}
\usage{
field_format(x, pattern, type = c("glob", "regex"), ...)
}
\arguments{
\item{x}{Bare (unquoted) name of a variable.... |
library(tidyverse)
library(ragg)
library(ggtext)
source("workflow/fig-scripts/theme.R")
lookup <- read_tsv("results/figs/celltype_rename_table.tsv") %>%
mutate(clusters = str_extract(clusters2,"\\d+(?=\\/.+)")) %>%
dplyr::select(clusters, clusters.rename) %>%
deframe()
df <- read_csv("results/finalized/x-datas... | /workflow/fig-scripts/all_dataset_tep_scores.R | permissive | Ellison-Lab/TestisTEs2021 | R | false | false | 3,311 | r | library(tidyverse)
library(ragg)
library(ggtext)
source("workflow/fig-scripts/theme.R")
lookup <- read_tsv("results/figs/celltype_rename_table.tsv") %>%
mutate(clusters = str_extract(clusters2,"\\d+(?=\\/.+)")) %>%
dplyr::select(clusters, clusters.rename) %>%
deframe()
df <- read_csv("results/finalized/x-datas... |
#Draws the supply function (E vs PlantPsi) for the current soil state and plant hydraulic parameters
hydraulics.supplyFunctionPlot<-function(soil, x, type="E") {
psic = soil$psi
VG_nc = soil$VG_n
VG_alphac = soil$VG_alpha
VCroot_kmax = x$below$VCroot_kmax
VGrhizo_kmax = x$below$VGrhizo_kmax
pEmb = x$P... | /R/supplyFunctionPlot.R | no_license | MalditoBarbudo/medfate | R | false | false | 3,508 | r | #Draws the supply function (E vs PlantPsi) for the current soil state and plant hydraulic parameters
hydraulics.supplyFunctionPlot<-function(soil, x, type="E") {
psic = soil$psi
VG_nc = soil$VG_n
VG_alphac = soil$VG_alpha
VCroot_kmax = x$below$VCroot_kmax
VGrhizo_kmax = x$below$VGrhizo_kmax
pEmb = x$P... |
User <- setRefClass("User", contains = "Item",
fields = c("username", "email",
"first_name", "last_name",
"affiliation", "phone", "address",
"city", "state", "country", "zip_code",
... | /R/class-user.R | permissive | mlrdk/sevenbridges-r | R | false | false | 3,755 | r | User <- setRefClass("User", contains = "Item",
fields = c("username", "email",
"first_name", "last_name",
"affiliation", "phone", "address",
"city", "state", "country", "zip_code",
... |
## Create one R script called run_analysis.R that does the following:
## 1. Merges the training and the test sets to create one data set.
## 2. Extracts only the measurements on the mean and standard deviation for each measurement.
## 3. Uses descriptive activity names to name the activities in the data set
## 4. Appro... | /run_analysis.R | no_license | moratam/Getting_and_Cleaning_Data_Course_Project | R | false | false | 2,680 | r | ## Create one R script called run_analysis.R that does the following:
## 1. Merges the training and the test sets to create one data set.
## 2. Extracts only the measurements on the mean and standard deviation for each measurement.
## 3. Uses descriptive activity names to name the activities in the data set
## 4. Appro... |
# This function downloads whole data set, extracts and returns only the part
# from the dates 2007-02-01 and 2007-02-02.
read_data <- function()
{
# download and unzip data if not done yet
dataURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
dataArchive <- "exdata-dat... | /plot4.R | no_license | naganmail/ExData_Plotting1 | R | false | false | 2,216 | r | # This function downloads whole data set, extracts and returns only the part
# from the dates 2007-02-01 and 2007-02-02.
read_data <- function()
{
# download and unzip data if not done yet
dataURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
dataArchive <- "exdata-dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transform_rasters.R
\name{transform_rasters}
\alias{transform_rasters}
\title{Transform raster values using custom calls.}
\usage{
transform_rasters(raster_stack, separator = "_", ncores = 1, ...)
}
\arguments{
\item{raster_stack}{Ra... | /man/transform_rasters.Rd | no_license | cran/Mapinguari | R | false | true | 1,551 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transform_rasters.R
\name{transform_rasters}
\alias{transform_rasters}
\title{Transform raster values using custom calls.}
\usage{
transform_rasters(raster_stack, separator = "_", ncores = 1, ...)
}
\arguments{
\item{raster_stack}{Ra... |
## utiles para modelar con state-space
## 20170614
##
AIC.SSModel <- function(ob, k=2){
}
##
BIC.SSModel <- function(ob, k=2){
}
| /statespace.r | no_license | ecastellon/mag | R | false | false | 131 | r | ## utiles para modelar con state-space
## 20170614
##
AIC.SSModel <- function(ob, k=2){
}
##
BIC.SSModel <- function(ob, k=2){
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.nphawkesT.R
\name{plot.nphawkesT}
\alias{plot.nphawkesT}
\title{Function to plot the magnitude productivity, spatial, temporal, and background components of the Hawkes model}
\usage{
\method{plot}{nphawkesT}(x, print = FALSE, ...)
}
\arg... | /man/plot.nphawkesT.Rd | no_license | mrjoshuagordon/nphawkes | R | false | true | 872 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.nphawkesT.R
\name{plot.nphawkesT}
\alias{plot.nphawkesT}
\title{Function to plot the magnitude productivity, spatial, temporal, and background components of the Hawkes model}
\usage{
\method{plot}{nphawkesT}(x, print = FALSE, ...)
}
\arg... |
data("cars")# load dataset
View(cars)plot(dist~speed,data=cars)
#view the no of obs
head(cars,20)# display the first 20 obs
scatter.smooth(x=cars$speed, y=cars$dist, main="Dist ~ Speed") # scatterplot
cor(cars$speed, cars$dist) # calculate correlation between speed and distance
linearMod <- lm(dist ~ speed, data=cars... | /linear.R | no_license | kagsburg/recess2018-BSE2301-Group16 | R | false | false | 1,820 | r | data("cars")# load dataset
View(cars)plot(dist~speed,data=cars)
#view the no of obs
head(cars,20)# display the first 20 obs
scatter.smooth(x=cars$speed, y=cars$dist, main="Dist ~ Speed") # scatterplot
cor(cars$speed, cars$dist) # calculate correlation between speed and distance
linearMod <- lm(dist ~ speed, data=cars... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn-rnn.R
\name{nn_gru}
\alias{nn_gru}
\title{Applies a multi-layer gated recurrent unit (GRU) RNN to an input sequence.}
\usage{
nn_gru(
input_size,
hidden_size,
num_layers = 1,
bias = TRUE,
batch_first = FALSE,
dropout = 0,
bid... | /fuzzedpackages/torch/man/nn_gru.Rd | no_license | akhikolla/testpackages | R | false | true | 4,381 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn-rnn.R
\name{nn_gru}
\alias{nn_gru}
\title{Applies a multi-layer gated recurrent unit (GRU) RNN to an input sequence.}
\usage{
nn_gru(
input_size,
hidden_size,
num_layers = 1,
bias = TRUE,
batch_first = FALSE,
dropout = 0,
bid... |
library(dplyr)
library(httr)
library(lubridate)
library(stringr)
library(tidyr)
datefmt <- function(datetime) {
## Format a POSIXct datetime for the WBEA API
paste(year(datetime),
month(datetime) - 1,
day(datetime),
hour(datetime),
minute(datetime), sep = "... | /request.r | permissive | GaganKapoor/Air-Monitoring | R | false | false | 2,375 | r | library(dplyr)
library(httr)
library(lubridate)
library(stringr)
library(tidyr)
datefmt <- function(datetime) {
## Format a POSIXct datetime for the WBEA API
paste(year(datetime),
month(datetime) - 1,
day(datetime),
hour(datetime),
minute(datetime), sep = "... |
## CONTOUR PLOT OF ABACO TEMPERATURE STRING DATA
require(plotly) # plotting
require(lubridate) # dates
require(zoo) # misc data handling functions
require(tidyr) # for reshaping data sets
require(RColorBrewer)
# read data, a few minor processing bits
RawTemperatureData <- read.csv('abaco_temp_data.csv')
RawTemperatur... | /Scripts/temperature string data vis.R | no_license | abby-lammers/LSM303-Data-Processing | R | false | false | 5,340 | r | ## CONTOUR PLOT OF ABACO TEMPERATURE STRING DATA
require(plotly) # plotting
require(lubridate) # dates
require(zoo) # misc data handling functions
require(tidyr) # for reshaping data sets
require(RColorBrewer)
# read data, a few minor processing bits
RawTemperatureData <- read.csv('abaco_temp_data.csv')
RawTemperatur... |
ProbabilidadPerdidaOptimizada<-function(portafolio,TiempoFinal){
rendimientosln<-matrix(0,length(portafolio[,1]),length(portafolio[1,]))
rendimientosln<-na.omit(diff(log(portafolio)))
r<-efficientPortfolio(timeSeries(rendimientosln))
r<-r@spec@portfolio$weights
r<-as.vector(r)
pp<-ProbabilidadPerdida(... | /rmetrics.R | no_license | danilhramon/Portafolio | R | false | false | 395 | r | ProbabilidadPerdidaOptimizada<-function(portafolio,TiempoFinal){
rendimientosln<-matrix(0,length(portafolio[,1]),length(portafolio[1,]))
rendimientosln<-na.omit(diff(log(portafolio)))
r<-efficientPortfolio(timeSeries(rendimientosln))
r<-r@spec@portfolio$weights
r<-as.vector(r)
pp<-ProbabilidadPerdida(... |
context("Testing bootstrap functions")
test_that("auc boot functions", {
set.seed(123)
n <- 100
p <- 1
X <- data.frame(matrix(rnorm(n*p), nrow = n, ncol = p))
Y <- rbinom(n, 1, plogis(0.2 * X[,1]))
boot1 <- boot_auc(Y = Y, X = X, B = 10)
boot2 <- boot_auc(Y = Y, X = X, B = 10, correct632 = TRUE)
lpo <... | /tests/testthat/testBoot.R | permissive | benkeser/nlpred | R | false | false | 974 | r | context("Testing bootstrap functions")
test_that("auc boot functions", {
set.seed(123)
n <- 100
p <- 1
X <- data.frame(matrix(rnorm(n*p), nrow = n, ncol = p))
Y <- rbinom(n, 1, plogis(0.2 * X[,1]))
boot1 <- boot_auc(Y = Y, X = X, B = 10)
boot2 <- boot_auc(Y = Y, X = X, B = 10, correct632 = TRUE)
lpo <... |
\name{solve_QP_SOCP}
\alias{solve_QP_SOCP}
\title{Solve a Quadratic Programming Problem}
\description{
This routine implements the second order cone programming method from
Kim-Chuan Toh , Michael J. Todd, and Reha H. Tutuncu for solving quadratic
programming problems of the form
\eqn{\min(-d^T b + 1/2 b^T D ... | /Distance-Weighted-Discrimination/dwdpackage/DWD/man/solve_QP_SOCP.Rd | no_license | MeileiJiang/robust-against-heterogeneity | R | false | false | 1,912 | rd | \name{solve_QP_SOCP}
\alias{solve_QP_SOCP}
\title{Solve a Quadratic Programming Problem}
\description{
This routine implements the second order cone programming method from
Kim-Chuan Toh , Michael J. Todd, and Reha H. Tutuncu for solving quadratic
programming problems of the form
\eqn{\min(-d^T b + 1/2 b^T D ... |
#######################################################################################################
## Prediccion
#######################################################################################################
## Salario de jugadores NBA
##
###################################################################... | /Prediccion/Scripts/nba.R | no_license | chemadix/MasterDataScienceCUNEF | R | false | false | 6,357 | r | #######################################################################################################
## Prediccion
#######################################################################################################
## Salario de jugadores NBA
##
###################################################################... |
\name{panderOptions}
\alias{pander.option}
\alias{panderOptions}
\title{Querying/setting pander option}
\usage{
panderOptions(o, value)
}
\arguments{
\item{o}{option name (string). See below.}
\item{value}{value to assign (optional)}
}
\description{
To list all \code{pander} options, just run this function
w... | /man/panderOptions.Rd | no_license | jburos/pander | R | false | false | 6,539 | rd | \name{panderOptions}
\alias{pander.option}
\alias{panderOptions}
\title{Querying/setting pander option}
\usage{
panderOptions(o, value)
}
\arguments{
\item{o}{option name (string). See below.}
\item{value}{value to assign (optional)}
}
\description{
To list all \code{pander} options, just run this function
w... |
# Kaggle driver telematics challenge
# Model building script
library(ROCR)
library(randomForest)
library(gbm)
library(dplyr)
library(ggplot2)
# Set the working directory
setwd('E:/Kaggle/drivers/')
# Global parameters
nRides <- 200 # Number of rides per driver
nRandomDrivers <- 300
propTraining <- 0.75
propTest <- 1... | /Driver telematics analysis/modeling.R | no_license | thuijskens/Kaggle | R | false | false | 4,346 | r | # Kaggle driver telematics challenge
# Model building script
library(ROCR)
library(randomForest)
library(gbm)
library(dplyr)
library(ggplot2)
# Set the working directory
setwd('E:/Kaggle/drivers/')
# Global parameters
nRides <- 200 # Number of rides per driver
nRandomDrivers <- 300
propTraining <- 0.75
propTest <- 1... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get-paste.r
\name{toString.paste}
\alias{toString.paste}
\title{Extract just the paste text from a paste object}
\usage{
\method{toString}{paste}(x, ...)
}
\arguments{
\item{x}{paste object}
\item{...}{unused}
}
\description{
Extract just th... | /man/toString.paste.Rd | no_license | anandprabhakar0507/pastebin | R | false | true | 355 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get-paste.r
\name{toString.paste}
\alias{toString.paste}
\title{Extract just the paste text from a paste object}
\usage{
\method{toString}{paste}(x, ...)
}
\arguments{
\item{x}{paste object}
\item{...}{unused}
}
\description{
Extract just th... |
#Functions needed for reading, filtering and normalizing Cel-SEQ data
#remove or keep only spike ins from given data frame
rmspike<-function(x){
ERCCs<-grep("ERCC-",row.names(x)) # gives vector with row # of spike ins
data<-x[-ERCCs,] # make new data frame without the specified rows
return(data) # output new dat... | /plate_diagnostics_functions.R | no_license | MauroJM/single-cell-sequencing | R | false | false | 14,677 | r | #Functions needed for reading, filtering and normalizing Cel-SEQ data
#remove or keep only spike ins from given data frame
rmspike<-function(x){
ERCCs<-grep("ERCC-",row.names(x)) # gives vector with row # of spike ins
data<-x[-ERCCs,] # make new data frame without the specified rows
return(data) # output new dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hgenes.R
\name{hgenes}
\alias{hgenes}
\title{Retrieves genes from HMDB}
\usage{
hgenes(x)
}
\arguments{
\item{x}{is the metabolite of interest}
}
\value{
returns a list of the gene names related to a specific metabolite.
}
\description{
The f... | /man/hgenes.Rd | no_license | ExoLab-UPLCMS/MetaboliteHub | R | false | true | 409 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hgenes.R
\name{hgenes}
\alias{hgenes}
\title{Retrieves genes from HMDB}
\usage{
hgenes(x)
}
\arguments{
\item{x}{is the metabolite of interest}
}
\value{
returns a list of the gene names related to a specific metabolite.
}
\description{
The f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ancillary.R
\name{aaf}
\alias{aaf}
\title{Compute the Frequency of Each Amino Acid in Each Species}
\usage{
aaf(data)
}
\arguments{
\item{data}{input data must be a dataframe (see details).}
}
\value{
A dataframe providing amino acid frequenc... | /man/aaf.Rd | no_license | cran/EnvNJ | R | false | true | 791 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ancillary.R
\name{aaf}
\alias{aaf}
\title{Compute the Frequency of Each Amino Acid in Each Species}
\usage{
aaf(data)
}
\arguments{
\item{data}{input data must be a dataframe (see details).}
}
\value{
A dataframe providing amino acid frequenc... |
#### Copyright 2016 Andrew D Fox
####
#### 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
####
#### http://www.apache.org/licenses/LICENSE-2.0
####
#### Unless required by applicable la... | /houseman-code-for-manuscript.R | permissive | foxandrewd/PSMA | R | false | false | 6,880 | r | #### Copyright 2016 Andrew D Fox
####
#### 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
####
#### http://www.apache.org/licenses/LICENSE-2.0
####
#### Unless required by applicable la... |
require("ggplot2")
require("dplyr")
require("timeSeries")
require("forecast")
# require("tsoutliers")
# require("zoo")
usearchive=TRUE # csv data from archive
sensorid=40
usearchive=FALSE # timestamp needs fixing (in csv and conversion below)
usearchive=TRUE # timestamp needs fixing (in csv and conversion below)
#if(u... | /r-scripts/plot_sensordata.R | no_license | wermter/sensors-software | R | false | false | 9,631 | r | require("ggplot2")
require("dplyr")
require("timeSeries")
require("forecast")
# require("tsoutliers")
# require("zoo")
usearchive=TRUE # csv data from archive
sensorid=40
usearchive=FALSE # timestamp needs fixing (in csv and conversion below)
usearchive=TRUE # timestamp needs fixing (in csv and conversion below)
#if(u... |
#################################
## <제7장 연습문제>
#################################
# 01. 본문에서 생성된 dataset2의 직급(position) 칼럼을 대상으로 1급 -> 5급, 5급 -> 1급 형식으로
# 역코딩하여 position2 칼럼에 추가하시오.
getwd()
# 02. dataset2의 resident 칼럼을 대상으로 NA 값을 제거한 후 dataset2 변수에 저장하시오.
# 03. dataset2의 gender 칼럼을 대상으로 1->"남자", 2->"여자" 형태로 코딩 변경하여... | /R-script/Part-II/제7장 연습문제.R | no_license | LTaeHoon/R_NCS | R | false | false | 3,784 | r | #################################
## <제7장 연습문제>
#################################
# 01. 본문에서 생성된 dataset2의 직급(position) 칼럼을 대상으로 1급 -> 5급, 5급 -> 1급 형식으로
# 역코딩하여 position2 칼럼에 추가하시오.
getwd()
# 02. dataset2의 resident 칼럼을 대상으로 NA 값을 제거한 후 dataset2 변수에 저장하시오.
# 03. dataset2의 gender 칼럼을 대상으로 1->"남자", 2->"여자" 형태로 코딩 변경하여... |
source("FindMaxLag.R")
source("GrangerTest.R")
Influence <- function(d1, d2, epsilon=1e-2) {
# Find maximal lag
maxLag <- FindMaxLag(d1, d2)
# Current pvalue is maximal
pvalue <- 1
# Recalculate Grander Casuality for all valid lags
for (lag in seq(maxLag, 1, -1)) {
result <- GrangerTest(d1, d2, lag)
... | /global_influence/Influence.R | no_license | trzytematyczna/SciRePI | R | false | false | 609 | r | source("FindMaxLag.R")
source("GrangerTest.R")
Influence <- function(d1, d2, epsilon=1e-2) {
# Find maximal lag
maxLag <- FindMaxLag(d1, d2)
# Current pvalue is maximal
pvalue <- 1
# Recalculate Grander Casuality for all valid lags
for (lag in seq(maxLag, 1, -1)) {
result <- GrangerTest(d1, d2, lag)
... |
\name{rc.plot.track.id}
\docType{package}
\alias{rc.plot.track.id}
\title{Plot Track Id}
\description{
Plot labels in designated tracks.
}
\usage{rc.plot.track.id(track.id, labels=NULL, degree=0,
col='black', custom.track.height=NULL, ...)}
\arguments{
\item{track.id}{a vector of integers, specifying the ... | /man/rc.plot.track.id.Rd | no_license | cran/NetWeaver | R | false | false | 997 | rd | \name{rc.plot.track.id}
\docType{package}
\alias{rc.plot.track.id}
\title{Plot Track Id}
\description{
Plot labels in designated tracks.
}
\usage{rc.plot.track.id(track.id, labels=NULL, degree=0,
col='black', custom.track.height=NULL, ...)}
\arguments{
\item{track.id}{a vector of integers, specifying the ... |
dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib')
setwd("/Users/mengmengjiang/all datas/chap5")
library(xlsx)
#针头为25G
n1<-read.xlsx("he-25g.xlsx",sheetName="2kv18",header=TRUE)
n2<-read.xlsx("he-25g.xlsx",sheetName="2kv54",header=TRUE)
n3<-read.xlsx("he-25g.xlsx"... | /thesis/chap5/chap5-fig5-5.R | permissive | shuaimeng/r | R | false | false | 3,259 | r | dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib')
setwd("/Users/mengmengjiang/all datas/chap5")
library(xlsx)
#针头为25G
n1<-read.xlsx("he-25g.xlsx",sheetName="2kv18",header=TRUE)
n2<-read.xlsx("he-25g.xlsx",sheetName="2kv54",header=TRUE)
n3<-read.xlsx("he-25g.xlsx"... |
# Power of a number
a=8
print(a**2) # 8*8-->64
print(a^2) # 8*8-->64
print(c(1,2,3,4,5)^2) # All the values are powered in terms of 2
print(c(1,2,3,4)*c(3,4)) # 3 8 9 16
print(c(2,4,6,8)*c(-2,-4,-6,-8)) # The values are multiplied element-wise -4 -16 -36 -64
print(c(1,2,3,4)+5) # All the values are ad... | /MAT2001 Statistics for Engineers/Lab Learning/Basics of R.R | no_license | PrashanthSingaravelan/fall_semester-2020 | R | false | false | 2,445 | r | # Power of a number
a=8
print(a**2) # 8*8-->64
print(a^2) # 8*8-->64
print(c(1,2,3,4,5)^2) # All the values are powered in terms of 2
print(c(1,2,3,4)*c(3,4)) # 3 8 9 16
print(c(2,4,6,8)*c(-2,-4,-6,-8)) # The values are multiplied element-wise -4 -16 -36 -64
print(c(1,2,3,4)+5) # All the values are ad... |
split = function(newcol, concol, c, tag=c[-1]){
# assignes values to intervals, names the intervals.
# newcol : name of new column e.g. train$age-category
# : has to be created beforehands
# concol : name of controle column e.g. train$age
# c : vector of interval borders, e.g. age.s = ... | /submission/helperfunctions.R | no_license | fractaldust/SPL_DFK | R | false | false | 5,481 | r | split = function(newcol, concol, c, tag=c[-1]){
# assignes values to intervals, names the intervals.
# newcol : name of new column e.g. train$age-category
# : has to be created beforehands
# concol : name of controle column e.g. train$age
# c : vector of interval borders, e.g. age.s = ... |
#' MDSConjoint: An implementation of metric and nonmetric conjoint models for marketing decisions.
#'
#' This package is an implementation of metric and nonmetric conjoint models for
#' marketing analysis and decisions. It estimates the conjoint models por each individual,
#' computes a data frame with all estimations,... | /R/MDSConjoint.R | no_license | jlopezsi/MDSConjoint | R | false | false | 926 | r | #' MDSConjoint: An implementation of metric and nonmetric conjoint models for marketing decisions.
#'
#' This package is an implementation of metric and nonmetric conjoint models for
#' marketing analysis and decisions. It estimates the conjoint models por each individual,
#' computes a data frame with all estimations,... |
library(FFTrees)
library(tidyverse)
library(rhandsontable)
require(gridExtra)
setwd('/Users/ravirane/Desktop/GMU/CS584/myWork/assignment1/data/fold')
setwd('/Users/ravirane/Desktop/GMU/CS584/dm/task-1/data/Sequestered')
# Function to create Fast and Frugal Tree for given train/test data and algo
fast.frugal.tree <- fun... | /task-1/fftree.R | no_license | coderscraft/dm | R | false | false | 12,745 | r | library(FFTrees)
library(tidyverse)
library(rhandsontable)
require(gridExtra)
setwd('/Users/ravirane/Desktop/GMU/CS584/myWork/assignment1/data/fold')
setwd('/Users/ravirane/Desktop/GMU/CS584/dm/task-1/data/Sequestered')
# Function to create Fast and Frugal Tree for given train/test data and algo
fast.frugal.tree <- fun... |
# integrative DRW on combined feature data (updated in 2018/07/20)
# concat directed pathway graphs within each profile (GM & GMR & GMR_d & GMP)
# For PPI network diffusion, Random Walk with Restart(RWR) algorithm was used.
# In order to find optimized restart probability in PPI diffusion.
# Grid search was performed ... | /experiment/result18_all(acorss_model).R | no_license | taerimmkim/iDRW-GMP | R | false | false | 92,401 | r | # integrative DRW on combined feature data (updated in 2018/07/20)
# concat directed pathway graphs within each profile (GM & GMR & GMR_d & GMP)
# For PPI network diffusion, Random Walk with Restart(RWR) algorithm was used.
# In order to find optimized restart probability in PPI diffusion.
# Grid search was performed ... |
.pkgModelCurrent <- TRUE
.setPkgModels <- function(value) { ## For testing
assignInMyNamespace(".pkgModelCurrent", value)
}
.norm2 <- function(obj) {
if (inherits(obj, "RxODE")) {
if (exists(".linCmtM", obj)) {
return(get(".linCmtM", obj))
}
}
setNames(RxODE::rxModelVars(obj)$model["... | /R/modlib.R | no_license | cran/RxODE | R | false | false | 13,972 | r | .pkgModelCurrent <- TRUE
.setPkgModels <- function(value) { ## For testing
assignInMyNamespace(".pkgModelCurrent", value)
}
.norm2 <- function(obj) {
if (inherits(obj, "RxODE")) {
if (exists(".linCmtM", obj)) {
return(get(".linCmtM", obj))
}
}
setNames(RxODE::rxModelVars(obj)$model["... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/random.R
\name{rdm}
\alias{rdm}
\title{Dirichlet-multinomial random sample}
\usage{
rdm(n = NULL, size, alpha, probs = FALSE)
}
\arguments{
\item{n}{sample size}
\item{size}{vector to set the multinomial sampling size. vector is reused to ha... | /man/rdm.Rd | no_license | mcomas/coda.count | R | false | true | 674 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/random.R
\name{rdm}
\alias{rdm}
\title{Dirichlet-multinomial random sample}
\usage{
rdm(n = NULL, size, alpha, probs = FALSE)
}
\arguments{
\item{n}{sample size}
\item{size}{vector to set the multinomial sampling size. vector is reused to ha... |
setwd("C:/R_lecture")
getwd()
.libPaths("C:/R_lecture/Lib")
## 자연어 처리 기능을 이용해보자
#이것은 소리없는 아우성
## KoNLP package를 이용한다 o 는 소문자
# Korean Natural Language Process
# 해당패키지 않에 사전이 포함되어 있다
# 이것은 소리없는 아우성
# 3가지 사전이 포함
# 시스템사전(28만개), 세종사전(32만개), NIADIC사전(98만개)
# Java기능을 이용! 시스템에 JRE가 설치되어 있어야 함
# JRE를 설치한 위치를 R package에 알려주어야... | /R_lecture/Day_13/Day13_2(wordcloud).R | no_license | won-spec/TIL | R | false | false | 3,416 | r | setwd("C:/R_lecture")
getwd()
.libPaths("C:/R_lecture/Lib")
## 자연어 처리 기능을 이용해보자
#이것은 소리없는 아우성
## KoNLP package를 이용한다 o 는 소문자
# Korean Natural Language Process
# 해당패키지 않에 사전이 포함되어 있다
# 이것은 소리없는 아우성
# 3가지 사전이 포함
# 시스템사전(28만개), 세종사전(32만개), NIADIC사전(98만개)
# Java기능을 이용! 시스템에 JRE가 설치되어 있어야 함
# JRE를 설치한 위치를 R package에 알려주어야... |
library(RCurl)
library(XML)
library(stringr)
library(jsonlite)
# Get the list of major swimming events
# Olympics (Every 4-th years: from 2000, meetType 1)
# World Championships (Every odd years: meetType 2)
# European Championships (Every even years: meetType 3)
# Commonwealth Games (Every non-olympic 4-th years: 200... | /R/swimmers.R | permissive | rogermt/swimmers-history | R | false | false | 3,726 | r | library(RCurl)
library(XML)
library(stringr)
library(jsonlite)
# Get the list of major swimming events
# Olympics (Every 4-th years: from 2000, meetType 1)
# World Championships (Every odd years: meetType 2)
# European Championships (Every even years: meetType 3)
# Commonwealth Games (Every non-olympic 4-th years: 200... |
library(stringdist)
### Name: seq_sim
### Title: Compute similarity scores between sequences of integers
### Aliases: seq_sim
### ** Examples
L1 <- list(1:3,2:4)
L2 <- list(1:3)
seq_sim(L1,L2,method="osa")
# note how missing values are handled (L2 is recycled over L1)
L1 <- list(c(1L,NA_integer_,3L),2:4,NA_integer... | /data/genthat_extracted_code/stringdist/examples/seq_sim.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 358 | r | library(stringdist)
### Name: seq_sim
### Title: Compute similarity scores between sequences of integers
### Aliases: seq_sim
### ** Examples
L1 <- list(1:3,2:4)
L2 <- list(1:3)
seq_sim(L1,L2,method="osa")
# note how missing values are handled (L2 is recycled over L1)
L1 <- list(c(1L,NA_integer_,3L),2:4,NA_integer... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/venn_functions.R
\name{ellipse}
\alias{ellipse}
\title{A Helper Function Used by Venn4 to Define the Perimeter of an Ellipse}
\usage{
ellipse(x, y, a, b, alpha)
}
\arguments{
\item{x}{the x coordinate of the center of the ellipse.}
\item{y}{... | /man/ellipse.Rd | no_license | HRDAG/DGA | R | false | true | 715 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/venn_functions.R
\name{ellipse}
\alias{ellipse}
\title{A Helper Function Used by Venn4 to Define the Perimeter of an Ellipse}
\usage{
ellipse(x, y, a, b, alpha)
}
\arguments{
\item{x}{the x coordinate of the center of the ellipse.}
\item{y}{... |
library(randomGLM)
### Name: brainCancer
### Title: The brain cancer data set
### Aliases: brainCancer
### ** Examples
data(brainCancer)
| /data/genthat_extracted_code/randomGLM/examples/brainCancer.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 144 | r | library(randomGLM)
### Name: brainCancer
### Title: The brain cancer data set
### Aliases: brainCancer
### ** Examples
data(brainCancer)
|
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | /R/pkg/R/context.R | permissive | jeff303/spark | R | false | false | 16,688 | r | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
report_data <- read.table("D:/research/twitter/cs246/ucla/loss of information/report.txt", header=T, sep="\t")
plot_colors <- c(rgb(r=0.0,g=0.0,b=0.9),
"red",
"forestgreen",
rgb(r=0.0, g=0.0, b=0.0))
par(mar=c(4.2, 4.2, 0.5, 0.5))
plot(report_data$NBA, type="l", col=plot_colors[1],
ylim=range(0.4, 1.0... | /CS246/experiment/drawPrecision.R | no_license | mohanyang/duanyang | R | false | false | 2,584 | r | report_data <- read.table("D:/research/twitter/cs246/ucla/loss of information/report.txt", header=T, sep="\t")
plot_colors <- c(rgb(r=0.0,g=0.0,b=0.9),
"red",
"forestgreen",
rgb(r=0.0, g=0.0, b=0.0))
par(mar=c(4.2, 4.2, 0.5, 0.5))
plot(report_data$NBA, type="l", col=plot_colors[1],
ylim=range(0.4, 1.0... |
#Coursera Exploratory data analysis
# Download the data and take a look at them.
household_power_consumption <- read.csv("./household_power_consumption.txt", sep=";", na.strings="?")
View(household_power_consumption)
# Subsetting and view the final data. You can use the filter option to get the number of rows.
d... | /plot3.R | no_license | GuglielmoR/ExData_Plotting1 | R | false | false | 968 | r | #Coursera Exploratory data analysis
# Download the data and take a look at them.
household_power_consumption <- read.csv("./household_power_consumption.txt", sep=";", na.strings="?")
View(household_power_consumption)
# Subsetting and view the final data. You can use the filter option to get the number of rows.
d... |
## Matrix Inversion
## this is a pair of functions that cache the inverse of a matrix.
## the first function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv<-NULL
set<-function(y){
x<<-y
inv<<-NULL
}
get<-function(){x}
SetInv<-function(in... | /cachematrix.R | no_license | madnatx/ProgrammingAssignment2 | R | false | false | 891 | r | ## Matrix Inversion
## this is a pair of functions that cache the inverse of a matrix.
## the first function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv<-NULL
set<-function(y){
x<<-y
inv<<-NULL
}
get<-function(){x}
SetInv<-function(in... |
##load Libraries
library(ggplot2)
library(dplyr)
# If ref-folder doesnt exist, it must be created (a working directory must be selected first form R editor)
if (!file.exists("./ficheros")) {
dir.create("./ficheros")
}
#Init variables
origen <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold... | /plot4.R | no_license | Elmasri-Fathallah/EDA_Course-Project01 | R | false | false | 1,876 | r | ##load Libraries
library(ggplot2)
library(dplyr)
# If ref-folder doesnt exist, it must be created (a working directory must be selected first form R editor)
if (!file.exists("./ficheros")) {
dir.create("./ficheros")
}
#Init variables
origen <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold... |
# script para ler a tabela de dados limpos #
# dados brutos em arquivo xlsx #
?read.table
Tabela <- read.table("data/Dados.csv")
read.csv2("data/Dados.csv")
| /R/0_Script_teste.R | no_license | crisregis/Repositorio_aulas_analises_em_R | R | false | false | 160 | r | # script para ler a tabela de dados limpos #
# dados brutos em arquivo xlsx #
?read.table
Tabela <- read.table("data/Dados.csv")
read.csv2("data/Dados.csv")
|
# 주소 데이터 와 가까운 병원과의 거리
# 거리 계산
install.packages("geosphere")
library(geosphere)
library(dplyr)
library(readxl)
# 아파트 주소 데이터
apt <- read.csv("..\\Data\\preprocessingData\\O_Base.csv", stringsAsFactors = F)
# 머지 할 데이터
merge <- read.csv("..\\Data\\preprocessingData\\O_Base_merge.csv", stringsAsFactors = F)
# 버스 정류장 ... | /Data_Preprocessing_R/O_20200423_dist_from_hospital.R | no_license | h0n9670/ApartmentPrice | R | false | false | 1,950 | r | # 주소 데이터 와 가까운 병원과의 거리
# 거리 계산
install.packages("geosphere")
library(geosphere)
library(dplyr)
library(readxl)
# 아파트 주소 데이터
apt <- read.csv("..\\Data\\preprocessingData\\O_Base.csv", stringsAsFactors = F)
# 머지 할 데이터
merge <- read.csv("..\\Data\\preprocessingData\\O_Base_merge.csv", stringsAsFactors = F)
# 버스 정류장 ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatialDataFunctions.R
\name{getPairwiseDistance}
\alias{getPairwiseDistance}
\title{Distance matrix for a population}
\usage{
getPairwiseDistance(popn)
}
\arguments{
\item{popn}{a 3D population object}
}
\value{
a vector representing the low... | /man/getPairwiseDistance.Rd | no_license | gretelk/mateable | R | false | true | 680 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatialDataFunctions.R
\name{getPairwiseDistance}
\alias{getPairwiseDistance}
\title{Distance matrix for a population}
\usage{
getPairwiseDistance(popn)
}
\arguments{
\item{popn}{a 3D population object}
}
\value{
a vector representing the low... |
library(readr)
library(tidyverse)
movie_profit <- read_csv("Coding/movie_profit.csv")
### PROMPT ####
### x axis: multiple of budget
### y axis: percentage of films by GENRE w positive profit
#maintenance
movie_profit$release_date <- mdy(movie_profit$release_date)
movie_profit <- filter(movie_profit, r... | /tidy_tuesday_week30.R | no_license | IAjimi/TidyTuesday | R | false | false | 2,135 | r | library(readr)
library(tidyverse)
movie_profit <- read_csv("Coding/movie_profit.csv")
### PROMPT ####
### x axis: multiple of budget
### y axis: percentage of films by GENRE w positive profit
#maintenance
movie_profit$release_date <- mdy(movie_profit$release_date)
movie_profit <- filter(movie_profit, r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phenocam.R
\name{phenocam_image_url}
\alias{phenocam_image_url}
\alias{phenocam_read_day_urls}
\alias{phenocam_read_monthly_midday_urls}
\alias{phenocam_image_url_midday}
\alias{phenocam_info}
\alias{phenocam_download}
\title{Retrieve images ... | /man/phenocam_image_url.Rd | no_license | beanumber/macleish | R | false | true | 1,383 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phenocam.R
\name{phenocam_image_url}
\alias{phenocam_image_url}
\alias{phenocam_read_day_urls}
\alias{phenocam_read_monthly_midday_urls}
\alias{phenocam_image_url_midday}
\alias{phenocam_info}
\alias{phenocam_download}
\title{Retrieve images ... |
# 1. Merges the training and the test sets to create one data set.
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")
subj... | /run_analysis.R | no_license | msmirabel/Getting-and-Cleaning-Data-Project | R | false | false | 1,919 | r |
# 1. Merges the training and the test sets to create one data set.
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")
subj... |
library(data.table)
library(foreign)
##### Visualization #####
browseShinyData <- function()
{
sourceGitHubFile(user='jaywarrick', repo='R-General', branch='master', file='DataClassBrowser/ui.R')
sourceGitHubFile(user='jaywarrick', repo='R-General', branch='master', file='DataClassBrowser/server.R')
shinyApp(ui=my... | /20160902_CellClustering/PreProcessingHelpers.R | no_license | jaywarrick/R-Cytoprofiling | R | false | false | 18,202 | r | library(data.table)
library(foreign)
##### Visualization #####
browseShinyData <- function()
{
sourceGitHubFile(user='jaywarrick', repo='R-General', branch='master', file='DataClassBrowser/ui.R')
sourceGitHubFile(user='jaywarrick', repo='R-General', branch='master', file='DataClassBrowser/server.R')
shinyApp(ui=my... |
library(ape)
testtree <- read.tree("7279_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="7279_0_unrooted.txt") | /codeml_files/newick_trees_processed/7279_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("7279_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="7279_0_unrooted.txt") |
#' Extract Metapop management action details
#'
#' Extract management action details from RAMAS Metapop .mp files.
#'
#' @param mp A character string containing the path to a RAMAS Metapop .mp file.
#' @return A \code{data.frame} containing one row per management action, with
#' columns: \item{do.action}{Log... | /mptools/R/actions.R | no_license | ingted/R-Examples | R | false | false | 5,498 | r | #' Extract Metapop management action details
#'
#' Extract management action details from RAMAS Metapop .mp files.
#'
#' @param mp A character string containing the path to a RAMAS Metapop .mp file.
#' @return A \code{data.frame} containing one row per management action, with
#' columns: \item{do.action}{Log... |
\name{RLQ}
\alias{RLQ}
\title{coeficientes de localización interindustrial de Round}
\description{ Propuesta es la sugerida por Round (1978), simbolizada normalmente mediante la abreviatura RLQ. Su expresión es del siguiente modo: RLQ(ij) =SLQ(i)/log2[1+SLQ(j))].
}
\usage{
RLQ(a,b)
}
\arguments{
... | /man/RLQ.Rd | no_license | PacoParra/UtilMio | R | false | false | 847 | rd |
\name{RLQ}
\alias{RLQ}
\title{coeficientes de localización interindustrial de Round}
\description{ Propuesta es la sugerida por Round (1978), simbolizada normalmente mediante la abreviatura RLQ. Su expresión es del siguiente modo: RLQ(ij) =SLQ(i)/log2[1+SLQ(j))].
}
\usage{
RLQ(a,b)
}
\arguments{
... |
clx <- function(fm, dfcw, cluster)
{
library(sandwich)
library(lmtest)
M <- length(unique(cluster))
N <- length(cluster)
dfc <- (M/(M-1))*((N-1)/(N-fm$rank))
u <- apply(estfun(fm), 2,
function(x) tapply(x, cluster, sum))
vcovCL <- dfc * sandwich(fm, meat = crossprod(u)/N) * df... | /clustered_variance/test04.R | no_license | walkingsparrow/tests | R | false | false | 832 | r | clx <- function(fm, dfcw, cluster)
{
library(sandwich)
library(lmtest)
M <- length(unique(cluster))
N <- length(cluster)
dfc <- (M/(M-1))*((N-1)/(N-fm$rank))
u <- apply(estfun(fm), 2,
function(x) tapply(x, cluster, sum))
vcovCL <- dfc * sandwich(fm, meat = crossprod(u)/N) * df... |
# Tokenizing and Visualization --------------------------------------------
# Text, Characters, and Strings
library(tidyverse)
library(tidytext)
text <- c(
"So long and thanks for all the fish,",
"So sad that it should come to this,",
"We tried to warn you all but oh dear!"
)
text
str(text)
text_df <- data_fra... | /A Tidy Approach to Text Analysis in R.R | no_license | plear/tidy-text-analysis | R | false | false | 5,875 | r | # Tokenizing and Visualization --------------------------------------------
# Text, Characters, and Strings
library(tidyverse)
library(tidytext)
text <- c(
"So long and thanks for all the fish,",
"So sad that it should come to this,",
"We tried to warn you all but oh dear!"
)
text
str(text)
text_df <- data_fra... |
library(stringr)
library(data.table)
input <- fread("day02_input.txt", header = F)
count <-0
for(row in 1:nrow(input)) {
times <- unlist(str_split(input[row]$V1, "-"))
char <- str_sub(input[row]$V2, 1, -2)
pwd <- input[row]$V3
num <- str_count(pwd,char)
min <- as.integer(times[1])
ma... | /day02/day02.R | no_license | marcmace/AdventofCode2020 | R | false | false | 413 | r | library(stringr)
library(data.table)
input <- fread("day02_input.txt", header = F)
count <-0
for(row in 1:nrow(input)) {
times <- unlist(str_split(input[row]$V1, "-"))
char <- str_sub(input[row]$V2, 1, -2)
pwd <- input[row]$V3
num <- str_count(pwd,char)
min <- as.integer(times[1])
ma... |
# Test multiple RDBMS
dt_sp <- options("datatable.showProgress")
options("datatable.showProgress" = FALSE)
# RDBMS batch tests -------------------------------------------------------
# +- setup ----------------------------------------------------------------
tsqlite <- tempfile()
dbs <- list(
"MySQL via RM... | /data/genthat_extracted_code/lgr/tests/test_AppenderDbi.R | no_license | surayaaramli/typeRrh | R | false | false | 10,303 | r | # Test multiple RDBMS
dt_sp <- options("datatable.showProgress")
options("datatable.showProgress" = FALSE)
# RDBMS batch tests -------------------------------------------------------
# +- setup ----------------------------------------------------------------
tsqlite <- tempfile()
dbs <- list(
"MySQL via RM... |
subset_data<-function(fulldata, start_date, end_date){
fulldata$Date <- as.Date(fulldata$Date, format="%d/%m/%Y")
twodaydata = subset(fulldata, as.Date(Date) >= start_date &
as.Date(Date) <= end_date)
twodaydata
}
plot1<-function(file_name){
data <- read.table("household_powe... | /plot1.R | no_license | polikepati/ExData_Plotting1 | R | false | false | 735 | r | subset_data<-function(fulldata, start_date, end_date){
fulldata$Date <- as.Date(fulldata$Date, format="%d/%m/%Y")
twodaydata = subset(fulldata, as.Date(Date) >= start_date &
as.Date(Date) <= end_date)
twodaydata
}
plot1<-function(file_name){
data <- read.table("household_powe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggyearday.R
\name{ggyearday}
\alias{ggyearday}
\title{ggplot2 heatmap for diurnal-yearly time series}
\usage{
ggyearday(
data,
time,
z,
date_breaks = "1 month",
date_labels = "\%b",
ybreaks = seq(6, 18, 6),
ylabels = format_spri... | /man/ggyearday.Rd | permissive | Ostluft/rOstluft.plot | R | false | true | 2,123 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggyearday.R
\name{ggyearday}
\alias{ggyearday}
\title{ggplot2 heatmap for diurnal-yearly time series}
\usage{
ggyearday(
data,
time,
z,
date_breaks = "1 month",
date_labels = "\%b",
ybreaks = seq(6, 18, 6),
ylabels = format_spri... |
## cladophora
## 1,230 e–0.55 * Depth
#max_depth = 1,230 e–0.55 * Depth
library(tidyverse)
library(tidyr)
library(sm)
library(lubridate) # work with dates
library(dplyr) # data manipulation (filter, summarize, mutate)
library(ggplot2) # graphics
library(gridExtra) # tile several plots next to each other
libr... | /scripts/cladophora_depth/C1_F319_Cladophora_depth.R | no_license | ksirving/flow_eco_mech | R | false | false | 28,777 | r | ## cladophora
## 1,230 e–0.55 * Depth
#max_depth = 1,230 e–0.55 * Depth
library(tidyverse)
library(tidyr)
library(sm)
library(lubridate) # work with dates
library(dplyr) # data manipulation (filter, summarize, mutate)
library(ggplot2) # graphics
library(gridExtra) # tile several plots next to each other
libr... |
#' Visualize Profiles, e.g. of Partial Dependence
#'
#' Minimal visualization of an object of class \code{light_profile}. The object returned is of class \code{ggplot} and can be further customized.
#'
#' Either lines and points are plotted (if stats = "mean") or quartile boxes. If there is a "by" variable or a mul... | /R/plot_light_profile.R | no_license | agosiewska/flashlight | R | false | false | 4,314 | r | #' Visualize Profiles, e.g. of Partial Dependence
#'
#' Minimal visualization of an object of class \code{light_profile}. The object returned is of class \code{ggplot} and can be further customized.
#'
#' Either lines and points are plotted (if stats = "mean") or quartile boxes. If there is a "by" variable or a mul... |
library(tidyverse)
library(Lahman)
tail(Teams, 3)
help(Teams)
#Studying Runs and its correlation to Wins
#Creating a df of teams from 2000 - Now, only looking at Games, Runs and Runs Against
my_teams <- Teams %>%
filter(yearID > 2000) %>%
select(teamID, yearID, lgID, G, W, L, R, RA)
tail(my_teams... | /R/baseball.r | no_license | JGlessner757/dawg | R | false | false | 1,316 | r | library(tidyverse)
library(Lahman)
tail(Teams, 3)
help(Teams)
#Studying Runs and its correlation to Wins
#Creating a df of teams from 2000 - Now, only looking at Games, Runs and Runs Against
my_teams <- Teams %>%
filter(yearID > 2000) %>%
select(teamID, yearID, lgID, G, W, L, R, RA)
tail(my_teams... |
# add the class attribute to the tree
.add_class <- function(tree) {
class(tree) <- unique(c("sdc_hierarchy", class(tree)))
tree
}
# initializes an empty tree
.init <- function(rootnode) {
tree <- data.table(
root = rootnode,
leaf = rootnode,
level = 1
)
class(tree) <- unique(c("sdc_hierarchy", c... | /R/hier_helpers.R | no_license | bernhard-da/sdcHierarchies | R | false | false | 6,172 | r | # add the class attribute to the tree
.add_class <- function(tree) {
class(tree) <- unique(c("sdc_hierarchy", class(tree)))
tree
}
# initializes an empty tree
.init <- function(rootnode) {
tree <- data.table(
root = rootnode,
leaf = rootnode,
level = 1
)
class(tree) <- unique(c("sdc_hierarchy", c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/my_lm.R
\name{my_lm}
\alias{my_lm}
\title{Linear model function}
\usage{
my_lm(my_fml, my_data)
}
\arguments{
\item{my_fml}{'formula' class object.}
\item{my_data}{Input data frame.}
}
\value{
A table of coeffiencts for the linear regression... | /man/my_lm.Rd | no_license | celeste-zeng/R_package_development | R | false | true | 553 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/my_lm.R
\name{my_lm}
\alias{my_lm}
\title{Linear model function}
\usage{
my_lm(my_fml, my_data)
}
\arguments{
\item{my_fml}{'formula' class object.}
\item{my_data}{Input data frame.}
}
\value{
A table of coeffiencts for the linear regression... |
library(shiny)
library(UsingR)
library(lattice)
library(zoo)
library(plotrix)
payments<- read.csv("payments1.csv", header=T)
shinyServer(
function(input,output){
x <- reactive({as.yearmon(input$yearmonth)})
#output$inputValue<-renderPrint({subset(payments,REF_DATE>=input$startdate & REF_DATE<=input$enddate)})... | /server.R | no_license | ntzortzis/Shiny_03 | R | false | false | 799 | r | library(shiny)
library(UsingR)
library(lattice)
library(zoo)
library(plotrix)
payments<- read.csv("payments1.csv", header=T)
shinyServer(
function(input,output){
x <- reactive({as.yearmon(input$yearmonth)})
#output$inputValue<-renderPrint({subset(payments,REF_DATE>=input$startdate & REF_DATE<=input$enddate)})... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.