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/rmse.R
\name{rmse}
\alias{rmse}
\title{Compute the root mean squared error}
\usage{
rmse(x, xhat)
}
\arguments{
\item{x}{numeric. The true/actual values.}
\item{xhat}{numeric. The predicted/estimated values.}
}
\description{
Computes the roo... | /man/rmse.Rd | no_license | decisionpatterns/ml.tools | R | false | true | 592 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rmse.R
\name{rmse}
\alias{rmse}
\title{Compute the root mean squared error}
\usage{
rmse(x, xhat)
}
\arguments{
\item{x}{numeric. The true/actual values.}
\item{xhat}{numeric. The predicted/estimated values.}
}
\description{
Computes the roo... |
source("utils.R")
# Parameter ---------------------------------------------------------------
print("ROC:")
(par1 <- 160)
print("Positions:")
(par2a <- 140)
(par2b <- 40)
print("SMA:")
(n_roll <- 20)
print("Spread:")
(spread_buy <- -0.0085)
(spread_sell <- -0.001)
# Load Data -------------------------------... | /src/24_strategy_weights.R | no_license | re-tradr/mom_portfolio_builder | R | false | false | 4,061 | r |
source("utils.R")
# Parameter ---------------------------------------------------------------
print("ROC:")
(par1 <- 160)
print("Positions:")
(par2a <- 140)
(par2b <- 40)
print("SMA:")
(n_roll <- 20)
print("Spread:")
(spread_buy <- -0.0085)
(spread_sell <- -0.001)
# Load Data -------------------------------... |
corn <- readRDS("nass.corn.rds" )
corn<-fortity_with_metric_units(corn,"corn")
corn<-fortify_with_census_region(corn)
# Plot yield vs. year for the corn dataset
plot_yield_vs_year(corn) +
# Facet, wrapped by census region
facet_wrap(vars(census_region)) | /01 Introduction to Writting Functions in R/04 Case Study on Grain Yields/12 Plotting_Yields_Over_Time.R | no_license | ArmandoReyesRepo/RCode | R | false | false | 271 | r | corn <- readRDS("nass.corn.rds" )
corn<-fortity_with_metric_units(corn,"corn")
corn<-fortify_with_census_region(corn)
# Plot yield vs. year for the corn dataset
plot_yield_vs_year(corn) +
# Facet, wrapped by census region
facet_wrap(vars(census_region)) |
setwd('/Users/sanghyuk/Documents/R/Machine-Learning/Lecture/Capstone/Capstone Project')
batting <- read.csv('Batting.csv')
#
head(batting)
#
str(batting)
#
head(batting$AB)
#
#column이름으로 숫자 쓸 수 없어서 X 붙인 것.
head(batting$X2B)
#
head(batting)
#Batting Avering
batting$BA <- batting$H / batting$AB
tail(batting$BA, 5... | /Machine-Learning/Lecture/Capstone/Capstone Project/Capstone.R | no_license | saanghyuk/Data_Analysis_with_R | R | false | false | 1,141 | r | setwd('/Users/sanghyuk/Documents/R/Machine-Learning/Lecture/Capstone/Capstone Project')
batting <- read.csv('Batting.csv')
#
head(batting)
#
str(batting)
#
head(batting$AB)
#
#column이름으로 숫자 쓸 수 없어서 X 붙인 것.
head(batting$X2B)
#
head(batting)
#Batting Avering
batting$BA <- batting$H / batting$AB
tail(batting$BA, 5... |
## This 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
setInverse <- function(inverse) inv <<- inverse... | /cachematrix.R | no_license | antagir/ProgrammingAssignment2 | R | false | false | 1,046 | r |
## This 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
setInverse <- function(inverse) inv <<- inverse... |
#read the first line of the file to use as column names
header = read.table("household_power_consumption.txt", sep=";", nrows=1)
#read in the lines beginning on 1/2/2007 and ending just before midnight 2/2/2007; assign column names
hpc = read.table("household_power_consumption.txt", sep=";", na.strings = "?", col.name... | /plot2.R | no_license | karakri/ExData_Plotting1 | R | false | false | 1,112 | r | #read the first line of the file to use as column names
header = read.table("household_power_consumption.txt", sep=";", nrows=1)
#read in the lines beginning on 1/2/2007 and ending just before midnight 2/2/2007; assign column names
hpc = read.table("household_power_consumption.txt", sep=";", na.strings = "?", col.name... |
#' PDF Document with a description filed
#'
#' @export
desc_document <- function(...) {
template <- system.file(
"rmarkdown/templates/desc_document/resources/template.tex",
package = "descriptionDocument")
rmarkdown::pdf_document(template = template, ...)
}
| /jan16/extRmd_exercises/02_desc_document/R/desc_document.R | no_license | eugejoh/arm_rconf2019 | R | false | false | 270 | r | #' PDF Document with a description filed
#'
#' @export
desc_document <- function(...) {
template <- system.file(
"rmarkdown/templates/desc_document/resources/template.tex",
package = "descriptionDocument")
rmarkdown::pdf_document(template = template, ...)
}
|
#' Clustered permutation test for cluster randomized trials
#' @param outcome a vector specifying the individual-level outcome.
#' @param clustername a vector specifying the identification variable of the cluster.
#' @param z a data frame of covariates to be adjusted for in the permutation analysis.
#' @param cspaceda... | /R/cptest.R | no_license | cran/cvcrand | R | false | false | 11,230 | r | #' Clustered permutation test for cluster randomized trials
#' @param outcome a vector specifying the individual-level outcome.
#' @param clustername a vector specifying the identification variable of the cluster.
#' @param z a data frame of covariates to be adjusted for in the permutation analysis.
#' @param cspaceda... |
# Name: adolc_createList creates a list of adoubles of
# length count. Each element is initialized to a provided value
# Arguments:
# count : positive numeric value
# val : value to be initialize elements of the list
adolc_createList <- function(count, val){
if(!is.numeric(count)){
stop("adolc_creat... | /autodiffadolc/R/adolc_constructor.R | no_license | chitrak-banerjee/radolc | R | false | false | 641 | r | # Name: adolc_createList creates a list of adoubles of
# length count. Each element is initialized to a provided value
# Arguments:
# count : positive numeric value
# val : value to be initialize elements of the list
adolc_createList <- function(count, val){
if(!is.numeric(count)){
stop("adolc_creat... |
options(stringsAsFactors = F, scipen = 999)
args = (commandArgs(TRUE))
SRAruninfo_path = args[1]
SRAruninfo_output = args[2]
path_RNAseq_table = args[3]
RNAseq_table <- read.delim(path_RNAseq_table)# Lecture du fichier RNA-seq
runinfo = read.delim(SRAruninfo_path)
if (ncol(runinfo) == 1){
runinfo <- read.csv(S... | /pipelines/SV pipeline/SRAruninfo_filtering.R | no_license | FloBeni/2023-alternative_splicing | R | false | false | 558 | r | options(stringsAsFactors = F, scipen = 999)
args = (commandArgs(TRUE))
SRAruninfo_path = args[1]
SRAruninfo_output = args[2]
path_RNAseq_table = args[3]
RNAseq_table <- read.delim(path_RNAseq_table)# Lecture du fichier RNA-seq
runinfo = read.delim(SRAruninfo_path)
if (ncol(runinfo) == 1){
runinfo <- read.csv(S... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/leuk.dat.R
\docType{data}
\name{leuk.dat}
\alias{leuk.dat}
\title{Leukemia Data}
\format{
An object of class \code{"data.frame"}.
}
\source{
Cook, R.D. and Weisberg, S. (1982). Residuals and Influence in Regression, Chapman
and Hal... | /man/leuk.dat.Rd | no_license | cran/RobStatTM | R | false | true | 931 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/leuk.dat.R
\docType{data}
\name{leuk.dat}
\alias{leuk.dat}
\title{Leukemia Data}
\format{
An object of class \code{"data.frame"}.
}
\source{
Cook, R.D. and Weisberg, S. (1982). Residuals and Influence in Regression, Chapman
and Hal... |
#' Get NCBI taxonomy UID from GenBankID
#'
#' @export
#' @param id A GenBank accession alphanumeric string, or a gi numeric string.
#' @param batch_size The number of queries to submit at a time.
#' @param ... Curl args passed on to \code{\link[httr]{GET}}
#' @details See \url{http://www.ncbi.nlm.nih.gov/Sitemap/sequen... | /R/genbank2uid.R | permissive | gedankenstuecke/taxize | R | false | false | 4,416 | r | #' Get NCBI taxonomy UID from GenBankID
#'
#' @export
#' @param id A GenBank accession alphanumeric string, or a gi numeric string.
#' @param batch_size The number of queries to submit at a time.
#' @param ... Curl args passed on to \code{\link[httr]{GET}}
#' @details See \url{http://www.ncbi.nlm.nih.gov/Sitemap/sequen... |
#' Puerto Rico Google News Chart Making
#'
#' googlenewschaRt: This function takes the news data frame and makes the sentiment chart
#' @param filename "R_News_1NOV17.csv"
#' @keywords Puerto Rico
#' @export
#' @examples
#' googlenewschaRt
googlenewschaRt = function(filename = "R_News_21NOV17.csv"){
library(lubrid... | /R/googlenewschaRt.R | no_license | dusty-turner/puertoRicoR | R | false | false | 8,627 | r | #' Puerto Rico Google News Chart Making
#'
#' googlenewschaRt: This function takes the news data frame and makes the sentiment chart
#' @param filename "R_News_1NOV17.csv"
#' @keywords Puerto Rico
#' @export
#' @examples
#' googlenewschaRt
googlenewschaRt = function(filename = "R_News_21NOV17.csv"){
library(lubrid... |
library(Seurat)
library(WriteXLS)
library(ggplot2)
library(dplyr)
devtools::load_all("/n/projects/ddiaz/Analysis/Scripts/SeuratExtensions")
# Clear workspace
rm(list = ls())
script_name <- paste0("anchored_subsets_seurat3_v1.0")
dir.create(paste0("/n/projects/ddiaz/Analysis",
"/Scripts/sb2191-regen/Seurat3-final/"... | /anchored_subsets_seurat3_v1.0_.R | no_license | diazdc/old-R-scripts | R | false | false | 6,500 | r | library(Seurat)
library(WriteXLS)
library(ggplot2)
library(dplyr)
devtools::load_all("/n/projects/ddiaz/Analysis/Scripts/SeuratExtensions")
# Clear workspace
rm(list = ls())
script_name <- paste0("anchored_subsets_seurat3_v1.0")
dir.create(paste0("/n/projects/ddiaz/Analysis",
"/Scripts/sb2191-regen/Seurat3-final/"... |
#########################################################
### Train RBF SVM model with training images ###
#########################################################
### Author: Jihan Wei
### Train a Support Vector Machine (SVM)using processed features from training images:
### Input:
### - processed features f... | /lib/Non-linear SVM/lib/Train_svm.R | no_license | jihanwei/AppliedDataScience_Project3 | R | false | false | 743 | r | #########################################################
### Train RBF SVM model with training images ###
#########################################################
### Author: Jihan Wei
### Train a Support Vector Machine (SVM)using processed features from training images:
### Input:
### - processed features f... |
#skrypt do porównywania ramek danych z różnych dat ściągania
#w celu uniknięcia zduplikowania artykułów
#idea: argumentem funkcji są dwie ramki danych z tego samego portalu ale z różnych dat (dwóch kolejnych)
#podaję je chronologicznie i patrze czy w drugiej sa wiersze, które były już w pierwszej
#jeżeli tak to j... | /pomocnicze/porownywarka_ramek.R | no_license | kashenfelter/Wybory | R | false | false | 1,277 | r | #skrypt do porównywania ramek danych z różnych dat ściągania
#w celu uniknięcia zduplikowania artykułów
#idea: argumentem funkcji są dwie ramki danych z tego samego portalu ale z różnych dat (dwóch kolejnych)
#podaję je chronologicznie i patrze czy w drugiej sa wiersze, które były już w pierwszej
#jeżeli tak to j... |
install.packages("data.table")
install.packages("tidyverse")
install.packages("usmap")
library("data.table")
library("tidyverse")
library("usmap")
SolarRadiation <- fread("nsrd.csv")
summary(SolarRadiation)
class(SolarRadiation$avglo)
SolarRadiation <- SolarRadiation[!grep("13", SolarRadiation$month),]
c... | /TDI Proposal.R | no_license | Srujana1729/Solar | R | false | false | 1,203 | r | install.packages("data.table")
install.packages("tidyverse")
install.packages("usmap")
library("data.table")
library("tidyverse")
library("usmap")
SolarRadiation <- fread("nsrd.csv")
summary(SolarRadiation)
class(SolarRadiation$avglo)
SolarRadiation <- SolarRadiation[!grep("13", SolarRadiation$month),]
c... |
warn_immediate <- function(...) {
warning(..., immediate. = TRUE, call. = FALSE)
}
argo_assert_columns <- function(tbl, columns) {
if (!is.data.frame(tbl)) {
abort("`tbl` must be a data.frame.")
}
has_col <- columns %in% names(tbl)
if (all(!has_col)) {
columns_req <- if (length(columns) != 1) "colu... | /R/utils.R | permissive | KimBaldry/argodata | R | false | false | 4,520 | r |
warn_immediate <- function(...) {
warning(..., immediate. = TRUE, call. = FALSE)
}
argo_assert_columns <- function(tbl, columns) {
if (!is.data.frame(tbl)) {
abort("`tbl` must be a data.frame.")
}
has_col <- columns %in% names(tbl)
if (all(!has_col)) {
columns_req <- if (length(columns) != 1) "colu... |
#' @title
#' Data from the Cooperative Congressional Election Study
#'
#' @description
#' Data for the approval ratings of voters to various government positions
#' combined with the demographic background of the voter. See
#' \href{https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/II2DB6}{Kuriwa... | /R/cces.R | permissive | shealynj/PPBDS.data | R | false | false | 2,075 | r | #' @title
#' Data from the Cooperative Congressional Election Study
#'
#' @description
#' Data for the approval ratings of voters to various government positions
#' combined with the demographic background of the voter. See
#' \href{https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/II2DB6}{Kuriwa... |
# Figure 1B ----------------------------------------------------------------
# This file includes code to reproduce Figure 1B in Ramirez et al. "Meta-analysis of primary producer amino acid δ15N values and their
# influence on trophic position estimation."
# Here we use simulation to illustrate how variation in β ... | /Fig1 - Conceptual Simulation.R | no_license | matthewdramirez/BetaValueMeta-analysis | R | false | false | 7,748 | r |
# Figure 1B ----------------------------------------------------------------
# This file includes code to reproduce Figure 1B in Ramirez et al. "Meta-analysis of primary producer amino acid δ15N values and their
# influence on trophic position estimation."
# Here we use simulation to illustrate how variation in β ... |
# Shiny UI
library(shiny)
#-- UI --#
shinyUI(fluidPage(
pageWithSidebar(
titlePanel("Barcodes"),
sidebarPanel( width = 3,
h4('View NGS barcodes & map them to samples'),
br(),
selectInput('barcode_type',
label = "Which barcodes?",
choices = c('Nextera N7... | /barcodes/ui.R | permissive | leylabmpi/RTecanFluentShiny | R | false | false | 2,343 | r | # Shiny UI
library(shiny)
#-- UI --#
shinyUI(fluidPage(
pageWithSidebar(
titlePanel("Barcodes"),
sidebarPanel( width = 3,
h4('View NGS barcodes & map them to samples'),
br(),
selectInput('barcode_type',
label = "Which barcodes?",
choices = c('Nextera N7... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rds_operations.R
\name{rds_modify_global_cluster}
\alias{rds_modify_global_cluster}
\title{Modify a setting for an Amazon Aurora global cluster}
\usage{
rds_modify_global_cluster(
GlobalClusterIdentifier = NULL,
NewGlobalClusterIdentifier... | /man/rds_modify_global_cluster.Rd | no_license | cran/paws.database | R | false | true | 3,082 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rds_operations.R
\name{rds_modify_global_cluster}
\alias{rds_modify_global_cluster}
\title{Modify a setting for an Amazon Aurora global cluster}
\usage{
rds_modify_global_cluster(
GlobalClusterIdentifier = NULL,
NewGlobalClusterIdentifier... |
# =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
#
# 1. Libraries, scripts ----
#
# =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
library(ncdf4)
library(tidyverse)
library(ggmap)
library(readxl)
# Function that needs to be run for plotting using image() or image.pl... | /09_Read_all_for_Phil.R | no_license | NIVANorge/Okokyst_oceanography | R | false | false | 6,570 | r | # =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
#
# 1. Libraries, scripts ----
#
# =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
library(ncdf4)
library(tidyverse)
library(ggmap)
library(readxl)
# Function that needs to be run for plotting using image() or image.pl... |
\name{testDatasetAgeing}
\alias{testDatasetAgeing}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Method "testDatasetAgeing"
}
\description{
The driver function in the PhenStatAgeing package for running statisical analysis on phenotypic data. \cr
It performs several checks on the data and the i... | /Late adults stats pipeline/PhenStatAgeing/PhenStatAgeingPackage/man/testDatasetAgeing.Rd | permissive | xhyuo/impc_stats_pipeline | R | false | false | 9,782 | rd | \name{testDatasetAgeing}
\alias{testDatasetAgeing}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Method "testDatasetAgeing"
}
\description{
The driver function in the PhenStatAgeing package for running statisical analysis on phenotypic data. \cr
It performs several checks on the data and the i... |
> with(t, {
+ plot(Sub_metering_1~dateTime, type="l",
+ ylab="Global Active Power (kilowatts)", xlab="")
+ lines(Sub_metering_2~dateTime,col='Red')
+ lines(Sub_metering_3~dateTime,col='Blue')
+ })
> legend("topright", col=c("black", "red", "blue"), lwd=c(1,1,1),
+ c("Sub_metering_1", ... | /plot3.R | no_license | snidhi92/ExData_Plotting1 | R | false | false | 425 | r | > with(t, {
+ plot(Sub_metering_1~dateTime, type="l",
+ ylab="Global Active Power (kilowatts)", xlab="")
+ lines(Sub_metering_2~dateTime,col='Red')
+ lines(Sub_metering_3~dateTime,col='Blue')
+ })
> legend("topright", col=c("black", "red", "blue"), lwd=c(1,1,1),
+ c("Sub_metering_1", ... |
.onLoad <- function(libname, pkgname) {
.jpackage(pkgname, lib.loc = libname)
}
| /SBRect/R/onLoad.R | no_license | ingted/R-Examples | R | false | false | 83 | r | .onLoad <- function(libname, pkgname) {
.jpackage(pkgname, lib.loc = libname)
}
|
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/ISOReferenceSystem.R
\docType{class}
\name{ISOReferenceSystem}
\alias{ISOReferenceSystem}
\title{ISOReferenceSystem}
\format{\code{\link{R6Class}} object.}
\usage{
ISOReferenceSystem
}
\value{
Object of \code{\link{R6Class}} for model... | /man/ISOReferenceSystem.Rd | no_license | sebkopf/geometa | R | false | false | 1,049 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/ISOReferenceSystem.R
\docType{class}
\name{ISOReferenceSystem}
\alias{ISOReferenceSystem}
\title{ISOReferenceSystem}
\format{\code{\link{R6Class}} object.}
\usage{
ISOReferenceSystem
}
\value{
Object of \code{\link{R6Class}} for model... |
hist(Hake_gain[Hake_gain>0&Teaching_method=="TRAD"], breaks=9,
probability=studio_size[Hake_gain>0&Teaching_method=="TRAD"],
xlim=c(0,.7),ylim=c(0,6))
hist(Hake_gain[Hake_gain>0&Teaching_method=="IE"], breaks=9,
probability=studio_size[Hake_gain>0&Teaching_method=="TRAD"],
xlim=c(0,.7),ylim=c(0,6)... | /Histogram of something.R | no_license | barchibeque1/EM-stuff | R | false | false | 336 | r | hist(Hake_gain[Hake_gain>0&Teaching_method=="TRAD"], breaks=9,
probability=studio_size[Hake_gain>0&Teaching_method=="TRAD"],
xlim=c(0,.7),ylim=c(0,6))
hist(Hake_gain[Hake_gain>0&Teaching_method=="IE"], breaks=9,
probability=studio_size[Hake_gain>0&Teaching_method=="TRAD"],
xlim=c(0,.7),ylim=c(0,6)... |
pcarank <- function(X){
sv <- pcab(X)$sv
out <- length(sv)
return(out)
}
pcab <- function(X){
dim <- nrow(X)
num <- ncol(X)
mX <- rowMeans(X)
cX <- X - mX
if(dim < num){
C <- cov.wt(t(cX))$cov*((nrow(t(cX))-1)/nrow(t(cX)))
out <- eigb((C+t(C))/2)
V <- out$V
S ... | /R/reducer_helpers.R | no_license | rwoldford/edmcr | R | false | false | 2,730 | r | pcarank <- function(X){
sv <- pcab(X)$sv
out <- length(sv)
return(out)
}
pcab <- function(X){
dim <- nrow(X)
num <- ncol(X)
mX <- rowMeans(X)
cX <- X - mX
if(dim < num){
C <- cov.wt(t(cX))$cov*((nrow(t(cX))-1)/nrow(t(cX)))
out <- eigb((C+t(C))/2)
V <- out$V
S ... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615835028-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,047 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
library(dplyr)
library(tidyr)
purchases <- read.csv("refine_original.csv")
purchases$company <- tolower(purchases$company)
for (i in 1:length(purchases$company)){
if(grepl("^p",purchases$company[i])){
purchases$company[i]<- "philips"
} else if(grepl("^a",purchases$company[i])) {
purcha... | /Exercise 1/Product Purchases.R | no_license | nandumandali/SB-Foundations_of_Data_Science | R | false | false | 2,370 | r | library(dplyr)
library(tidyr)
purchases <- read.csv("refine_original.csv")
purchases$company <- tolower(purchases$company)
for (i in 1:length(purchases$company)){
if(grepl("^p",purchases$company[i])){
purchases$company[i]<- "philips"
} else if(grepl("^a",purchases$company[i])) {
purcha... |
library(tidyverse)
library(feather)
library(tidytext)
library(topicmodels)
comments <- read_feather("data/comments.feather")
comments_tidy <- read_feather("data/comments_tidy.feather")
# Fit LDA models
# document_term_matrix <- comments_tidy %>%
# group_by(by) %>%
# count(word) %>%
# cast_dtm(by, word, n)
# do... | /02_topic_modeling.R | no_license | mwkyuen/whyR_challenge2 | R | false | false | 2,324 | r | library(tidyverse)
library(feather)
library(tidytext)
library(topicmodels)
comments <- read_feather("data/comments.feather")
comments_tidy <- read_feather("data/comments_tidy.feather")
# Fit LDA models
# document_term_matrix <- comments_tidy %>%
# group_by(by) %>%
# count(word) %>%
# cast_dtm(by, word, n)
# do... |
volatility.surface <- function(dataset, trade.date = NULL, n.grid = 60L,
y = "STRK_PRC", poly.degree = 4L, poly.raw = TRUE,
method = "poly", loess.span = 0.25, loess.degree = 2L,
ns.df = NULL, smooth.spline.df = NULL, smooth.... | /R/volatility-surface-sp500app.R | no_license | herbivores/IVsurfaceApp | R | false | false | 5,753 | r | volatility.surface <- function(dataset, trade.date = NULL, n.grid = 60L,
y = "STRK_PRC", poly.degree = 4L, poly.raw = TRUE,
method = "poly", loess.span = 0.25, loess.degree = 2L,
ns.df = NULL, smooth.spline.df = NULL, smooth.... |
## Data preparation
## Set working environment ####
rm(list = ls())
gc()
# system("ps")
# system("pkill -f R")
x <- c("data.table",
"sp", "raster", "sf", "rgdal",
"rje", "stringr",
"lubridate",
"future", "future.apply")
lapply(x, require, character.only = TRUE)
rm(x)
## File paths an... | /scripts/data_prep.R | permissive | payalbal/fungi-fire | R | false | false | 8,841 | r | ## Data preparation
## Set working environment ####
rm(list = ls())
gc()
# system("ps")
# system("pkill -f R")
x <- c("data.table",
"sp", "raster", "sf", "rgdal",
"rje", "stringr",
"lubridate",
"future", "future.apply")
lapply(x, require, character.only = TRUE)
rm(x)
## File paths an... |
##Jamie Signorile
## The following two functions are used to efficiently store and compute the inverse of a matrix. The first matrix will concentrate on caching data, while the second, will be used to effectly pull or compute the inverse of a matrix.
## Function used to create a special matrix used to cache the invers... | /cachematrix.R | no_license | jsignorile/ProgrammingAssignment2 | R | false | false | 1,261 | r | ##Jamie Signorile
## The following two functions are used to efficiently store and compute the inverse of a matrix. The first matrix will concentrate on caching data, while the second, will be used to effectly pull or compute the inverse of a matrix.
## Function used to create a special matrix used to cache the invers... |
# MAKE PLOTS OF DMS AND DMSP VS. OTHER RELEVANT X VARIABLES
library(tidyverse)
# Load data
genpath <- '~/Desktop/GreenEdge/GCMS/'
pdir <- 'plots_pigments_vs_DMS_zColorScale/'
prof.all <- read.csv(file = paste0(genpath,'GE2016.profiles.ALL.OK.csv'), header = T)
surf.all <- read.csv(file = paste0(genpath,'GE2016.casts.... | /GCMS/plot_scatter_explore.R | no_license | mgali/GreenEdge | R | false | false | 3,042 | r | # MAKE PLOTS OF DMS AND DMSP VS. OTHER RELEVANT X VARIABLES
library(tidyverse)
# Load data
genpath <- '~/Desktop/GreenEdge/GCMS/'
pdir <- 'plots_pigments_vs_DMS_zColorScale/'
prof.all <- read.csv(file = paste0(genpath,'GE2016.profiles.ALL.OK.csv'), header = T)
surf.all <- read.csv(file = paste0(genpath,'GE2016.casts.... |
\name{anolis.tree}
\alias{anolis.tree}
\docType{data}
\title{
Anolis phylogeny}
\description{
Phylogeny of Anolis lizards}
\usage{data(anolis.tree)}
\format{
The data are stored as an object of class "phylo". See help pages for the functions \code{read.tree}
and \code{read.nexus} for details of the data structure.
}
\d... | /man/anolis.tree.Rd | no_license | ghthomas/motmot | R | false | false | 913 | rd | \name{anolis.tree}
\alias{anolis.tree}
\docType{data}
\title{
Anolis phylogeny}
\description{
Phylogeny of Anolis lizards}
\usage{data(anolis.tree)}
\format{
The data are stored as an object of class "phylo". See help pages for the functions \code{read.tree}
and \code{read.nexus} for details of the data structure.
}
\d... |
setwd("/Users/xucc/Documents/GMU/CS657/assigns/assign2")
mydata <- read.csv("ratings1.csv")
rows <- nrow(mydata)
head(mydata)
set.seed(0)
index03 <- sample(rows, 0.03*rows, replace = FALSE)
rating03 <- mydata[index03,]
index06 <- sample(rows, 0.06*rows, replace = FALSE)
rating06 <- mydata[index06,]
index09 <- samp... | /split_rating.R | no_license | vitamincc/Hadoop-Pairs-vs.-Stripes-Conditional-Probability-Lift | R | false | false | 2,271 | r |
setwd("/Users/xucc/Documents/GMU/CS657/assigns/assign2")
mydata <- read.csv("ratings1.csv")
rows <- nrow(mydata)
head(mydata)
set.seed(0)
index03 <- sample(rows, 0.03*rows, replace = FALSE)
rating03 <- mydata[index03,]
index06 <- sample(rows, 0.06*rows, replace = FALSE)
rating06 <- mydata[index06,]
index09 <- samp... |
###honey<-load("/Users/nicoleangeli/Documents/GitHub/quant-club/honey.RData")
library(dplyr)
### group and return some averages
Honey_groups <- honey %>%
group_by(state) %>%
summarise(totalprod = mean(totalprod), priceperlb = mean(priceperlb))
Honey_groups <-count(honey, state) %>%
arrange(desc(n))
names(H... | /Angeli_honey_challenge.R | no_license | kchalkowski/quant-club | R | false | false | 3,829 | r | ###honey<-load("/Users/nicoleangeli/Documents/GitHub/quant-club/honey.RData")
library(dplyr)
### group and return some averages
Honey_groups <- honey %>%
group_by(state) %>%
summarise(totalprod = mean(totalprod), priceperlb = mean(priceperlb))
Honey_groups <-count(honey, state) %>%
arrange(desc(n))
names(H... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gcImp.R
\name{gcImp}
\alias{gcImp}
\title{Gaussian Copula Imputations}
\usage{
gcImp(dt, m = 20, burn = 300, nsamp = 1000, ...)
}
\arguments{
\item{dt}{A data matrix with missing values.
Remember to remove any ID variables!}
\item{m}{A posi... | /man/gcImp.Rd | no_license | bojinov/gcImp | R | false | true | 3,035 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gcImp.R
\name{gcImp}
\alias{gcImp}
\title{Gaussian Copula Imputations}
\usage{
gcImp(dt, m = 20, burn = 300, nsamp = 1000, ...)
}
\arguments{
\item{dt}{A data matrix with missing values.
Remember to remove any ID variables!}
\item{m}{A posi... |
# runAnalysis.r File Description:
# This script will perform the following steps on the UCI HAR Dataset
# 1. Merge the training and the test sets to create one data set.
# 2. Extract only the measurements on the mean and standard deviation for each measurement.
# 3. Use descriptive activity names to name th... | /runAnalysis.r | no_license | rohitgupta5/getting-cleaning-data | R | false | false | 5,242 | r |
# runAnalysis.r File Description:
# This script will perform the following steps on the UCI HAR Dataset
# 1. Merge the training and the test sets to create one data set.
# 2. Extract only the measurements on the mean and standard deviation for each measurement.
# 3. Use descriptive activity names to name th... |
#' Function managePunct()
#'
#' This function preprocesses the text in order to get the punctuation as
#' we want.
#'
#' @param s text string to process
#' @return processed text string
#' @details
#' See code comments
managePunct <- function(s) {
# Locate emoticons - for now, just managing 10 types of ... | /R/managePunct.R | no_license | miguel-conde/DSC_Project | R | false | false | 3,256 | r | #' Function managePunct()
#'
#' This function preprocesses the text in order to get the punctuation as
#' we want.
#'
#' @param s text string to process
#' @return processed text string
#' @details
#' See code comments
managePunct <- function(s) {
# Locate emoticons - for now, just managing 10 types of ... |
## Getting full dataset
dataset_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
dataset_full$Date <- as.Date(dataset_full$Date, format="%d/%m/%Y")
## Subsetting the data
data <- ... | /plot2.R | no_license | MavisMLYuen/ExData_Plotting1 | R | false | false | 725 | r | ## Getting full dataset
dataset_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
dataset_full$Date <- as.Date(dataset_full$Date, format="%d/%m/%Y")
## Subsetting the data
data <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{draw_volcano}
\alias{draw_volcano}
\title{draw a volcano plot}
\usage{
draw_volcano(deg, pvalue_cutoff = 0.05, logFC_cutoff = 1, pkg = 1,
adjust = F)
}
\arguments{
\item{deg}{a data.frame created by Differential analysis}
\it... | /man/draw_volcano.Rd | no_license | xjsun1221/bioinfor | R | false | true | 1,124 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{draw_volcano}
\alias{draw_volcano}
\title{draw a volcano plot}
\usage{
draw_volcano(deg, pvalue_cutoff = 0.05, logFC_cutoff = 1, pkg = 1,
adjust = F)
}
\arguments{
\item{deg}{a data.frame created by Differential analysis}
\it... |
#set working directory
setwd("F:/Study/大三下/DataScienceWork")
install.packages("data.table")
#load library data.table
library(data.table)
DT<-fread("./household_power_consumption.txt", na.strings="?")
#set date as d:m:y
DT$strDate <- as.Date(DT$Date,"%d/%m/%Y")
#select data
DT.filter<-DT[DT$strDate=="200... | /Lab/Lab7/plot1.R | no_license | 519772745/introdatascience | R | false | false | 671 | r | #set working directory
setwd("F:/Study/大三下/DataScienceWork")
install.packages("data.table")
#load library data.table
library(data.table)
DT<-fread("./household_power_consumption.txt", na.strings="?")
#set date as d:m:y
DT$strDate <- as.Date(DT$Date,"%d/%m/%Y")
#select data
DT.filter<-DT[DT$strDate=="200... |
pathname='~/coursera/data/split'
filename='en_US.train1.txt'
wd=getwd()
setwd(pathname)
if (!file.exists('wordlist.txt')) {
print('wow')
system2(file.path(wd,'proctext.sh'),paste(pathname,filename,sep=" "))
}
#fix proctest for spaces
wordlist=read.table('wordlist.txt',header=F,colClasses = c('integer','character'... | /tokenize.R | permissive | bschousek/dss_capstone | R | false | false | 688 | r | pathname='~/coursera/data/split'
filename='en_US.train1.txt'
wd=getwd()
setwd(pathname)
if (!file.exists('wordlist.txt')) {
print('wow')
system2(file.path(wd,'proctext.sh'),paste(pathname,filename,sep=" "))
}
#fix proctest for spaces
wordlist=read.table('wordlist.txt',header=F,colClasses = c('integer','character'... |
# Title : Filter utilities
# Objective : Provides utility functions for filter functions
get_coal_count_ <- function(dataset) {
library(stringr)
# get the counts of words containing Kohle or kohle in each of the given dataset's speeches
cts <- data.frame()
for(i in seq(1, nrow(dataset))) {
cts <- rbi... | /src/utils/filtering_utils.R | no_license | Alice201606/ctm-2020 | R | false | false | 3,278 | r | # Title : Filter utilities
# Objective : Provides utility functions for filter functions
get_coal_count_ <- function(dataset) {
library(stringr)
# get the counts of words containing Kohle or kohle in each of the given dataset's speeches
cts <- data.frame()
for(i in seq(1, nrow(dataset))) {
cts <- rbi... |
library(testthat)
context("K-means")
test_that("Random", {
set.seed(42)
samples <- replicate(4, runif(16000))
result = kmeans_cuda(samples, 50, tolerance=0.01,
init="random", seed=777, verbosity=0)
kmcuda_asses = replicate(1, result$assignments)
attach(kmeans(samples, result$cen... | /fuzzedpackages/kmcudaR/tests/testthat/test.R | permissive | akhikolla/testpackages | R | false | false | 3,564 | r | library(testthat)
context("K-means")
test_that("Random", {
set.seed(42)
samples <- replicate(4, runif(16000))
result = kmeans_cuda(samples, 50, tolerance=0.01,
init="random", seed=777, verbosity=0)
kmcuda_asses = replicate(1, result$assignments)
attach(kmeans(samples, result$cen... |
# Abrindo bases e transformando em dataframe
library(ff)
base2011 <- read.csv2.ffdf(file="http://dados.recife.pe.gov.br/dataset/ce5168d4-d925-48f5-a193-03d4e0f587c7/resource/9a694ab5-99ab-4ff1-ac6b-c97917c6a762/download/situacaofinalalunos2011.csv")
base2012 <- read.csv2.ffdf(file="http://dados.recife.pe.gov.br/datase... | /aula 8.R | no_license | Letisouza/analise-de-dados_elet | R | false | false | 2,409 | r | # Abrindo bases e transformando em dataframe
library(ff)
base2011 <- read.csv2.ffdf(file="http://dados.recife.pe.gov.br/dataset/ce5168d4-d925-48f5-a193-03d4e0f587c7/resource/9a694ab5-99ab-4ff1-ac6b-c97917c6a762/download/situacaofinalalunos2011.csv")
base2012 <- read.csv2.ffdf(file="http://dados.recife.pe.gov.br/datase... |
read.surf <- function(surf.file, which.vertex, which.face) {
stopifnot(file.exists(surf.file))
fid <- file(surf.file, "rb")
endian <- "big"
surf.info <- list()
# Find version ---------------------------------------------------------------
invisible(seek(fid, 0, "start", "rb"))
b1 <- readBin(fi... | /R/read.surf.R | no_license | TKoscik/fsurfR | R | false | false | 3,608 | r | read.surf <- function(surf.file, which.vertex, which.face) {
stopifnot(file.exists(surf.file))
fid <- file(surf.file, "rb")
endian <- "big"
surf.info <- list()
# Find version ---------------------------------------------------------------
invisible(seek(fid, 0, "start", "rb"))
b1 <- readBin(fi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/similarities.R
\name{asim_centroid}
\alias{asim_centroid}
\alias{asim_semantic_min_sum}
\alias{asim_semantic_min_max}
\alias{asim_rwmd}
\title{Aggregation similarities for sparse 3d representations}
\usage{
asim_centroid(x, y = NULL, vecs, pt... | /man/aggregated_similarities.Rd | no_license | vspinu/simdist | R | false | true | 3,099 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/similarities.R
\name{asim_centroid}
\alias{asim_centroid}
\alias{asim_semantic_min_sum}
\alias{asim_semantic_min_max}
\alias{asim_rwmd}
\title{Aggregation similarities for sparse 3d representations}
\usage{
asim_centroid(x, y = NULL, vecs, pt... |
\name{VCF.default}
\alias{VCF.default}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
VCF.default(vcf_file, ...)
}
%- maybe also 'usage' for other objects documented here.... | /man/VCF.default.Rd | permissive | schae234/VaRiant | R | false | false | 2,279 | rd | \name{VCF.default}
\alias{VCF.default}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
VCF.default(vcf_file, ...)
}
%- maybe also 'usage' for other objects documented here.... |
#' Create a new DogAllOf
#'
#' @description
#' DogAllOf Class
#'
#' @docType class
#' @title DogAllOf
#' @description DogAllOf Class
#' @format An \code{R6Class} generator object
#' @field breed character [optional]
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
DogAllOf <- R6::R6Class(
... | /samples/client/petstore/R-httr2/R/dog_all_of.R | permissive | tjquinno/openapi-generator | R | false | false | 4,326 | r | #' Create a new DogAllOf
#'
#' @description
#' DogAllOf Class
#'
#' @docType class
#' @title DogAllOf
#' @description DogAllOf Class
#' @format An \code{R6Class} generator object
#' @field breed character [optional]
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
DogAllOf <- R6::R6Class(
... |
library(bde)
### Name: MacroBetaHirukawaTSKernel
### Title: Class '"MacroBetaHirukawaTSKernel"'
### Aliases: MacroBetaHirukawaTSKernel MacroBetaHirukawaTSKernel-class
### Keywords: classes
### ** Examples
# create the model
kernel.noModified <- macroBetaHirukawaTSKernel(dataPoints = tuna.r, b = 0.01,
... | /data/genthat_extracted_code/bde/examples/MacroBetaHirukawaTSKernel.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,131 | r | library(bde)
### Name: MacroBetaHirukawaTSKernel
### Title: Class '"MacroBetaHirukawaTSKernel"'
### Aliases: MacroBetaHirukawaTSKernel MacroBetaHirukawaTSKernel-class
### Keywords: classes
### ** Examples
# create the model
kernel.noModified <- macroBetaHirukawaTSKernel(dataPoints = tuna.r, b = 0.01,
... |
library(readr)
library(dplyr)
# --- Preparation
# Download, extract files, remove tmp file
if (!file.exists("./data")) {
dir.create("./data/")
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl, destfile="./data/exdata_data_household_power_consu... | /plot1.R | no_license | jlucasps/ExData_Plotting1 | R | false | false | 1,294 | r |
library(readr)
library(dplyr)
# --- Preparation
# Download, extract files, remove tmp file
if (!file.exists("./data")) {
dir.create("./data/")
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl, destfile="./data/exdata_data_household_power_consu... |
library(shiny)
library(shinydashboard)
library(shinythemes)
library(shinyjs)
library(shinyMobile)
library(readr)
library(leaflet)
library(leaflet.extras)
library(dplyr)
library(plotly)
library(ggplot2)
library(DT)
library(googleVis)
ui = f7Page(
title = "Coronavirus Ireland",... | /mobileapp.R | no_license | declan93/coronaviz | R | false | false | 14,560 | r | library(shiny)
library(shinydashboard)
library(shinythemes)
library(shinyjs)
library(shinyMobile)
library(readr)
library(leaflet)
library(leaflet.extras)
library(dplyr)
library(plotly)
library(ggplot2)
library(DT)
library(googleVis)
ui = f7Page(
title = "Coronavirus Ireland",... |
#' Mapas de distribucion en varias campañas
#'
#' Crea mapas con la distribución en biomasa o numero para distintas zonas: Porcupine (dns="Pnew"), el Cantábrico (dns=Cant), Cádiz= (dns=Arsa), y el Mediterráneo (dns=Medi)
#' @param gr Grupo de la especie: 1 peces, 2 crustáceos 3 moluscos 4 equinodermos 5 invertebrados 6... | /R/maphist.r | no_license | Franvgls/CampR | R | false | false | 11,962 | r | #' Mapas de distribucion en varias campañas
#'
#' Crea mapas con la distribución en biomasa o numero para distintas zonas: Porcupine (dns="Pnew"), el Cantábrico (dns=Cant), Cádiz= (dns=Arsa), y el Mediterráneo (dns=Medi)
#' @param gr Grupo de la especie: 1 peces, 2 crustáceos 3 moluscos 4 equinodermos 5 invertebrados 6... |
library(RSQLite)
library(ggplot2)
library(sensitivity)
library(gridExtra)
library(grid)
library(scales)
library(viridis)
library(plyr)
library(cowplot)
textSize = 14
pointSize = 1.0
lineSize = 1
plot_themes = theme_classic() +
theme(axis.line = element_line(size=1)) +
theme(axis.ticks = element_line(size=0.5)) ... | /figures/breadth_full/breadth_full.R | no_license | cobeylab/vaccine-manuscript | R | false | false | 9,105 | r | library(RSQLite)
library(ggplot2)
library(sensitivity)
library(gridExtra)
library(grid)
library(scales)
library(viridis)
library(plyr)
library(cowplot)
textSize = 14
pointSize = 1.0
lineSize = 1
plot_themes = theme_classic() +
theme(axis.line = element_line(size=1)) +
theme(axis.ticks = element_line(size=0.5)) ... |
library(tidyverse)
library(dplyr)
cat("Hello") | /code.R | no_license | kittela/Homework-0 | R | false | false | 47 | r | library(tidyverse)
library(dplyr)
cat("Hello") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/themes.R
\name{theme_selby}
\alias{theme_selby}
\title{Themes for ggplot2 and stuff}
\usage{
theme_selby(base_size = 11, base_family = "Arial Narrow")
}
\arguments{
\item{base_size}{base font size}
\item{base_family}{base font family}
}
\des... | /man/theme_selby.Rd | no_license | Selbosh/scrooge | R | false | true | 677 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/themes.R
\name{theme_selby}
\alias{theme_selby}
\title{Themes for ggplot2 and stuff}
\usage{
theme_selby(base_size = 11, base_family = "Arial Narrow")
}
\arguments{
\item{base_size}{base font size}
\item{base_family}{base font family}
}
\des... |
library(seqinr)
### Name: dinucleotides
### Title: Statistical over- and under- representation of dinucleotides in
### a sequence
### Aliases: rho zscore
### ** Examples
## Not run:
##D sequence <- sample(x = s2c("acgt"), size = 6000, replace = TRUE)
##D rho(sequence)
##D zscore(sequence, modele = "base")
##D zs... | /data/genthat_extracted_code/seqinr/examples/zscore.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 486 | r | library(seqinr)
### Name: dinucleotides
### Title: Statistical over- and under- representation of dinucleotides in
### a sequence
### Aliases: rho zscore
### ** Examples
## Not run:
##D sequence <- sample(x = s2c("acgt"), size = 6000, replace = TRUE)
##D rho(sequence)
##D zscore(sequence, modele = "base")
##D zs... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Rconcordance.R
\name{print.Rconcordance}
\alias{print.Rconcordance}
\title{Backport of print.Rconcordance for R < 4.3.0}
\usage{
\method{print}{Rconcordance}(x, ...)
}
\description{
See the original description in \code{tools::print.Rconcorda... | /man/print.Rconcordance.Rd | no_license | dmurdoch/backports | R | false | true | 347 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Rconcordance.R
\name{print.Rconcordance}
\alias{print.Rconcordance}
\title{Backport of print.Rconcordance for R < 4.3.0}
\usage{
\method{print}{Rconcordance}(x, ...)
}
\description{
See the original description in \code{tools::print.Rconcorda... |
library(ggplot2)
library(reshape2)
library(Rcpp)
library(RcppArmadillo)
library(maxLik)
library(evd)
library(chebpol)
library(foreach)
library(doParallel)
options(error = quote({dump.frames(to.file = TRUE)}))
model_name <- "MDCEV_share"
# setwd("~/Documents/Research/Store switching/processed data")
# plot.wd <- '~/De... | /to be deleted/share_allocation/Estimation test/ctrfact_compare_quaduature.R | no_license | Superet/Expenditure | R | false | false | 7,799 | r | library(ggplot2)
library(reshape2)
library(Rcpp)
library(RcppArmadillo)
library(maxLik)
library(evd)
library(chebpol)
library(foreach)
library(doParallel)
options(error = quote({dump.frames(to.file = TRUE)}))
model_name <- "MDCEV_share"
# setwd("~/Documents/Research/Store switching/processed data")
# plot.wd <- '~/De... |
# Making predictions on MNIST dataset
# REMOVE
# setwd('~/Box Sync/abarciausksas/myfiles/15D012 Advanced Computational Methods/datasets/MNIST/')
if (!require('class')) install.packages('class')
library(class)
if (!require('dplyr')) install.packages('dplyr')
library(dplyr)
success.rate <- function(predictions, actual)... | /PS4/kNN_MNIST.R | no_license | abarciauskas-bgse/Advanced-Computational-Methods | R | false | false | 1,962 | r | # Making predictions on MNIST dataset
# REMOVE
# setwd('~/Box Sync/abarciausksas/myfiles/15D012 Advanced Computational Methods/datasets/MNIST/')
if (!require('class')) install.packages('class')
library(class)
if (!require('dplyr')) install.packages('dplyr')
library(dplyr)
success.rate <- function(predictions, actual)... |
testlist <- list(lims = structure(c(6.98513633132639e-79, 5.22851419824833e+54, 5.22851419824845e+54, 0, 1.1125369201759e-308, 1.2136247081529e+132, 1.21362470825617e+132, 1.45354435784365e+135, 7.06327098013871e-304, 1.45350484989265e+135, 1.39067505747873e-309, 6.08376358744586e-310, 4.97264374531917e-304, 813190... | /palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612988515-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 1,363 | r | testlist <- list(lims = structure(c(6.98513633132639e-79, 5.22851419824833e+54, 5.22851419824845e+54, 0, 1.1125369201759e-308, 1.2136247081529e+132, 1.21362470825617e+132, 1.45354435784365e+135, 7.06327098013871e-304, 1.45350484989265e+135, 1.39067505747873e-309, 6.08376358744586e-310, 4.97264374531917e-304, 813190... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/randomForest.R
\name{build_node_randomForest}
\alias{build_node_randomForest}
\title{build_node_randomForest}
\usage{
build_node_randomForest(tree_table, leaf_val_type, whichNode, valueNeedsTag,
dataLevels, fieldTypes = NULL)
}
\arguments{
... | /aurelius/man/build_node_randomForest.Rd | permissive | mafpimentel/hadrian | R | false | true | 794 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/randomForest.R
\name{build_node_randomForest}
\alias{build_node_randomForest}
\title{build_node_randomForest}
\usage{
build_node_randomForest(tree_table, leaf_val_type, whichNode, valueNeedsTag,
dataLevels, fieldTypes = NULL)
}
\arguments{
... |
library(prodest)
### Name: panelSim
### Title: Simulate Panel dataset
### Aliases: panelSim
### ** Examples
require(prodest)
## Simulate a dataset with 100 firms (T = 50).
## \code{Panelsim()} delivers the last 10% of usable time per panel.
panel.data <- panelSim(N = 100, T = 50)
attach(panel.data)
... | /data/genthat_extracted_code/prodest/examples/panelSim.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 668 | r | library(prodest)
### Name: panelSim
### Title: Simulate Panel dataset
### Aliases: panelSim
### ** Examples
require(prodest)
## Simulate a dataset with 100 firms (T = 50).
## \code{Panelsim()} delivers the last 10% of usable time per panel.
panel.data <- panelSim(N = 100, T = 50)
attach(panel.data)
... |
#PENAMBAHAN
1+1
#MODULO
12%%5
#PENGURANGAN
12-5
#AKAR PANGKAT
sqrt(16)
#PANGKAT
9^2
# not = ! x
# and & y
# and = x && y
#or x | y
x = TRUE
!x = FALSE
y = FALSE
# and
x & y
#and
x && y
#or
x | y
#if then
x || y
"Hello WOrld"
my.string = "Hello World"
print(my.string)
my.string
rm (x)
x = TRUE
rm(x)
x = FAL... | /test.R | no_license | elvisirait/belajar_R | R | false | false | 3,531 | r | #PENAMBAHAN
1+1
#MODULO
12%%5
#PENGURANGAN
12-5
#AKAR PANGKAT
sqrt(16)
#PANGKAT
9^2
# not = ! x
# and & y
# and = x && y
#or x | y
x = TRUE
!x = FALSE
y = FALSE
# and
x & y
#and
x && y
#or
x | y
#if then
x || y
"Hello WOrld"
my.string = "Hello World"
print(my.string)
my.string
rm (x)
x = TRUE
rm(x)
x = FAL... |
## Creates the basic plots for figure 2B (proportion of pRF centers across ecc bands)
# Note that .mat files are organized such that 1st col is ROI, 2nd col is subject,
# 3rd col is band #
# ROI indices are: 1 = V1, 2 = IOG, 3 = pFus, 4 = mFus, 5 = pSTS, 6 = mSTS, 7 = CoS
rm(list=ls())
library(R.matlab)
library(tidyv... | /R_code/code/fig2b.R | no_license | VPNL/fibeRFs | R | false | false | 11,122 | r | ## Creates the basic plots for figure 2B (proportion of pRF centers across ecc bands)
# Note that .mat files are organized such that 1st col is ROI, 2nd col is subject,
# 3rd col is band #
# ROI indices are: 1 = V1, 2 = IOG, 3 = pFus, 4 = mFus, 5 = pSTS, 6 = mSTS, 7 = CoS
rm(list=ls())
library(R.matlab)
library(tidyv... |
rm(list = ls())
library(plyr)
library(readxl)
library(RcppRoll)
library(reshape2)
library(tidyverse)
library(lubridate)
library(forecast)
library(polynom)
library(urca)
library(Rssa)
library(lmtest)
library(tseries)
library(seasonal)
### Datos
info <- read_excel("~/TO.xlsx")
info$mes1 <- ymd(info$mes1)
### Gráficos... | /Tasa de Ocupación.R | no_license | alejandrarchbold/Econometrics | R | false | false | 3,341 | r | rm(list = ls())
library(plyr)
library(readxl)
library(RcppRoll)
library(reshape2)
library(tidyverse)
library(lubridate)
library(forecast)
library(polynom)
library(urca)
library(Rssa)
library(lmtest)
library(tseries)
library(seasonal)
### Datos
info <- read_excel("~/TO.xlsx")
info$mes1 <- ymd(info$mes1)
### Gráficos... |
# TOOL acgh-fetch-probe-positions-from-geo.R: "Fetch probe positions from GEO" (Fetches microarray probe positions from the GEO database.)
# INPUT normalized.tsv: normalized.tsv TYPE GENE_EXPRS
# OUTPUT probe-positions.tsv: probe-positions.tsv
# PARAMETER platform: Platform TYPE STRING DEFAULT GPL (The accession of the... | /tools/microarray/R/acgh-fetch-probe-positions-from-geo.R | permissive | chipster/chipster-tools | R | false | false | 3,830 | r | # TOOL acgh-fetch-probe-positions-from-geo.R: "Fetch probe positions from GEO" (Fetches microarray probe positions from the GEO database.)
# INPUT normalized.tsv: normalized.tsv TYPE GENE_EXPRS
# OUTPUT probe-positions.tsv: probe-positions.tsv
# PARAMETER platform: Platform TYPE STRING DEFAULT GPL (The accession of the... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pulls.R
\name{get.pull.request.comments}
\alias{get.pull.request.comments}
\title{List comments on a pull request}
\usage{
get.pull.request.comments(owner, repo, id, ctx = get.github.context())
}
\arguments{
\item{owner}{the repo owner}
\ite... | /man/get.pull.request.comments.Rd | permissive | cscheid/rgithub | R | false | true | 517 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pulls.R
\name{get.pull.request.comments}
\alias{get.pull.request.comments}
\title{List comments on a pull request}
\usage{
get.pull.request.comments(owner, repo, id, ctx = get.github.context())
}
\arguments{
\item{owner}{the repo owner}
\ite... |
library(PPRL)
### Name: ElegantPairingVec
### Title: Simple Pairing Function
### Aliases: ElegantPairingVec Pairing 'unordered pairing'
### ** Examples
# Load test data
testFile <- file.path(path.package("PPRL"), "extdata/testdata.csv")
testData <- read.csv(testFile, head = FALSE, sep = "\t",
colClasses = "charac... | /data/genthat_extracted_code/PPRL/examples/ElegantPairingVec.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 546 | r | library(PPRL)
### Name: ElegantPairingVec
### Title: Simple Pairing Function
### Aliases: ElegantPairingVec Pairing 'unordered pairing'
### ** Examples
# Load test data
testFile <- file.path(path.package("PPRL"), "extdata/testdata.csv")
testData <- read.csv(testFile, head = FALSE, sep = "\t",
colClasses = "charac... |
## Data subset is read in using read.csv.sql with sqldf package with the following:
## data <- read.csv.sql("household_power_consumption.txt", header=TRUE, sep=";",
## sql="Select * from file where Date = '1/2/2007' OR Date = '2/2/2007'")
## The data object is then dumped into data.object file to sa... | /plot4.R | no_license | crusainte/ExData_Plotting1 | R | false | false | 1,527 | r | ## Data subset is read in using read.csv.sql with sqldf package with the following:
## data <- read.csv.sql("household_power_consumption.txt", header=TRUE, sep=";",
## sql="Select * from file where Date = '1/2/2007' OR Date = '2/2/2007'")
## The data object is then dumped into data.object file to sa... |
# Aula no GIJC19 - Hamburgo
# Data Hands-On: The Power of R
# Luuk Sengers (Speaker) Co-founder, Trainer, Story-Based Inquiry Associates
# Jonathan Stoneman (Speaker) Trainer, Freelance
# Robert Gebeloff (Speaker) Data Projects Editor, The New York Times
# Os arquivos de dados estão em: http://bit.ly/Tidyverse_trai... | /bootcamp_r/R_session_1.R | no_license | abraji/gijc19 | R | false | false | 9,713 | r | # Aula no GIJC19 - Hamburgo
# Data Hands-On: The Power of R
# Luuk Sengers (Speaker) Co-founder, Trainer, Story-Based Inquiry Associates
# Jonathan Stoneman (Speaker) Trainer, Freelance
# Robert Gebeloff (Speaker) Data Projects Editor, The New York Times
# Os arquivos de dados estão em: http://bit.ly/Tidyverse_trai... |
### load packages
library(tidyverse)
library(lubridate)
library(data.table)
library(janitor)
library(ggpubr)
Sys.setenv(TZ='UTC')
#Load data
generator_details_AEMO <- fread("D:/Data/RAW/AEMO/Website/generators_and_loads.csv") %>% clean_names() %>%
distinct(duid, .keep_all = TRUE) %>%
select(duid, classification... | /R/Analysis1_Eigen.R | no_license | MatthewKatzen/NEM_Renewables | R | false | false | 5,539 | r |
### load packages
library(tidyverse)
library(lubridate)
library(data.table)
library(janitor)
library(ggpubr)
Sys.setenv(TZ='UTC')
#Load data
generator_details_AEMO <- fread("D:/Data/RAW/AEMO/Website/generators_and_loads.csv") %>% clean_names() %>%
distinct(duid, .keep_all = TRUE) %>%
select(duid, classification... |
#' Plot genome distribution through time
#'
#' @param root Path to the simulation
#' @param y Variable to show
#' @param times Optional vector of time points to show
#' @param facet_by Variable to facet by
#' @param archfile Optional architecture file name
#' @param ... Parameters to be passed to `ggridges::geom_densit... | /egssimtools/tmp/plot_genome_ridges.R | no_license | rscherrer/ExplicitGenomeSpeciation | R | false | false | 1,426 | r | #' Plot genome distribution through time
#'
#' @param root Path to the simulation
#' @param y Variable to show
#' @param times Optional vector of time points to show
#' @param facet_by Variable to facet by
#' @param archfile Optional architecture file name
#' @param ... Parameters to be passed to `ggridges::geom_densit... |
#' @method print miivs
#' @export
print.miivs <- function(x,...){
x <- x$eqns
for (i in 1:length(x)){
LHS <- paste(x[[i]]$DVobs, collapse = ", ")
RHS <- paste(x[[i]]$IVobs, collapse = ", ")
Instruments <- paste(x[[i]]$MIIVs, collapse = ", ")
Disturbance <- paste(x[[i]]$CDist, collapse = ", "... | /R/print.miivs.R | no_license | jtextor/MIIVsem | R | false | false | 731 | r | #' @method print miivs
#' @export
print.miivs <- function(x,...){
x <- x$eqns
for (i in 1:length(x)){
LHS <- paste(x[[i]]$DVobs, collapse = ", ")
RHS <- paste(x[[i]]$IVobs, collapse = ", ")
Instruments <- paste(x[[i]]$MIIVs, collapse = ", ")
Disturbance <- paste(x[[i]]$CDist, collapse = ", "... |
library(reshape2)
library(dplyr)
# home dir
# setwd("~/R/conclusaoCleanData/UCI HAR Dataset")
#### General data load ####
# activity labels
actLabels <- read.delim("activity_labels.txt", header = FALSE, sep = " ")
# features
featLabels <- read.delim("features.txt", header = FALSE, sep = " ")
#### Train... | /run_analysis.R | no_license | rmoreira2/-Getting-and-Cleaning-Data-Course-Project | R | false | false | 2,574 | r | library(reshape2)
library(dplyr)
# home dir
# setwd("~/R/conclusaoCleanData/UCI HAR Dataset")
#### General data load ####
# activity labels
actLabels <- read.delim("activity_labels.txt", header = FALSE, sep = " ")
# features
featLabels <- read.delim("features.txt", header = FALSE, sep = " ")
#### Train... |
# Code to estimate reporting
# Sanbox to look at temporal variation in reporting
# Set up paths and parameters ---------------------------------------------
# Load libraries
library(tidyverse)
library(padr)
library(mgcv)
# Set paths
setwd("~/Documents/lshtm/github repos/CFR_calculation/global_estimates/")
if(grepl... | /global_estimates/scripts/main_script_temporal.R | no_license | vsenderov/CFR_calculation | R | false | false | 3,693 | r | # Code to estimate reporting
# Sanbox to look at temporal variation in reporting
# Set up paths and parameters ---------------------------------------------
# Load libraries
library(tidyverse)
library(padr)
library(mgcv)
# Set paths
setwd("~/Documents/lshtm/github repos/CFR_calculation/global_estimates/")
if(grepl... |
#' Extracts Tumor Sample Barcodes where the given genes are mutated.
#'
#' @description Extracts Tumor Sample Barcodes where the given genes are mutated.
#'
#' @param maf an MAF object generated by \code{\link{read.maf}}
#' @param genes Hogo_Symbol for which sample names to be extracted.
#' @param justNames if TRUE, ju... | /R/genesToBarcodes.R | permissive | ttriche/maftools | R | false | false | 1,477 | r | #' Extracts Tumor Sample Barcodes where the given genes are mutated.
#'
#' @description Extracts Tumor Sample Barcodes where the given genes are mutated.
#'
#' @param maf an MAF object generated by \code{\link{read.maf}}
#' @param genes Hogo_Symbol for which sample names to be extracted.
#' @param justNames if TRUE, ju... |
Performance.Dyad.Model.10.lag = function(N.dyad,T.obs,
c,rho.Y,a,a.2,p,p.2,
sigma.eps.F,sigma.eps.M,rho.eps.FM,
sigma.nu,
mu.XF,sigma.XF,mu.XM,sigma.XM,rho.X,is.center.X,alpha,is.REML){
# Generate data
data = Sim.Dyad.Model.10.lag(N.dyad,T.obs,
c,rho.Y,a,a.2,p,p.2,
sigma.eps.F,sigma.eps.M,rho.eps.FM,
sigma.n... | /R/Performance.Dyad.Model.10.lag.R | no_license | smasongarrison/PowerLAPIM | R | false | false | 3,350 | r | Performance.Dyad.Model.10.lag = function(N.dyad,T.obs,
c,rho.Y,a,a.2,p,p.2,
sigma.eps.F,sigma.eps.M,rho.eps.FM,
sigma.nu,
mu.XF,sigma.XF,mu.XM,sigma.XM,rho.X,is.center.X,alpha,is.REML){
# Generate data
data = Sim.Dyad.Model.10.lag(N.dyad,T.obs,
c,rho.Y,a,a.2,p,p.2,
sigma.eps.F,sigma.eps.M,rho.eps.FM,
sigma.n... |
#' @importFrom utils installed.packages
#' @importFrom data.table fread
#' @export
fread_folder = function(directory = NULL,
extension = "CSV",
sep="auto",
nrows=-1L,
header="auto",
na.strings... | /R/fread_folder.R | no_license | cran/easycsv | R | false | false | 4,689 | r | #' @importFrom utils installed.packages
#' @importFrom data.table fread
#' @export
fread_folder = function(directory = NULL,
extension = "CSV",
sep="auto",
nrows=-1L,
header="auto",
na.strings... |
### 《民意調查資料分析的R實戰手冊》
### 劉正山著.2018五南出版
### 5.3 變數的描述製表與製圖
# 在正式操作前,用本資料夾中的章節專案檔(.Rproj)點開專案再正式開始練習
# 請用此指令確認目前工作路徑是現在章節的資料夾
here::here()
## 用製表的方式描述變數
library(sjlabelled)
tscs2013 <- read_data("../tscs2013q2.sav") #讀入原始檔
# table()
table(tscs2013$v65, exclude=NULL) # exclude=NULL 顯示無效值
# gmodels::CrossTabsle()
li... | /05備料_變數的編碼與描述/5.3_變數的描述製表與製圖.R | no_license | frankcsliu/R4surveyresearch | R | false | false | 3,551 | r | ### 《民意調查資料分析的R實戰手冊》
### 劉正山著.2018五南出版
### 5.3 變數的描述製表與製圖
# 在正式操作前,用本資料夾中的章節專案檔(.Rproj)點開專案再正式開始練習
# 請用此指令確認目前工作路徑是現在章節的資料夾
here::here()
## 用製表的方式描述變數
library(sjlabelled)
tscs2013 <- read_data("../tscs2013q2.sav") #讀入原始檔
# table()
table(tscs2013$v65, exclude=NULL) # exclude=NULL 顯示無效值
# gmodels::CrossTabsle()
li... |
## "makeCacheMatrix" function creates a special "matrix" object that can cache its inverse. Object has several functions that allows to set up
## "matrix" values, read "matrix" values, read cached inverse of "matrix" or set by user "inverse matrix". Inverse "matrix" is calculated by "CacheSolve" funtion below.
## "Ca... | /cachematrix.R | no_license | jpv7311/ProgrammingAssignment2 | R | false | false | 1,977 | r | ## "makeCacheMatrix" function creates a special "matrix" object that can cache its inverse. Object has several functions that allows to set up
## "matrix" values, read "matrix" values, read cached inverse of "matrix" or set by user "inverse matrix". Inverse "matrix" is calculated by "CacheSolve" funtion below.
## "Ca... |
testlist <- list(Rs = numeric(0), atmp = c(9.53708019597101e-228, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615860710-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 456 | r | testlist <- list(Rs = numeric(0), atmp = c(9.53708019597101e-228, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0... |
#' Create Function to Provide Package Objects in Global Environment
#'
#' @param package name of package for which to create a shortcut to
#' \code{assignPackageObjects(package = package)}
#' @return This function returns a function that internally calls
#' \code{assignPackageObjects(package = package)}
#' @export... | /R/createFunctionAssignObjects.R | permissive | KWB-R/kwb.utils | R | false | false | 991 | r |
#' Create Function to Provide Package Objects in Global Environment
#'
#' @param package name of package for which to create a shortcut to
#' \code{assignPackageObjects(package = package)}
#' @return This function returns a function that internally calls
#' \code{assignPackageObjects(package = package)}
#' @export... |
#' Word stem tokenizer
#'
#' This function turns its input into a character vector of word stems. This is
#' just a wrapper around the \code{\link[SnowballC]{wordStem}} function from the
#' SnowballC package which does the heavy lifting, but this function provides a
#' consistent interface with the rest of the tokenize... | /R/stem-tokenizers.R | no_license | kbenoit/tokenizers | R | false | false | 3,259 | r | #' Word stem tokenizer
#'
#' This function turns its input into a character vector of word stems. This is
#' just a wrapper around the \code{\link[SnowballC]{wordStem}} function from the
#' SnowballC package which does the heavy lifting, but this function provides a
#' consistent interface with the rest of the tokenize... |
# install.packages("devtools")
# devtools::install_github("RcppCore/Rcpp")
# devtools::install_github("rstats-db/DBI")
# devtools::install_github("rstats-db/RPostgres")
### COMMENTED OUT TO PREVENT OVERWRITING DATA
# library(DBI)
# con <- dbConnect(RPostgres::Postgres(), dbname = "toshi", host = "toshi.cn6zzwcfsto5.u... | /charts/charts.R | no_license | simpsonm/bitcointrans | R | false | false | 6,339 | r | # install.packages("devtools")
# devtools::install_github("RcppCore/Rcpp")
# devtools::install_github("rstats-db/DBI")
# devtools::install_github("rstats-db/RPostgres")
### COMMENTED OUT TO PREVENT OVERWRITING DATA
# library(DBI)
# con <- dbConnect(RPostgres::Postgres(), dbname = "toshi", host = "toshi.cn6zzwcfsto5.u... |
#HW11-Kexin_Ziqian_Hantian
rm(list=ls())
# Reading a Rdata file from Github.
install.packages("repmis")
library(repmis)
dat<-source_data("https://github.com/DarcyShu/ArrestData-Whole-Group/raw/master/Group2/ArrestData.csv")
#27red, 13(a) blue,39 purple,9 orange
dat <- read.csv("ArrestData(1).csv")
#datac... | /Main.R | no_license | DarcyShu/Kexin_Ziqian_Hantian | R | false | false | 21,764 | r | #HW11-Kexin_Ziqian_Hantian
rm(list=ls())
# Reading a Rdata file from Github.
install.packages("repmis")
library(repmis)
dat<-source_data("https://github.com/DarcyShu/ArrestData-Whole-Group/raw/master/Group2/ArrestData.csv")
#27red, 13(a) blue,39 purple,9 orange
dat <- read.csv("ArrestData(1).csv")
#datac... |
library(tidyverse)
library(rsample)
d <- read_tsv("satisfaction_survey.txt")
d$tenure[1] <- 20
d$satisfaction[1] <- 10
lm.1 <- lm(satisfaction ~ assigned_sex + location + tenure,
data=d)
lm.2 <- lm(satisfaction ~ assigned_sex + tenure,
data=d)
anova(lm.2,lm.1)
summary(lm.2)
... | /wk-04/week-4-test.r | no_license | StevioD/qm-lectures | R | false | false | 1,777 | r | library(tidyverse)
library(rsample)
d <- read_tsv("satisfaction_survey.txt")
d$tenure[1] <- 20
d$satisfaction[1] <- 10
lm.1 <- lm(satisfaction ~ assigned_sex + location + tenure,
data=d)
lm.2 <- lm(satisfaction ~ assigned_sex + tenure,
data=d)
anova(lm.2,lm.1)
summary(lm.2)
... |
# Multispecies, spatially implicit IPM
# This version makes it possible to assume "no overlap"
# for intraspecific competition only or intra- and interspecific competition
#============================================================================================#
# Calculate the equilibrium areas.
#================... | /removals/ipm/IPM-removeARTR.r | no_license | pbadler/ExperimentTests | R | false | false | 2,320 | r | # Multispecies, spatially implicit IPM
# This version makes it possible to assume "no overlap"
# for intraspecific competition only or intra- and interspecific competition
#============================================================================================#
# Calculate the equilibrium areas.
#================... |
#Code generated by RScriptGenerator.java
SVMEnsemble_5_howtopredict<-function(SELECTION,test_normal,test_index,y,yName,d11,created11,model11,svm11,d12,created12,model12,svm12,d13,created13,model13,svm13,d21,created21,model21,svm21,d22,created22,model22,svm22){
if(DEBUG){
print(test_index)
print(rownames(test_norma... | /SVMEnsemble_5.R | no_license | abhishekmaj08/kESVR | R | false | false | 36,322 | r | #Code generated by RScriptGenerator.java
SVMEnsemble_5_howtopredict<-function(SELECTION,test_normal,test_index,y,yName,d11,created11,model11,svm11,d12,created12,model12,svm12,d13,created13,model13,svm13,d21,created21,model21,svm21,d22,created22,model22,svm22){
if(DEBUG){
print(test_index)
print(rownames(test_norma... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FMIWFSClient.R
\docType{data}
\name{FMIWFSClient}
\alias{FMIWFSClient}
\title{A class to retrieve and manipulate data from the FMI open API}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
FMIWFSClient
}
\description... | /man/FMIWFSClient.Rd | permissive | rOpenGov/fmi | R | false | true | 846 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FMIWFSClient.R
\docType{data}
\name{FMIWFSClient}
\alias{FMIWFSClient}
\title{A class to retrieve and manipulate data from the FMI open API}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
FMIWFSClient
}
\description... |
###################
# Prep Claim Data #
###################
# Start
cl_File_List <- list.files(paste(Path, "/Data/Claims Data", sep = ""))
num_cl_file <- length(cl_File_List) - 2 # Number of files in folder - 2 due to folders
for(clfile in 1:num_cl_file){
# Check to see if CSV should be created
... | /R code/Prep_Claim_Data.R | no_license | CharlFM/GAP_Reporting_Tool | R | false | false | 4,244 | r | ###################
# Prep Claim Data #
###################
# Start
cl_File_List <- list.files(paste(Path, "/Data/Claims Data", sep = ""))
num_cl_file <- length(cl_File_List) - 2 # Number of files in folder - 2 due to folders
for(clfile in 1:num_cl_file){
# Check to see if CSV should be created
... |
row.ab<-dim(dlt)[1]
clu.ab<-dim(dlt)[2]
ab.drf <-c(0,0,0,0,0,0,0)
ab.drfII <-c(0,0,0,0,0,0,0)
ab.bnf <-c(0,0,0,0,0,0,0)
ab.bnfII <-c(0,0,0,0,0,0,0)
ab.xgb <-c(0,0,0,0,0,0,0)
ab.xgbII <-c(0,0,0,0,0,0,0)
ab.bnfAB <-c(0,0,0,0,0,0,0)
ab.glmf <-c(0,0,0,0,0,0,0)
ab.glmfII<-c(0,0,0,0,0,0,0)
ab.svmf <-c(0,0,... | /dlt.deepX.R | no_license | dlt-lee/dlt | R | false | false | 26,573 | r | row.ab<-dim(dlt)[1]
clu.ab<-dim(dlt)[2]
ab.drf <-c(0,0,0,0,0,0,0)
ab.drfII <-c(0,0,0,0,0,0,0)
ab.bnf <-c(0,0,0,0,0,0,0)
ab.bnfII <-c(0,0,0,0,0,0,0)
ab.xgb <-c(0,0,0,0,0,0,0)
ab.xgbII <-c(0,0,0,0,0,0,0)
ab.bnfAB <-c(0,0,0,0,0,0,0)
ab.glmf <-c(0,0,0,0,0,0,0)
ab.glmfII<-c(0,0,0,0,0,0,0)
ab.svmf <-c(0,0,... |
#' A qPCR ChIP-seq QC function for Vii7 qPCR machine
#'
#' This function allows you to calculate qPCR Fold Enrichment
#' @author
#' Alireza Lorzadeh
#' @param x 'Vii7 result Excel sheet'
#' @param Name '.... Title for you graph, (ie: Projects name and date)'
#' @keywords qpcr
#' @examples
#' @import ggplot2
#'
#' F... | /R/qcQpcr.R | no_license | cran/qcQpcr | R | false | false | 15,154 | r | #' A qPCR ChIP-seq QC function for Vii7 qPCR machine
#'
#' This function allows you to calculate qPCR Fold Enrichment
#' @author
#' Alireza Lorzadeh
#' @param x 'Vii7 result Excel sheet'
#' @param Name '.... Title for you graph, (ie: Projects name and date)'
#' @keywords qpcr
#' @examples
#' @import ggplot2
#'
#' F... |
rm(list = ls())
# Funcao objetivo
aptidao = function(individuo){
a = (sum(individuo ^ 2) / (3.2 * sqrt(abs(max(individuo)))))
a
}
# Funcao de mutacao
mutacao = function(individuo, qt_genes){
mutados = sample(length(individuo), qt_genes)
for(i in mutados){
aux = runif(1, -10, 10)
whi... | /ia/algoritmos_geneticos/otimizacao.r | no_license | nathan-cruz77/faculdade | R | false | false | 2,853 | r | rm(list = ls())
# Funcao objetivo
aptidao = function(individuo){
a = (sum(individuo ^ 2) / (3.2 * sqrt(abs(max(individuo)))))
a
}
# Funcao de mutacao
mutacao = function(individuo, qt_genes){
mutados = sample(length(individuo), qt_genes)
for(i in mutados){
aux = runif(1, -10, 10)
whi... |
#' Analytic solution for a symmetric elliptic curve
#'
#' Analytic solution for a symmetric elliptic curve \eqn{y(x)}
#'
#' @method solve_sym ecd
#'
#' @param object an object of ecd class
#' @param x array of x dimension
#'
#' @return array of y
#'
#' @keywords solve
#'
#' @author Stephen H-T. Lihn
#'
#' @export solv... | /R/ecd-solve-sym-generic.R | no_license | cran/ecd | R | false | false | 1,938 | r | #' Analytic solution for a symmetric elliptic curve
#'
#' Analytic solution for a symmetric elliptic curve \eqn{y(x)}
#'
#' @method solve_sym ecd
#'
#' @param object an object of ecd class
#' @param x array of x dimension
#'
#' @return array of y
#'
#' @keywords solve
#'
#' @author Stephen H-T. Lihn
#'
#' @export solv... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/block_spacer.R
\name{block_spacer}
\alias{block_spacer}
\title{A spacer block}
\usage{
block_spacer()
}
\description{
With \code{block_spacer()} we can more easily define an area of whitespace in a
block-based layout. This function is meant t... | /man/block_spacer.Rd | permissive | rstudio/blastula | R | false | true | 1,813 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/block_spacer.R
\name{block_spacer}
\alias{block_spacer}
\title{A spacer block}
\usage{
block_spacer()
}
\description{
With \code{block_spacer()} we can more easily define an area of whitespace in a
block-based layout. This function is meant t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.