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 |
|---|---|---|---|---|---|---|---|---|---|
if(!require("stringr")) install.packages("stringr", repos="http://cran.rstudio.com")
template <- readLines("WebTechnologies.ctv")
pattern <- "pkg>[[:alnum:]]+[[:alnum:].]*[[:alnum:]]+"
out <- paste0(template, collapse = " ")
pkgs <- stringr::str_extract_all(out, pattern)[[1]]
pkgs <- unique(gsub("^pkg>", "", pkgs))
pri... | /buildxml.R | permissive | muschellij2/webservices | R | false | false | 1,311 | r | if(!require("stringr")) install.packages("stringr", repos="http://cran.rstudio.com")
template <- readLines("WebTechnologies.ctv")
pattern <- "pkg>[[:alnum:]]+[[:alnum:].]*[[:alnum:]]+"
out <- paste0(template, collapse = " ")
pkgs <- stringr::str_extract_all(out, pattern)[[1]]
pkgs <- unique(gsub("^pkg>", "", pkgs))
pri... |
library(tidyverse)
library(unjuris)
df_juris <- unjuris::juris_search(year_start="1900",
year_end="2020")
#1726
df_juirs2 <- unjuris::juris_search(decision_type="all")
readr::write_csv2(df_juris, here("data", "df_juris.csv"))
names(df_juris)
| /script/unjuris.R | no_license | werkstattcodes/CAT | R | false | false | 284 | r | library(tidyverse)
library(unjuris)
df_juris <- unjuris::juris_search(year_start="1900",
year_end="2020")
#1726
df_juirs2 <- unjuris::juris_search(decision_type="all")
readr::write_csv2(df_juris, here("data", "df_juris.csv"))
names(df_juris)
|
utils::globalVariables(c("inp", "outp"))
| /R/globals.R | no_license | cran/MixOptim | R | false | false | 42 | r | utils::globalVariables(c("inp", "outp"))
|
# Homework 1 - Submitted by Manan Shah on September 2, 2017.
# Portions of this code came from Introduction to Data Science.
# But the comments are all original.
# Name: Manan Shah
# SUID: 205981068
# IST 687
# Lab 1 - Introduction
# Due Date: September 06,2017
# Submission Date: September 02, 2017
# 1
##... | /01. Basics of R.R | no_license | HakanMehmetcik/example1 | R | false | false | 2,180 | r | # Homework 1 - Submitted by Manan Shah on September 2, 2017.
# Portions of this code came from Introduction to Data Science.
# But the comments are all original.
# Name: Manan Shah
# SUID: 205981068
# IST 687
# Lab 1 - Introduction
# Due Date: September 06,2017
# Submission Date: September 02, 2017
# 1
##... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/random_graph.R
\name{rgraph_ba}
\alias{rgraph_ba}
\alias{scale-free}
\title{Scale-free and Homophilic Random Networks}
\usage{
rgraph_ba(m0 = 1L, m = 1L, t = 10L, graph = NULL, self = TRUE,
eta = NULL)
}
\arguments{
\item{m0}{Integer scalar... | /man/rgraph_ba.Rd | permissive | saharnazb/netdiffuseR | R | false | true | 4,532 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/random_graph.R
\name{rgraph_ba}
\alias{rgraph_ba}
\alias{scale-free}
\title{Scale-free and Homophilic Random Networks}
\usage{
rgraph_ba(m0 = 1L, m = 1L, t = 10L, graph = NULL, self = TRUE,
eta = NULL)
}
\arguments{
\item{m0}{Integer scalar... |
# Exercise 1: calling built-in functions
# Create a variable `my_name` that contains your name
my_name <- "Alex Nguyen"
# Create a variable `name_length` that holds how many letters (including spaces)
# are in your name (use the `nchar()` function)
name_length <- nchar(my_name)
# Print the number of letters in your ... | /chapter-06-exercises/exercise-1/exercise.R | permissive | nguyena8/book-exercises | R | false | false | 1,537 | r | # Exercise 1: calling built-in functions
# Create a variable `my_name` that contains your name
my_name <- "Alex Nguyen"
# Create a variable `name_length` that holds how many letters (including spaces)
# are in your name (use the `nchar()` function)
name_length <- nchar(my_name)
# Print the number of letters in your ... |
################
# This code tests some of the checkDataObject functionality.
# Needs to be updated to check additional functionality.
################
library(RUnit)
#############
# Check the base cases that should on tinyMetaObject
#############
testTinyMeta <- list()
testTinyMeta$originalData <- tinyMetaObject$ori... | /inst/unitTests/test_checkDataObject.R | no_license | cran/MetaIntegrator | R | false | false | 3,304 | r | ################
# This code tests some of the checkDataObject functionality.
# Needs to be updated to check additional functionality.
################
library(RUnit)
#############
# Check the base cases that should on tinyMetaObject
#############
testTinyMeta <- list()
testTinyMeta$originalData <- tinyMetaObject$ori... |
## some instructions for testing your makeCacheMatrix and cacheSolve functions
This is from this post: "Simple test matrices for the lexical scoping programming assignment"
https://www.coursera.org/learn/r-programming/discussions/weeks/3/threads/ePlO1eMdEeahzg7_4P4Vvg
R session:
> # Matrices for testing the R func... | /cachematrix.R | no_license | CinaYazdi/ProgrammingAssignment2 | R | false | false | 3,144 | r | ## some instructions for testing your makeCacheMatrix and cacheSolve functions
This is from this post: "Simple test matrices for the lexical scoping programming assignment"
https://www.coursera.org/learn/r-programming/discussions/weeks/3/threads/ePlO1eMdEeahzg7_4P4Vvg
R session:
> # Matrices for testing the R func... |
###The scrit is to use bootstrappng method for
setwd("C:\\Users\\think\\Desktop\\Mouse_otherCancer")
library(pracma)
library(MutationalPatterns)
library("BSgenome.Mmusculus.UCSC.mm10", character.only = TRUE)
ref_genome <- "BSgenome.Mmusculus.UCSC.mm10"
#load data
vcf_files = list.files( pattern = ".vcf", ... | /MutationSignatureBootstrapping/Bootstrap.r | no_license | QingLuo90/Mutation-signature-study | R | false | false | 5,160 | r | ###The scrit is to use bootstrappng method for
setwd("C:\\Users\\think\\Desktop\\Mouse_otherCancer")
library(pracma)
library(MutationalPatterns)
library("BSgenome.Mmusculus.UCSC.mm10", character.only = TRUE)
ref_genome <- "BSgenome.Mmusculus.UCSC.mm10"
#load data
vcf_files = list.files( pattern = ".vcf", ... |
testlist <- list(x = integer(0), y = c(-2015035392L, 0L))
result <- do.call(diffrprojects:::dist_mat_absolute,testlist)
str(result) | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609962195-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 131 | r | testlist <- list(x = integer(0), y = c(-2015035392L, 0L))
result <- do.call(diffrprojects:::dist_mat_absolute,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discovr.R
\name{listOut}
\alias{listOut}
\title{function to recover data from JSON list}
\usage{
listOut(input)
}
\arguments{
\item{input}{is the specific JSON list dataset}
}
\value{
returns the recovered data.frame
}
\description{
function ... | /man/listOut.Rd | no_license | Kohze/Discovr | R | false | true | 354 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discovr.R
\name{listOut}
\alias{listOut}
\title{function to recover data from JSON list}
\usage{
listOut(input)
}
\arguments{
\item{input}{is the specific JSON list dataset}
}
\value{
returns the recovered data.frame
}
\description{
function ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/payload_PARAMETERS_PARENT.R
\name{par_feature_capabilities}
\alias{par_feature_capabilities}
\title{Parse PARAMETERS packet for feature capabilities}
\usage{
par_feature_capabilities(value, key)
}
\arguments{
\item{value}{portion of ... | /AGread/man/par_feature_capabilities.Rd | permissive | akhikolla/InformationHouse | R | false | true | 486 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/payload_PARAMETERS_PARENT.R
\name{par_feature_capabilities}
\alias{par_feature_capabilities}
\title{Parse PARAMETERS packet for feature capabilities}
\usage{
par_feature_capabilities(value, key)
}
\arguments{
\item{value}{portion of ... |
library(dplyr)
## This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
## grab all NEI entries involving motor vehicles
SCCsub<-SCC[grep("Mobile.*Vehicles",SCC$EI.Sector),]
emissionsMVMD<-subset(NEI,SCC %in% SCCsub$SCC & fip... | /plot6.R | no_license | LloydNarciso/dataScienceCourse4Week4 | R | false | false | 1,382 | r | library(dplyr)
## This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
## grab all NEI entries involving motor vehicles
SCCsub<-SCC[grep("Mobile.*Vehicles",SCC$EI.Sector),]
emissionsMVMD<-subset(NEI,SCC %in% SCCsub$SCC & fip... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bfi.R
\name{bfi}
\alias{bfi}
\title{Baseflow Separation}
\usage{
bfi(date, discharge, by = "water year", f = 0.9, N = 5L,
STAID = "Unknown")
}
\arguments{
\item{date}{the date for each \code{discharge} value, should be of class "Date." Miss... | /man/bfi.Rd | permissive | smwesten-usgs/recharge | R | false | true | 2,231 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bfi.R
\name{bfi}
\alias{bfi}
\title{Baseflow Separation}
\usage{
bfi(date, discharge, by = "water year", f = 0.9, N = 5L,
STAID = "Unknown")
}
\arguments{
\item{date}{the date for each \code{discharge} value, should be of class "Date." Miss... |
## THIS IS SLOW AND INEFFICIENT
##IGNORE AND USE RANKALL
rankall2 <- function(outcome, num = "best"){
valid_outcomes=c("heart attack","heart failure", "pneumonia")
# check outcome is valid
if (!outcome%in%valid_outcomes){
stop("Invalid outcome")
}
outcome_col=c(11,17,23)
#3 columns number... | /rankall2.R | no_license | sebd469/assignment3 | R | false | false | 1,285 | r | ## THIS IS SLOW AND INEFFICIENT
##IGNORE AND USE RANKALL
rankall2 <- function(outcome, num = "best"){
valid_outcomes=c("heart attack","heart failure", "pneumonia")
# check outcome is valid
if (!outcome%in%valid_outcomes){
stop("Invalid outcome")
}
outcome_col=c(11,17,23)
#3 columns number... |
library(informR)
### Name: gen.evl
### Title: Generate numeric categories of events.
### Aliases: gen.evl
### ** Examples
rawevents<-sample(rep(c("ran","eat","stay","eat","ran","play"),100))
actors<-rep(c("Jim","Bill","Pete"),10)
eventlist<-cbind(rawevents,actors)
evls<-gen.evl(eventlist)
evls$eventlist$Bill
evls$e... | /data/genthat_extracted_code/informR/examples/gen.evl.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 452 | r | library(informR)
### Name: gen.evl
### Title: Generate numeric categories of events.
### Aliases: gen.evl
### ** Examples
rawevents<-sample(rep(c("ran","eat","stay","eat","ran","play"),100))
actors<-rep(c("Jim","Bill","Pete"),10)
eventlist<-cbind(rawevents,actors)
evls<-gen.evl(eventlist)
evls$eventlist$Bill
evls$e... |
library(chromVAR)
library(motifmatchr)
library(Matrix)
library(SummarizedExperiment)
#Calculate ATAC fragments counts inside regions of interest
Neu_up_dev <- getPeaks("SETBP1_epigenomics/pipeline/Deseq2/Neu_up_dev.bed", sort_peaks = TRUE) #Bed files containing genomic regions to analyze
bamfiles_NPC_Neu <-c("/ho... | /Epigenomics/ChromVar_Analysis.R | no_license | MattiaZaghi/Balanced_SET_levels_favor_the_correct_enhancer_repertoire_during_cell_fate_acquisition | R | false | false | 6,188 | r | library(chromVAR)
library(motifmatchr)
library(Matrix)
library(SummarizedExperiment)
#Calculate ATAC fragments counts inside regions of interest
Neu_up_dev <- getPeaks("SETBP1_epigenomics/pipeline/Deseq2/Neu_up_dev.bed", sort_peaks = TRUE) #Bed files containing genomic regions to analyze
bamfiles_NPC_Neu <-c("/ho... |
# data will need to be an unmarkedMultFrame
gmultmix <- function(lambdaformula, phiformula, pformula, data,
mixture=c("P", "NB", "ZIP"), K, starts, method = "BFGS", se = TRUE,
engine=c("C","R"), threads=1, ...)
{
if(!is(data, "unmarkedFrameGMM"))
stop("Data is not of class unmarkedFrameGMM.")
engine <- ma... | /R/gmultmix.R | no_license | rbchan/unmarked | R | false | false | 6,586 | r |
# data will need to be an unmarkedMultFrame
gmultmix <- function(lambdaformula, phiformula, pformula, data,
mixture=c("P", "NB", "ZIP"), K, starts, method = "BFGS", se = TRUE,
engine=c("C","R"), threads=1, ...)
{
if(!is(data, "unmarkedFrameGMM"))
stop("Data is not of class unmarkedFrameGMM.")
engine <- ma... |
#' Attempts to install a package directly from github.
#'
#' This function is vectorised so you can install multiple packages in
#' a single command.
#'
#' @param username Github username
#' @param repo Repo name
#' @param ref Desired git reference. Could be a commit, tag, or branch
#' name. Defaults to \code{"maste... | /devtoolsVersion/devtools 10/R/install-github.r | no_license | connectthefuture/devtools-R-Forge | R | false | false | 2,630 | r | #' Attempts to install a package directly from github.
#'
#' This function is vectorised so you can install multiple packages in
#' a single command.
#'
#' @param username Github username
#' @param repo Repo name
#' @param ref Desired git reference. Could be a commit, tag, or branch
#' name. Defaults to \code{"maste... |
## numerically calculate the gradient (func may return a vector)
grad <- function(func,x,...) # would shadow numDeriv::grad()
{
h <- .Machine$double.eps^(1/3)*ifelse(abs(x)>1,abs(x),1)
temp <- x+h
h.hi <- temp-x
temp <- x-h
h.lo <- x-temp
twoeps <- h.hi+h.lo
nx <- length(x)
ny <- lengt... | /R/numdelta.R | no_license | mclements/numdelta | R | false | false | 3,642 | r | ## numerically calculate the gradient (func may return a vector)
grad <- function(func,x,...) # would shadow numDeriv::grad()
{
h <- .Machine$double.eps^(1/3)*ifelse(abs(x)>1,abs(x),1)
temp <- x+h
h.hi <- temp-x
temp <- x-h
h.lo <- x-temp
twoeps <- h.hi+h.lo
nx <- length(x)
ny <- lengt... |
\name{cweave}
\alias{cweave}
\title{Col weave}
\author{Hadley Wickham <h.wickham@gmail.com>}
\description{
Weave together two (or more) matrices by column
}
\usage{cweave(...)}
\arguments{
\item{...}{matrices to weave together}
}
\details{Matrices must have same dimensions}
\keyword{internal}
| /man/cweave-mh.rd | no_license | genome-vendor/r-cran-ggplot2 | R | false | false | 298 | rd | \name{cweave}
\alias{cweave}
\title{Col weave}
\author{Hadley Wickham <h.wickham@gmail.com>}
\description{
Weave together two (or more) matrices by column
}
\usage{cweave(...)}
\arguments{
\item{...}{matrices to weave together}
}
\details{Matrices must have same dimensions}
\keyword{internal}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.fit.plot.R
\name{model.fit.plot}
\alias{model.fit.plot}
\title{Graphical representation of the measures of model fitting based on
Information Criteria}
\usage{
model.fit.plot(..., type = "aic", scale = "absolute")
}
\arguments{
\item{..... | /man/model.fit.plot.Rd | no_license | bgoodri/survHE | R | false | true | 1,142 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.fit.plot.R
\name{model.fit.plot}
\alias{model.fit.plot}
\title{Graphical representation of the measures of model fitting based on
Information Criteria}
\usage{
model.fit.plot(..., type = "aic", scale = "absolute")
}
\arguments{
\item{..... |
test_with_pandoc("citation", {
temp_file <- tempfile(fileext = ".bib")
temp_dir <- dirname(temp_file)
current_dir <- getwd()
suppressWarnings(knitr::write_bib("ftExtra", temp_file))
setwd(temp_dir)
expect_identical(
md2ast(
"@R-ftExtra",
pandoc_args = c(
"--bibliography", temp_file
... | /tests/testthat/test-md2ast.R | permissive | jmbarbone/ftExtra | R | false | false | 469 | r | test_with_pandoc("citation", {
temp_file <- tempfile(fileext = ".bib")
temp_dir <- dirname(temp_file)
current_dir <- getwd()
suppressWarnings(knitr::write_bib("ftExtra", temp_file))
setwd(temp_dir)
expect_identical(
md2ast(
"@R-ftExtra",
pandoc_args = c(
"--bibliography", temp_file
... |
testlist <- list(testX = c(191493125665849920, 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, 0, 0, 0), trainX ... | /dann/inst/testfiles/calc_distance_C/AFL_calc_distance_C/calc_distance_C_valgrind_files/1609869024-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 1,199 | r | testlist <- list(testX = c(191493125665849920, 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, 0, 0, 0), trainX ... |
# code to build a horizontal bar plot out of the range of variability results
# first set: fragLAND results
df = fraglandout[[3]]
names(df)[c(1, 10)] = c('Landscape.Metric','Current Value')
df = df[,c(1:8,10)]
dfnosimi = df[-11,]
require(tidyr)
require(ggplot2)
# The arguments to gather():
# - data: Data object
# ... | /R/HRV_barplots.R | no_license | mmallek/TahoeScripts | R | false | false | 12,986 | r | # code to build a horizontal bar plot out of the range of variability results
# first set: fragLAND results
df = fraglandout[[3]]
names(df)[c(1, 10)] = c('Landscape.Metric','Current Value')
df = df[,c(1:8,10)]
dfnosimi = df[-11,]
require(tidyr)
require(ggplot2)
# The arguments to gather():
# - data: Data object
# ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/guardduty_operations.R
\name{guardduty_get_invitations_count}
\alias{guardduty_get_invitations_count}
\title{Returns the count of all GuardDuty membership invitations that were sent
to the current member account except the currently accepted ... | /cran/paws.security.identity/man/guardduty_get_invitations_count.Rd | permissive | TWarczak/paws | R | false | true | 721 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/guardduty_operations.R
\name{guardduty_get_invitations_count}
\alias{guardduty_get_invitations_count}
\title{Returns the count of all GuardDuty membership invitations that were sent
to the current member account except the currently accepted ... |
params <-
list(EVAL = FALSE)
## ----set-options, echo = FALSE---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... | /inst/doc/plot_marginal_effects.R | no_license | cran/sjPlot | R | false | false | 10,230 | r | params <-
list(EVAL = FALSE)
## ----set-options, echo = FALSE---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... |
\name{createsitepair}
\alias{createsitepair}
\title{
Creates Site-Pair Table
}
\description{
Takes the lower half of a site-site distance (dissimilarity) matrix and creates the site-pair table. This function is called from the \code{\link{formatsitepair}} function and should not need to be called directly by the user.
... | /man/createsitepair.Rd | no_license | howl-anderson/GDM | R | false | false | 1,874 | rd | \name{createsitepair}
\alias{createsitepair}
\title{
Creates Site-Pair Table
}
\description{
Takes the lower half of a site-site distance (dissimilarity) matrix and creates the site-pair table. This function is called from the \code{\link{formatsitepair}} function and should not need to be called directly by the user.
... |
library(RMySQL)
library(likert)
library(ggplot2)
library(viridis)
studyDb <- dbConnect(MySQL(), user='larkin', password='password', dbname='study_1_data')
query <- paste("SELECT answer FROM likert_answers where question_code = 'I1'")
rs = dbSendQuery(studyDb, query)
I01 <- dbFetch(rs)
query <- paste("SELECT answer F... | /likert_I.r | no_license | dlarkinc/PhD_R | R | false | false | 5,233 | r | library(RMySQL)
library(likert)
library(ggplot2)
library(viridis)
studyDb <- dbConnect(MySQL(), user='larkin', password='password', dbname='study_1_data')
query <- paste("SELECT answer FROM likert_answers where question_code = 'I1'")
rs = dbSendQuery(studyDb, query)
I01 <- dbFetch(rs)
query <- paste("SELECT answer F... |
require(Rserve)
library('RODBC')
conn<-odbcConnect("HANAPROD",uid ="T10041660",pwd ="Star@op2",DBMSencoding="UTF-8")
fulldump<-sqlQuery(conn,'SELECT * FROM "_SYS_BIC"."bpc.rm.rut/RUT_M002"')
Rserve() | /Tableau with ML integration/R/Connect.R | no_license | irajtrivedi/machine_learning | R | false | false | 209 | r | require(Rserve)
library('RODBC')
conn<-odbcConnect("HANAPROD",uid ="T10041660",pwd ="Star@op2",DBMSencoding="UTF-8")
fulldump<-sqlQuery(conn,'SELECT * FROM "_SYS_BIC"."bpc.rm.rut/RUT_M002"')
Rserve() |
oxcalReadUniform<-function(fn="~/OxCal/PotteryPhasesSannaiMaruyama/Enokibayash_full.js",ndates,BP=TRUE)
{
## Uniform Recovers alpha and beta ##
text <- readLines(fn,encoding="UTF-8")
indexStart = 3
indexEnd = ndates + 5
## General Model Properties ##
general1 <- paste("ocd[0].posterior.overall... | /singleDistributionAnalysis/oxcalReadUniform.R | no_license | ercrema/cronojags | R | false | false | 3,879 | r | oxcalReadUniform<-function(fn="~/OxCal/PotteryPhasesSannaiMaruyama/Enokibayash_full.js",ndates,BP=TRUE)
{
## Uniform Recovers alpha and beta ##
text <- readLines(fn,encoding="UTF-8")
indexStart = 3
indexEnd = ndates + 5
## General Model Properties ##
general1 <- paste("ocd[0].posterior.overall... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ttt_game.R
\name{ttt_game}
\alias{ttt_game}
\title{Tic-Tac-Toe Game}
\usage{
ttt_game()
}
\value{
\code{ttt_game} object
}
\description{
Object that encapsulates a tic-tac-toe game.
}
\examples{
x <- ttt_game()
x$play(3)
x$play(5)
x$show_boar... | /man/ttt_game.Rd | no_license | cran/tictactoe | R | false | true | 326 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ttt_game.R
\name{ttt_game}
\alias{ttt_game}
\title{Tic-Tac-Toe Game}
\usage{
ttt_game()
}
\value{
\code{ttt_game} object
}
\description{
Object that encapsulates a tic-tac-toe game.
}
\examples{
x <- ttt_game()
x$play(3)
x$play(5)
x$show_boar... |
# __ ___
# / |/ /___ _______________
# / /|_/ / __ `/ ___/ ___/ __ \
# / / / / /_/ / / / /__/ /_/ /
# /_/ /_/\__,_/_/ \___/\____/
# _ ___ __ __ ___
# | | / (_)____/ /_/ /_ / (_)___
#... | /shadlen_assignment2.r | permissive | Seneketh/basic_cogmod | R | false | false | 10,436 | r | # __ ___
# / |/ /___ _______________
# / /|_/ / __ `/ ___/ ___/ __ \
# / / / / /_/ / / / /__/ /_/ /
# /_/ /_/\__,_/_/ \___/\____/
# _ ___ __ __ ___
# | | / (_)____/ /_/ /_ / (_)___
#... |
library("rwhatsapp") # حزمة خاصة لقراءة ومعالجة بيانات المحادثات على الواتس
library("ggplot2") # حزمة لتمثيل البيانات
library("dplyr") # حزمة لمعالجة البيانات
library("forcats") # حزمة للتعامل مع البيانات الغير كمية
library("lubridate") # حزمة للتعامل مع بيانات الوقت والتاريخ
library("tidyr") # حزمة لمعالجة البيانات ... | /code.R | no_license | maram-ab/whatsup_AOU_Friends | R | false | false | 6,652 | r | library("rwhatsapp") # حزمة خاصة لقراءة ومعالجة بيانات المحادثات على الواتس
library("ggplot2") # حزمة لتمثيل البيانات
library("dplyr") # حزمة لمعالجة البيانات
library("forcats") # حزمة للتعامل مع البيانات الغير كمية
library("lubridate") # حزمة للتعامل مع بيانات الوقت والتاريخ
library("tidyr") # حزمة لمعالجة البيانات ... |
debug_message_l2("[setup] project definition")
# New setup ---------------------------------------------------------------
io.folder <-
list(
input = "io/input/",
tasks = "io/task/",
output = "io/output/"
)
global.error_counter <- 0
global.error_message <- c("")
| /R/config/project_setup.R | permissive | Gnolam/weather-fun-project | R | false | false | 285 | r | debug_message_l2("[setup] project definition")
# New setup ---------------------------------------------------------------
io.folder <-
list(
input = "io/input/",
tasks = "io/task/",
output = "io/output/"
)
global.error_counter <- 0
global.error_message <- c("")
|
library(genetics)
### Name: groupGenotype
### Title: Group genotype values
### Aliases: groupGenotype
### Keywords: manip misc
### ** Examples
## --- Setup ---
x <- c("A/A", "A/B", "B/A", "A/C", "C/A", "A/D", "D/A",
"B/B", "B/C", "C/B", "B/D", "D/B",
"C/C", "C/D", "D/C",
"D/D")
g <- genotype(... | /data/genthat_extracted_code/genetics/examples/groupGenotype.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 3,007 | r | library(genetics)
### Name: groupGenotype
### Title: Group genotype values
### Aliases: groupGenotype
### Keywords: manip misc
### ** Examples
## --- Setup ---
x <- c("A/A", "A/B", "B/A", "A/C", "C/A", "A/D", "D/A",
"B/B", "B/C", "C/B", "B/D", "D/B",
"C/C", "C/D", "D/C",
"D/D")
g <- genotype(... |
# This script will download the data and merge the train and test sets to create one data set.
# Then it will extract only the mean and standard deviation measurement results and create
# a second, independent tidy data set with the average of each variable for each activity
# and each subject.
library(downloader)
... | /run_analysis.R | no_license | Taekchick/CleanDataProject | R | false | false | 4,140 | r | # This script will download the data and merge the train and test sets to create one data set.
# Then it will extract only the mean and standard deviation measurement results and create
# a second, independent tidy data set with the average of each variable for each activity
# and each subject.
library(downloader)
... |
#
# - User Interface
#
shinyUI(
fluidPage(
titlePanel("Iris Flower Dataset"),
sidebarLayout(
sidebarPanel(
"Exploring the Iris Dataset",
helpText(paste0("Select a tab on the right and anaysis type below. ",
"Dont forget to hit refresh ... | /ui.R | no_license | gbartusk/iris_shiny | R | false | false | 1,464 | r | #
# - User Interface
#
shinyUI(
fluidPage(
titlePanel("Iris Flower Dataset"),
sidebarLayout(
sidebarPanel(
"Exploring the Iris Dataset",
helpText(paste0("Select a tab on the right and anaysis type below. ",
"Dont forget to hit refresh ... |
corr <- function(directory, threshold = 0) {
setwd("C:/Users/Dylan/Desktop/Coursera R/specdata")
files <- c(dir())
result <- numeric(0)
final <- vector()
for (i in 1:332) {
current_file <- read.csv(files[i], header = TRUE)
result <- current_file[complete.cases(current_file),]
if(nrow(result)>threshold) {... | /corr.R | no_license | dmrodger/datasciencecoursera | R | false | false | 408 | r | corr <- function(directory, threshold = 0) {
setwd("C:/Users/Dylan/Desktop/Coursera R/specdata")
files <- c(dir())
result <- numeric(0)
final <- vector()
for (i in 1:332) {
current_file <- read.csv(files[i], header = TRUE)
result <- current_file[complete.cases(current_file),]
if(nrow(result)>threshold) {... |
rm(list = ls())
#########################################################
#########################################################
#
# Fucntions to process NASA PM Data Fusion Product
# and compare/intersect with HMS
#
# Jason Vargo jason.vargo@cdph.ca.gov
# April 2019
#
#######################################... | /process_nasa_data_fusion_pm_product.R | no_license | eipi10/WFSmokeExp | R | false | false | 664 | r | rm(list = ls())
#########################################################
#########################################################
#
# Fucntions to process NASA PM Data Fusion Product
# and compare/intersect with HMS
#
# Jason Vargo jason.vargo@cdph.ca.gov
# April 2019
#
#######################################... |
library(leaflet)
shinyUI(fluidPage(
img(src = "TD.jpg"), img(src = "Big.jpg"),
titlePanel ("Crime Prediction by City"),
mainPanel(
h4("How to use the map:"),
br(),
p("-The map represent Violent Crimes in NY City by crime category. Only Rape crime is excluded"),
br(),
... | /ui.R | no_license | Marc25/Crime | R | false | false | 3,783 | r | library(leaflet)
shinyUI(fluidPage(
img(src = "TD.jpg"), img(src = "Big.jpg"),
titlePanel ("Crime Prediction by City"),
mainPanel(
h4("How to use the map:"),
br(),
p("-The map represent Violent Crimes in NY City by crime category. Only Rape crime is excluded"),
br(),
... |
## this program is gonna verify the assumption that the mean
## observation distance is smaller for dependent pairs compared with
## independent pairs.
library(mvtnorm)
library(lattice)
mean_dist <- function(x){
## this function is gonna return the mean distance between
## observations
return(mean(as.numeric(d... | /2014-mira-plos/code/verify-mean.r | no_license | hesenp/random-paper | R | false | false | 903 | r |
## this program is gonna verify the assumption that the mean
## observation distance is smaller for dependent pairs compared with
## independent pairs.
library(mvtnorm)
library(lattice)
mean_dist <- function(x){
## this function is gonna return the mean distance between
## observations
return(mean(as.numeric(d... |
library(dplyr)
library(tidyr)
library(maps)
library(graphics)
year<- MONTH<- n<- STATE<- NULL
#' Data import function
#'
#' This function is used to take data from the US-NHTSA Fatality Analysis Reporting System (FARS)
#' in a .csv file and return it back as a tidyverse dataframe(tibble).
#'
#' @param filename A char... | /R/fars_functions.R | no_license | lwgallaway/farstools | R | false | false | 4,501 | r | library(dplyr)
library(tidyr)
library(maps)
library(graphics)
year<- MONTH<- n<- STATE<- NULL
#' Data import function
#'
#' This function is used to take data from the US-NHTSA Fatality Analysis Reporting System (FARS)
#' in a .csv file and return it back as a tidyverse dataframe(tibble).
#'
#' @param filename A char... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_write_OGR.R
\name{readOGR}
\alias{readOGR}
\title{Read OGR supported file as an sp::SpatialXXXXX object}
\usage{
readOGR(dsn, layer, verbose = TRUE, stringsAsFactors = FALSE)
}
\arguments{
\item{dsn}{Data source destination (often a fold... | /R/rptha/man/readOGR.Rd | permissive | GeoscienceAustralia/ptha | R | false | true | 791 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_write_OGR.R
\name{readOGR}
\alias{readOGR}
\title{Read OGR supported file as an sp::SpatialXXXXX object}
\usage{
readOGR(dsn, layer, verbose = TRUE, stringsAsFactors = FALSE)
}
\arguments{
\item{dsn}{Data source destination (often a fold... |
siglev <- function(p)
{
if (p <= 0.1)
if (p <= 0.05)
if (p <= 0.01)
if (p <= 0.001)
sig <- "***"
else
sig <- "**"
else
sig <- "*"
else
sig <- "."
else
sig <- ""
}
siglev <- function(p)
{
if (p <= 0.1)
if (p <= 0.05)
if (p <= 0.01)
if (p <= 0.001... | /R/coefplot.r | permissive | rsling/obwohlweil | R | false | false | 3,069 | r | siglev <- function(p)
{
if (p <= 0.1)
if (p <= 0.05)
if (p <= 0.01)
if (p <= 0.001)
sig <- "***"
else
sig <- "**"
else
sig <- "*"
else
sig <- "."
else
sig <- ""
}
siglev <- function(p)
{
if (p <= 0.1)
if (p <= 0.05)
if (p <= 0.01)
if (p <= 0.001... |
library(hash)
## Get the maximum line length
# getMaximumLineLength <- function (dataset) {
# maxLength <- 0
# for (line in dataset) {
# curLength <- nchar(line)
# if (curLength > maxLength) {
# maxLength <- curLength
# }
# }
# return(maxLength)
# }
## Tokenize a single line
# tokenizeLine <... | /analysis.R | no_license | tedyun/datasci-capstone-2016-mar | R | false | false | 12,914 | r | library(hash)
## Get the maximum line length
# getMaximumLineLength <- function (dataset) {
# maxLength <- 0
# for (line in dataset) {
# curLength <- nchar(line)
# if (curLength > maxLength) {
# maxLength <- curLength
# }
# }
# return(maxLength)
# }
## Tokenize a single line
# tokenizeLine <... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/stat-summary.r
\name{stat_summary}
\alias{stat_summary}
\title{Summarise y values at every unique x.}
\usage{
stat_summary(mapping = NULL, data = NULL, geom = "pointrange",
position = "identity", ...)
}
\arguments{
\item{mapping}{Th... | /man/stat_summary.Rd | no_license | larkery/ggplot2 | R | false | false | 5,291 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/stat-summary.r
\name{stat_summary}
\alias{stat_summary}
\title{Summarise y values at every unique x.}
\usage{
stat_summary(mapping = NULL, data = NULL, geom = "pointrange",
position = "identity", ...)
}
\arguments{
\item{mapping}{Th... |
#Load necessary libraries
require(quantmod)
## Accepts input of character vectors with stock symbols
## E.g. "APPL" for one stock, or c("APPL","GOOG","UAL") for multiple
## Returns a data frame with the metrics
getMetrics <- function(inputStockName) {
what_metrics <- yahooQF(c("Price/Sales",
... | /final-project/metricsAPI.R | no_license | chezka-sino/BSDS-100-Final-Project | R | false | false | 1,283 | r |
#Load necessary libraries
require(quantmod)
## Accepts input of character vectors with stock symbols
## E.g. "APPL" for one stock, or c("APPL","GOOG","UAL") for multiple
## Returns a data frame with the metrics
getMetrics <- function(inputStockName) {
what_metrics <- yahooQF(c("Price/Sales",
... |
#' Multilevel FoSR using a Gibbs sampler and Wishart prior
#'
#' Fitting function for function-on-scalar regression for multilevel data.
#' This function estimates model parameters using a Gibbs sampler and estimates
#' the residual covariance surface using a Wishart prior.
#'
#' @param formula a formula indicating t... | /R/Gibbs_Mult_Wish.R | no_license | dill/refund | R | false | false | 10,771 | r | #' Multilevel FoSR using a Gibbs sampler and Wishart prior
#'
#' Fitting function for function-on-scalar regression for multilevel data.
#' This function estimates model parameters using a Gibbs sampler and estimates
#' the residual covariance surface using a Wishart prior.
#'
#' @param formula a formula indicating t... |
#####################################################################
## Analyzing the countries of birth and work of Nobel Laureates ##
#####################################################################
library(tidyverse)
library(janitor)
library(ggthemes)
library(gganimate)
library(here)
library(tmap)
library(cou... | /public/post/nobel-laureates/nobel-laureates.R | no_license | etiennebacher/personal_website | R | false | false | 4,868 | r | #####################################################################
## Analyzing the countries of birth and work of Nobel Laureates ##
#####################################################################
library(tidyverse)
library(janitor)
library(ggthemes)
library(gganimate)
library(here)
library(tmap)
library(cou... |
library(tidyverse)
# 범주형 데이터 정리
# 일변량 범주형 자료의 도수분포표 작성
# 이변량 범주형 자료의 2차원 분할표 작성
# 일변량 범주형 자료를 위한 그래프
# 이변량 범주형 자료를 위한 그래프
# 양적자료 : 연속형자료, 키, 몸무게, 소득, 강수량, 자녀의 수
# 질적자료 : 범주형자료, 명목형(성별구분,지역구분), 순서형(강의평가,등급)
# 이항자료 : Binary Data, 두 개의 범주를 갖고 있는 범주형 자료
# 예제데이터 : 패키지 vcd의 데이터프레임 Arthritis
# install.packages("vcd")... | /2018 - 02/05. 범주형자료분석/source/범주형자료분석.R | no_license | ajskdlf64/Bachelor-of-Statistics | R | false | false | 57,074 | r | library(tidyverse)
# 범주형 데이터 정리
# 일변량 범주형 자료의 도수분포표 작성
# 이변량 범주형 자료의 2차원 분할표 작성
# 일변량 범주형 자료를 위한 그래프
# 이변량 범주형 자료를 위한 그래프
# 양적자료 : 연속형자료, 키, 몸무게, 소득, 강수량, 자녀의 수
# 질적자료 : 범주형자료, 명목형(성별구분,지역구분), 순서형(강의평가,등급)
# 이항자료 : Binary Data, 두 개의 범주를 갖고 있는 범주형 자료
# 예제데이터 : 패키지 vcd의 데이터프레임 Arthritis
# install.packages("vcd")... |
library(gtx)
### Name: bp.scores
### Title: Genetic risk scores for blood pressure.
### Aliases: bp.scores
### Keywords: datasets
### ** Examples
data(bp.scores)
head(subset(bp.scores, score == "SBP2011A"))
sbp <- subset(bp.scores, score == "SBP2011A")
dbp <- subset(bp.scores, score == "DBP2011A")
dbp <- dbp[match(... | /data/genthat_extracted_code/gtx/examples/bp.scores.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 574 | r | library(gtx)
### Name: bp.scores
### Title: Genetic risk scores for blood pressure.
### Aliases: bp.scores
### Keywords: datasets
### ** Examples
data(bp.scores)
head(subset(bp.scores, score == "SBP2011A"))
sbp <- subset(bp.scores, score == "SBP2011A")
dbp <- subset(bp.scores, score == "DBP2011A")
dbp <- dbp[match(... |
\encoding{UTF-8}
\name{read_kstructure}
\alias{read_kstructure}
\title{Read a knowledge structure file}
\description{
Read a knowledge structure from
a file. The file formats are described in the \link{kstIO-package}
information page.
}
\usage{
read_kstructure(filename, format = "auto", as.letters = TRUE)
}
... | /man/read_kstructure.Rd | no_license | cran/kstIO | R | false | false | 2,263 | rd | \encoding{UTF-8}
\name{read_kstructure}
\alias{read_kstructure}
\title{Read a knowledge structure file}
\description{
Read a knowledge structure from
a file. The file formats are described in the \link{kstIO-package}
information page.
}
\usage{
read_kstructure(filename, format = "auto", as.letters = TRUE)
}
... |
#########################################################
##
## This script is intended to teach the basics of GEO2R
## It uses the GEOquery Package from Bioconductor to
## download some expression data and then heatmap.2 from
## the gplots package to plot a simple heatmap.
##
##########################################... | /R_scripts/GEO2R.v1.R | no_license | snashraf/SIDRA_R_WORKSHOP | R | false | false | 4,563 | r | #########################################################
##
## This script is intended to teach the basics of GEO2R
## It uses the GEOquery Package from Bioconductor to
## download some expression data and then heatmap.2 from
## the gplots package to plot a simple heatmap.
##
##########################################... |
#######################################################################################################
## RIDGE REGRESSION CODE STARTS FROM LINE 138
#######################################################################################################
set.seed(01122016)
require(data.table); require(xgboost)
... | /PRUDENTIAL/ridge_regression.R | no_license | ronroc/kaggle | R | false | false | 10,136 | r | #######################################################################################################
## RIDGE REGRESSION CODE STARTS FROM LINE 138
#######################################################################################################
set.seed(01122016)
require(data.table); require(xgboost)
... |
# space matters -------------
x<-3
x <- 3
x< -3
x <- -3
# <- or = ? ---------------
list(a = 1:5, b = letters[1:4])
list(a <- 1:5, b <- letters[1:4])
system.time(result <- runif(1000))
system.time(result2 = runif(1000))
# Floating point trap -----------------
myVect <- c(0.1/1, 0.2/2, 0.3/3, 0.4/4, 0.5/5, 0.6/6, 0.7/... | /2015-11-18/Rinferno.R | no_license | oywpan/edinbr-talks | R | false | false | 4,110 | r | # space matters -------------
x<-3
x <- 3
x< -3
x <- -3
# <- or = ? ---------------
list(a = 1:5, b = letters[1:4])
list(a <- 1:5, b <- letters[1:4])
system.time(result <- runif(1000))
system.time(result2 = runif(1000))
# Floating point trap -----------------
myVect <- c(0.1/1, 0.2/2, 0.3/3, 0.4/4, 0.5/5, 0.6/6, 0.7/... |
install.packages("foreign")
library("foreign")
das = read.csv("data_DAX091222-111222.csv")
d = seq(from = as.Date("2009-12-22"), to = as.Date("2011-12-21"), length.out = 514)
plot(das ~ d, xlab = "Time", ylab = "DAX30 Index", pch = 20, cex = 1, cex.axis = 1.2, cex.lab = 1.5, lab = c(3, 3, 0), main = "", col = "bl... | /MSEex0805_RUN/MSEex0805.R | no_license | mreiske/MSE-ToDO | R | false | false | 476 | r | install.packages("foreign")
library("foreign")
das = read.csv("data_DAX091222-111222.csv")
d = seq(from = as.Date("2009-12-22"), to = as.Date("2011-12-21"), length.out = 514)
plot(das ~ d, xlab = "Time", ylab = "DAX30 Index", pch = 20, cex = 1, cex.axis = 1.2, cex.lab = 1.5, lab = c(3, 3, 0), main = "", col = "bl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_write_omx.R
\name{write_all_omx}
\alias{write_all_omx}
\title{Write all matrix cores to an OMX file}
\usage{
write_all_omx(object, file, long = TRUE)
}
\arguments{
\item{object}{The object to be written to OMX. May be either a tibble or ... | /man/write_all_omx.Rd | permissive | gregmacfarlane/omxr | R | false | true | 1,028 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_write_omx.R
\name{write_all_omx}
\alias{write_all_omx}
\title{Write all matrix cores to an OMX file}
\usage{
write_all_omx(object, file, long = TRUE)
}
\arguments{
\item{object}{The object to be written to OMX. May be either a tibble or ... |
#1
wiki <- read.csv("wiki.csv", stringsAsFactors=FALSE)
wiki$Vandal <- as.factor(wiki$Vandal)
table(wiki$Vandal) #1.1 1815
# 1) Create the corpus for the Added column, and call it "corpusAdded".
library(tm)
library(SnowballC)
# !!!! Run next line - really important!!!
Sys.setlocale("LC_ALL", "C")
corpusAdded <- Corpu... | /edX/The Analytics Edge/Week5-Text_Analytics/01_Detecting_Vandalism_on_Wikipedia.R | no_license | abudish/Course_Materials_and_Certificates | R | false | false | 3,647 | r | #1
wiki <- read.csv("wiki.csv", stringsAsFactors=FALSE)
wiki$Vandal <- as.factor(wiki$Vandal)
table(wiki$Vandal) #1.1 1815
# 1) Create the corpus for the Added column, and call it "corpusAdded".
library(tm)
library(SnowballC)
# !!!! Run next line - really important!!!
Sys.setlocale("LC_ALL", "C")
corpusAdded <- Corpu... |
library(highcharter)
shinyUI(navbarPage(
"Tableros",
tabPanel("Predicción en Fertilidad",
fluidPage(
sidebarLayout(
sidebarPanel(
dateRangeInput(
"date_range",
label = "Rango de Datos",
min = "01-01-1960... | /FertilidadUSA/ui.R | no_license | wparedesgt/slidescd | R | false | false | 3,835 | r | library(highcharter)
shinyUI(navbarPage(
"Tableros",
tabPanel("Predicción en Fertilidad",
fluidPage(
sidebarLayout(
sidebarPanel(
dateRangeInput(
"date_range",
label = "Rango de Datos",
min = "01-01-1960... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reverselog_trans.R
\name{reverselog_trans}
\alias{reverselog_trans}
\title{Reverse log transform}
\usage{
reverselog_trans(base = 10)
}
\arguments{
\item{base}{Base of the logarithm}
}
\description{
Reverse log transformation. Useful when plo... | /man/reverselog_trans.Rd | no_license | eliocamp/metR | R | false | true | 1,159 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reverselog_trans.R
\name{reverselog_trans}
\alias{reverselog_trans}
\title{Reverse log transform}
\usage{
reverselog_trans(base = 10)
}
\arguments{
\item{base}{Base of the logarithm}
}
\description{
Reverse log transformation. Useful when plo... |
testlist <- list(g = 0L, ws = NULL, xs = NULL, val = numeric(0), my_ws = numeric(0), my_xs = c(0, 0, 0, 0, 0))
result <- do.call(MHMM:::oneEMgammaCPP,testlist)
str(result) | /MHMM/inst/testfiles/oneEMgammaCPP/AFL_oneEMgammaCPP/oneEMgammaCPP_valgrind_files/1616007480-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 176 | r | testlist <- list(g = 0L, ws = NULL, xs = NULL, val = numeric(0), my_ws = numeric(0), my_xs = c(0, 0, 0, 0, 0))
result <- do.call(MHMM:::oneEMgammaCPP,testlist)
str(result) |
X<-c(5.5, 6.0, 7.0, 6.0, 7.5, 6.0, 7.5, 5.5, 7.0, 6.5)
Y<-c(6.5, 6.0, 8.5, 7.0, 6.5, 8.0, 7.5, 6.5, 7.5, 6.0, 8.5, 7.0)
n = length(X);
m= length(Y);
Xbar= mean(X);
Ybar = mean(Y);
Sx = var(X);
Sy = var(Y);
Sp = ((n-1)*Sx/(n+m-2)) + ((m-1)*Sy/(n+m-2));
den = sqrt(Sp*((1/n)+(1/m)));
TS = (Xbar -Ybar)/den;
cat(... | /Introduction_To_Probability_And_Statistics_For_Engineers_And_Scientists_by_Sheldon_M._Ross/CH8/EX8.4.b/Ex8_4b.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 572 | r | X<-c(5.5, 6.0, 7.0, 6.0, 7.5, 6.0, 7.5, 5.5, 7.0, 6.5)
Y<-c(6.5, 6.0, 8.5, 7.0, 6.5, 8.0, 7.5, 6.5, 7.5, 6.0, 8.5, 7.0)
n = length(X);
m= length(Y);
Xbar= mean(X);
Ybar = mean(Y);
Sx = var(X);
Sy = var(Y);
Sp = ((n-1)*Sx/(n+m-2)) + ((m-1)*Sy/(n+m-2));
den = sqrt(Sp*((1/n)+(1/m)));
TS = (Xbar -Ybar)/den;
cat(... |
#exams data set
rm(list=ls())
options(warn = -1)
b<-read.csv("Practice Test Effectiveness - Test.csv")
a<-read.csv("Practice Test Effectiveness - Train.csv")
summary(a)
k1<-as.numeric(as.character(a[,1]))
k<-na.omit(as.numeric(as.character(a[,1])))
m=1
l<-1:length(k)
for(u in 1:length(k1))
{ if(is.na(k1[... | /Code 1/assign_2_exam.R | no_license | akshay1100/Data-Analysis-Code-Samples | R | false | false | 2,343 | r |
#exams data set
rm(list=ls())
options(warn = -1)
b<-read.csv("Practice Test Effectiveness - Test.csv")
a<-read.csv("Practice Test Effectiveness - Train.csv")
summary(a)
k1<-as.numeric(as.character(a[,1]))
k<-na.omit(as.numeric(as.character(a[,1])))
m=1
l<-1:length(k)
for(u in 1:length(k1))
{ if(is.na(k1[... |
train_baseline <- function(dat_train, label_train, par){
library("gbm")
if(par){
# data_withGray=dat_test$Gray
data_NoGray=dat_train$NoGray
}else{
# data_withGray=dat_test
data_NoGray=dat_train
}
##baseline model
train_base <- function(dat_train, label_train, par=NULL){
if(is.null(par)... | /lib/train.R | no_license | NinaShao1230/Fall2017-project3-grp9 | R | false | false | 1,599 | r |
train_baseline <- function(dat_train, label_train, par){
library("gbm")
if(par){
# data_withGray=dat_test$Gray
data_NoGray=dat_train$NoGray
}else{
# data_withGray=dat_test
data_NoGray=dat_train
}
##baseline model
train_base <- function(dat_train, label_train, par=NULL){
if(is.null(par)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acdatabase_titertables.R
\name{summarise_plotdata_by_sr_cluster}
\alias{summarise_plotdata_by_sr_cluster}
\title{Summarise by serum cluster}
\usage{
summarise_plotdata_by_sr_cluster(plotdata)
}
\arguments{
\item{plotdata}{tibble}
}
\value{
ti... | /man/summarise_plotdata_by_sr_cluster.Rd | permissive | SamT123/acutilsLite | R | false | true | 370 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acdatabase_titertables.R
\name{summarise_plotdata_by_sr_cluster}
\alias{summarise_plotdata_by_sr_cluster}
\title{Summarise by serum cluster}
\usage{
summarise_plotdata_by_sr_cluster(plotdata)
}
\arguments{
\item{plotdata}{tibble}
}
\value{
ti... |
#Function
myprint1<-function()
return("Rajitha")
myprint1()
myprint2<-function(arg1)
return(arg1)
myprint2("Gayashan")
myprint3<-function(arg1,arg2){
sum=arg1+arg2
return(sum)
}
myprint3(2,3)
myprint4<-function(arg1,arg2=10){
sum=arg1+arg2
return(sum)
}
myprint4(40)
myprint5<-function(arg1=15,arg2=10){
... | /Test9.R | no_license | RajithaGayashan/R | R | false | false | 384 | r | #Function
myprint1<-function()
return("Rajitha")
myprint1()
myprint2<-function(arg1)
return(arg1)
myprint2("Gayashan")
myprint3<-function(arg1,arg2){
sum=arg1+arg2
return(sum)
}
myprint3(2,3)
myprint4<-function(arg1,arg2=10){
sum=arg1+arg2
return(sum)
}
myprint4(40)
myprint5<-function(arg1=15,arg2=10){
... |
require(wrassp)
##' Extracts relavant data from a given database (Signalfiles+SSFF-Files)
##'
##' Reads time relevant data from a given seglist and extracts the specified
##' trackdata and places it into a trackdata object (same as in emu/R). The
##' seglist has to contain valid paths to the signal files and the acco... | /R/extractSegs.R | no_license | fauxneticien/alveo-r | R | false | false | 5,642 | r | require(wrassp)
##' Extracts relavant data from a given database (Signalfiles+SSFF-Files)
##'
##' Reads time relevant data from a given seglist and extracts the specified
##' trackdata and places it into a trackdata object (same as in emu/R). The
##' seglist has to contain valid paths to the signal files and the acco... |
library(polynom)
library(deSolve)
library(plyr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(rgl)
library(plotrix)
library(calibrate)
library(xtable)
# Hill
hill <- function(n, a, g, b = 1) {
f <- function(x) a / (1 + x ^ g)
df <- function(x) -a * g * x ^ (g - 1) / (x ^ g + 1) ^ 2
calc.equilibrium <-... | /hill-core.R | no_license | CyclicDynamicalSystems/Hill | R | false | false | 7,065 | r | library(polynom)
library(deSolve)
library(plyr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(rgl)
library(plotrix)
library(calibrate)
library(xtable)
# Hill
hill <- function(n, a, g, b = 1) {
f <- function(x) a / (1 + x ^ g)
df <- function(x) -a * g * x ^ (g - 1) / (x ^ g + 1) ^ 2
calc.equilibrium <-... |
library(shiny)
library(shinydashboard)
library(googlesheets)
library(tidyverse)
library(leaflet)
library(maps)
library(rgdal)
library(sp)
library(lubridate)
library(DT)
library(readxl)
library(RColorBrewer)
library(knitr)
library(kableExtra)
coord <- read_excel("coord.xlsx")
L<-readOGR(dsn="shp", layer="Regione_2018"... | /izslerApp/global.R | no_license | TMax66/GEO | R | false | false | 1,310 | r | library(shiny)
library(shinydashboard)
library(googlesheets)
library(tidyverse)
library(leaflet)
library(maps)
library(rgdal)
library(sp)
library(lubridate)
library(DT)
library(readxl)
library(RColorBrewer)
library(knitr)
library(kableExtra)
coord <- read_excel("coord.xlsx")
L<-readOGR(dsn="shp", layer="Regione_2018"... |
path <- getwd()
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(url, file.path(path, "dataFiles.zip"))
unzip(zipfile = "dataFiles.zip")
actlab <- fread(file.path(path, "UCI HAR Dataset/activity_labels.txt"), col.names = c("classlabels", "activityna... | /run_analysis.R | no_license | JeetTanna/Getting-and-Cleaning-Data-Project | R | false | false | 1,800 | r |
path <- getwd()
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(url, file.path(path, "dataFiles.zip"))
unzip(zipfile = "dataFiles.zip")
actlab <- fread(file.path(path, "UCI HAR Dataset/activity_labels.txt"), col.names = c("classlabels", "activityna... |
run_analysis <- function()
{
# Precondition: Setting the working directory
setwd("~/CESAR/BIGDATA/gettingandcleaningdata")
# Step 01: Getting the data of trainning.
## X_train.txt
trainingData <- read.table("./uci-har-dataset/train/X_train.txt")
dim(trainingData)
head(trainingData)... | /run_analysis.R | no_license | thiagoveras/gettingandcleaningdata | R | false | false | 3,755 | r | run_analysis <- function()
{
# Precondition: Setting the working directory
setwd("~/CESAR/BIGDATA/gettingandcleaningdata")
# Step 01: Getting the data of trainning.
## X_train.txt
trainingData <- read.table("./uci-har-dataset/train/X_train.txt")
dim(trainingData)
head(trainingData)... |
\name{solder.balance}
\alias{solder.balance}
\alias{solder}
\title{Soldering of Components on Printed-Circuit Boards}
\description{
The \code{solder.balance} data frame has 720 rows and 6 columns, representing
a balanced subset of a designed experiment varying 5 factors on the
soldering of components on printed-c... | /man/solder.balance.Rd | no_license | bethatkinson/rpart | R | false | false | 1,685 | rd | \name{solder.balance}
\alias{solder.balance}
\alias{solder}
\title{Soldering of Components on Printed-Circuit Boards}
\description{
The \code{solder.balance} data frame has 720 rows and 6 columns, representing
a balanced subset of a designed experiment varying 5 factors on the
soldering of components on printed-c... |
# Script for PLOT 2, Course Project 1 - Exploratory Data Analysis
# by Yamila Omar - 4th August 2015
# Load the data. The number of rows was chosen to include the needed days, but
# not more.
data <- read.table("household_power_consumption.txt", header=TRUE, sep=";",
na.strings = "?", nrows= 69517, ... | /plot2.R | no_license | YamiOmar88/ExData_Plotting1 | R | false | false | 1,056 | r | # Script for PLOT 2, Course Project 1 - Exploratory Data Analysis
# by Yamila Omar - 4th August 2015
# Load the data. The number of rows was chosen to include the needed days, but
# not more.
data <- read.table("household_power_consumption.txt", header=TRUE, sep=";",
na.strings = "?", nrows= 69517, ... |
testlist <- list(x1 = NaN, x2 = NaN, y1 = NaN, y2 = 2.02566914794911e-322)
result <- do.call(palm:::euc_distances,testlist)
str(result) | /palm/inst/testfiles/euc_distances/libFuzzer_euc_distances/euc_distances_valgrind_files/1612968593-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 135 | r | testlist <- list(x1 = NaN, x2 = NaN, y1 = NaN, y2 = 2.02566914794911e-322)
result <- do.call(palm:::euc_distances,testlist)
str(result) |
#### Simulation inputs ####
#' \code{input} class
#'
#' When a simulation is run in the \code{CAB} package, the within-simulation information (i.e., the variables that are not pre-set before the simulation, e.g. the number of responses during an inter-reinforcement itnerval) are stored in an \code{input} object.
#'
#'... | /R/input.R | no_license | Don-Li/CAB_original | R | false | false | 17,384 | r | #### Simulation inputs ####
#' \code{input} class
#'
#' When a simulation is run in the \code{CAB} package, the within-simulation information (i.e., the variables that are not pre-set before the simulation, e.g. the number of responses during an inter-reinforcement itnerval) are stored in an \code{input} object.
#'
#'... |
#' Create a frequency histogram for codes
#'
#' @param x A parsed source(s) object.
#' @param codes A regular expression to select codes to include.
#' @param sortByFreq Whether to sort by frequency decreasingly
#' (`decreasing`, the default), increasingly (`increasing`),
#' or alphabetically (`NULL`).
#' @param... | /R/code_freq_hist.R | no_license | cran/rock | R | false | false | 7,793 | r | #' Create a frequency histogram for codes
#'
#' @param x A parsed source(s) object.
#' @param codes A regular expression to select codes to include.
#' @param sortByFreq Whether to sort by frequency decreasingly
#' (`decreasing`, the default), increasingly (`increasing`),
#' or alphabetically (`NULL`).
#' @param... |
#dsouza{c,d,m}@indiana.edu
##***************************************************************************************
#* Title: yelp-review-analysis
#* Author: Max Woolf
#* Availability: https://github.com/minimaxir/yelp-review-analysis/blob/master/yelp_review_analysis.r"
#*********************************... | /Regression testing R scripts/yelp_regression.R | permissive | CAVIND46016/Yelp-Dataset-Analysis | R | false | false | 1,162 | r | #dsouza{c,d,m}@indiana.edu
##***************************************************************************************
#* Title: yelp-review-analysis
#* Author: Max Woolf
#* Availability: https://github.com/minimaxir/yelp-review-analysis/blob/master/yelp_review_analysis.r"
#*********************************... |
set.seed(123)
CompanyData <- read.csv(file.choose())
hist(CompanyData$Sales, main = "Sales of Companydata",xlim = c(0,20),
breaks=c(seq(10,20,30)), col = c("blue","red", "green","violet"))
highsales = ifelse(CompanyData$Sales<9, "No", "Yes") # if greater than 8 then high sales else Low
CD = data.frame(Co... | /RandomForests_companyData.R | no_license | shilpa2hait/Assingments | R | false | false | 2,893 | r | set.seed(123)
CompanyData <- read.csv(file.choose())
hist(CompanyData$Sales, main = "Sales of Companydata",xlim = c(0,20),
breaks=c(seq(10,20,30)), col = c("blue","red", "green","violet"))
highsales = ifelse(CompanyData$Sales<9, "No", "Yes") # if greater than 8 then high sales else Low
CD = data.frame(Co... |
x <- c(0.5, 0.6)
x
y <- c(TRUE, FALSE)
y
z <- c(T, F)
z
a <- c("a", "b", "c")
a
b <- 9:29
b
c <- c(1+0i, 2+4i)
c
x <- vector("numeric", length = 10)
x
y <- c(1.7, "a")
y
y <- c(TRUE, 2)
y
y <- c("a", TRUE)
y
x <- 0:6
x
class(x)
as.numeric(x)
as.logical(x)
as.character(x)
x <- c("a", "b", "c"... | /section2EmreTurk.R | no_license | e-turk/RStudio-Project | R | false | false | 605 | r | x <- c(0.5, 0.6)
x
y <- c(TRUE, FALSE)
y
z <- c(T, F)
z
a <- c("a", "b", "c")
a
b <- 9:29
b
c <- c(1+0i, 2+4i)
c
x <- vector("numeric", length = 10)
x
y <- c(1.7, "a")
y
y <- c(TRUE, 2)
y
y <- c("a", TRUE)
y
x <- 0:6
x
class(x)
as.numeric(x)
as.logical(x)
as.character(x)
x <- c("a", "b", "c"... |
x <- mtcars[,c('wt','mpg')]
x <- scale(x)
lm(wt ~ mpg,data = x)
?lm
x
plot(scale(x))
summary(scale(x))
?scale
| /R/all_tests.R | no_license | SpIIIII/Stepik | R | false | false | 114 | r | x <- mtcars[,c('wt','mpg')]
x <- scale(x)
lm(wt ~ mpg,data = x)
?lm
x
plot(scale(x))
summary(scale(x))
?scale
|
logic.bagging <- function(x,...) UseMethod("logic.bagging")
logic.bagging.formula <- function(formula,data,recdom=TRUE,...){
xy<-getXy(formula,data,recdom=recdom)
out<-logic.bagging(xy$x,xy$y,...)
out$facInfo<-xy$facInfo
out
}
logic.bagging.default <-
function (x, y, B = 100, useN = TRUE, ntrees =... | /R/logic.bagging.R | no_license | holgerschw/logicFS | R | false | false | 4,675 | r | logic.bagging <- function(x,...) UseMethod("logic.bagging")
logic.bagging.formula <- function(formula,data,recdom=TRUE,...){
xy<-getXy(formula,data,recdom=recdom)
out<-logic.bagging(xy$x,xy$y,...)
out$facInfo<-xy$facInfo
out
}
logic.bagging.default <-
function (x, y, B = 100, useN = TRUE, ntrees =... |
library(caret)
# Model KNN1 with mimimum feature removal
system.time(ModelKNN1 <- train(Volume~., trainSet[,c(-4,-15)],
method = "kknn", trControl=fitControl1))
ModelKNN1
varImp(ModelKNN1)
# Testing
KNN1_predictions <- predict(ModelKNN1,testSet)
KNN1_predictions
postResample(pred = K... | /Script/Sales prediction - KNN.R | no_license | isademiguel/Volume_Sales_Analysis | R | false | false | 858 | r | library(caret)
# Model KNN1 with mimimum feature removal
system.time(ModelKNN1 <- train(Volume~., trainSet[,c(-4,-15)],
method = "kknn", trControl=fitControl1))
ModelKNN1
varImp(ModelKNN1)
# Testing
KNN1_predictions <- predict(ModelKNN1,testSet)
KNN1_predictions
postResample(pred = K... |
#import file
library(tidyverse)
library(readxl)
library(ggplot2)
library(dplyr)
library(lubridate)
library("growthrates")
setwd("/Users/salimeh/Desktop/Data\ Science/PS_6")
Turkey_ER<- read_xls("Turkey_Monthly_ER.xls")
#read_excel("Turkey_Monthly_ER.xls")
Turkey_ER<-Turkey_ER[-c(1:120,840,839),]
#separate date into se... | /Problemsets/PS6_Birang/PS6_Birang.R | permissive | Saliab/DScourseS20 | R | false | false | 2,373 | r | #import file
library(tidyverse)
library(readxl)
library(ggplot2)
library(dplyr)
library(lubridate)
library("growthrates")
setwd("/Users/salimeh/Desktop/Data\ Science/PS_6")
Turkey_ER<- read_xls("Turkey_Monthly_ER.xls")
#read_excel("Turkey_Monthly_ER.xls")
Turkey_ER<-Turkey_ER[-c(1:120,840,839),]
#separate date into se... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{cloudwatch}
\alias{cloudwatch}
\title{Amazon CloudWatch}
\usage{
cloudwatch(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\value{
A client for the service. You can... | /cran/paws/man/cloudwatch.Rd | permissive | williazo/paws | R | false | true | 5,689 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{cloudwatch}
\alias{cloudwatch}
\title{Amazon CloudWatch}
\usage{
cloudwatch(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\value{
A client for the service. You can... |
getwd()
maindir <- "C:\\Personal\\Coursera\\Data Science\\Exploratory Data Analysis"
subdir <- "Work"
if (file.exists("Work")) {
setwd(file.path(maindir, subdir))
} else {
dir.create(file.path(maindir, subdir))
setwd(file.path(maindir, subdir))
}
filename <- "household_power_consumption.zip"
if (!file.exists(... | /Plot2.R | no_license | mcetraro/Exploratory-Data-Analysis | R | false | false | 1,000 | r | getwd()
maindir <- "C:\\Personal\\Coursera\\Data Science\\Exploratory Data Analysis"
subdir <- "Work"
if (file.exists("Work")) {
setwd(file.path(maindir, subdir))
} else {
dir.create(file.path(maindir, subdir))
setwd(file.path(maindir, subdir))
}
filename <- "household_power_consumption.zip"
if (!file.exists(... |
##
## MCMC sampling for the AR models
## time.data format: col-1: year, col-2: day
##
spAR.Gibbs<-function(formula, data=parent.frame(), time.data, coords,
priors=NULL, initials=NULL, nItr, nBurn=0, report=1,
tol.dist=2, distance.method="geodetic:km", cov.fnc="exponential",
sca... | /R/spAR.r | no_license | RominaDst/spTimer | R | false | false | 62,258 | r | ##
## MCMC sampling for the AR models
## time.data format: col-1: year, col-2: day
##
spAR.Gibbs<-function(formula, data=parent.frame(), time.data, coords,
priors=NULL, initials=NULL, nItr, nBurn=0, report=1,
tol.dist=2, distance.method="geodetic:km", cov.fnc="exponential",
sca... |
# --------------------------------------------------------------------------------------------------
# C04 (Exploratory Data Analysis) - W04 (Two case studies in exploratory data analysis)
#
# Programming Assignment
# --------------------------------------------------------------------------------------------------
#
... | /Course_04-Exploratory_Data_Analysis/Course_Project_2/plot6.R | no_license | Duplo59/datasciencecoursera | R | false | false | 4,869 | r | # --------------------------------------------------------------------------------------------------
# C04 (Exploratory Data Analysis) - W04 (Two case studies in exploratory data analysis)
#
# Programming Assignment
# --------------------------------------------------------------------------------------------------
#
... |
setwd("C:/Users/Saroja/Desktop/coursera/getdata-projectfiles-UCI HAR Dataset")
getwd()
xtest<-read.table("./UCI HAR Dataset/test/X_test.txt")
ytest<-read.table("./UCI HAR Dataset/test/y_test.txt")
subtest<-read.table("./UCI HAR Dataset/test/subject_test.txt")
xtrain<-read.table("./UCI HAR Dataset/train/X_train.txt")... | /run_analysis.R | no_license | smp14/R-GettingAndCleaningData | R | false | false | 1,446 | r | setwd("C:/Users/Saroja/Desktop/coursera/getdata-projectfiles-UCI HAR Dataset")
getwd()
xtest<-read.table("./UCI HAR Dataset/test/X_test.txt")
ytest<-read.table("./UCI HAR Dataset/test/y_test.txt")
subtest<-read.table("./UCI HAR Dataset/test/subject_test.txt")
xtrain<-read.table("./UCI HAR Dataset/train/X_train.txt")... |
library(heavy)
### Name: tgamma
### Title: The right truncated gamma distribution
### Aliases: tgamma dtgamma ptgamma qtgamma rtgamma
### Keywords: distribution
### ** Examples
x <- seq(0, 2, by = 0.1)
y <- dtgamma(x, shape = 1, truncation = 1)
z <- dgamma(x, shape = 1) # standard gamma pdf
plot(x, z, type = "l", x... | /data/genthat_extracted_code/heavy/examples/tgamma.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 703 | r | library(heavy)
### Name: tgamma
### Title: The right truncated gamma distribution
### Aliases: tgamma dtgamma ptgamma qtgamma rtgamma
### Keywords: distribution
### ** Examples
x <- seq(0, 2, by = 0.1)
y <- dtgamma(x, shape = 1, truncation = 1)
z <- dgamma(x, shape = 1) # standard gamma pdf
plot(x, z, type = "l", x... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SurveyDb.r
\name{loadLicenceFile}
\alias{loadLicenceFile}
\title{Load Licence File}
\usage{
loadLicenceFile(licence_filename, lic_start_date, lic_end_date)
}
\arguments{
\item{licence_filename}{File name that licence records are saved in CSV ... | /man/loadLicenceFile.Rd | permissive | Pacific-salmon-assess/iRecAnalysisPkg | R | false | true | 575 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SurveyDb.r
\name{loadLicenceFile}
\alias{loadLicenceFile}
\title{Load Licence File}
\usage{
loadLicenceFile(licence_filename, lic_start_date, lic_end_date)
}
\arguments{
\item{licence_filename}{File name that licence records are saved in CSV ... |
# Objective: remove duplicate records from cases-controls files: WHY? There are participants that have been sequenced several times...
# Strategy: we select the latest platekey
date ()
Sys.info ()[c("nodename", "user")]
commandArgs ()
rm (list = ls ())
R.version.string ## "R version 3.6.2 (2019-12-12)"
# libraries
li... | /cases_controls/AR/deduplicating_clinically_enriched_tables_EHv3.1.2_AR.R | no_license | kibanez/analysing_STRs | R | false | false | 9,715 | r | # Objective: remove duplicate records from cases-controls files: WHY? There are participants that have been sequenced several times...
# Strategy: we select the latest platekey
date ()
Sys.info ()[c("nodename", "user")]
commandArgs ()
rm (list = ls ())
R.version.string ## "R version 3.6.2 (2019-12-12)"
# libraries
li... |
#' Purges mediator effects between two independent variables (logit link function)
#'
#' Purges mediator effects between two independent variables, where selection (direct) variable is binary, and returns new "purged" direct variable to be used in multivariate specification.
#'@usage purge.logit(x, "direct", "indirect"... | /R/purge.logit.R | permissive | pdwaggoner/purging | R | false | false | 1,695 | r | #' Purges mediator effects between two independent variables (logit link function)
#'
#' Purges mediator effects between two independent variables, where selection (direct) variable is binary, and returns new "purged" direct variable to be used in multivariate specification.
#'@usage purge.logit(x, "direct", "indirect"... |
## Function takes in a Matrix X and computes the inverse of the matrix
## if the Inverse is not cached.The Inverse of the Matrix is cached on run
## if it does not already exist.
## makeCacheMatrix will create the function for caching ther inverse matrix
## example:
## g <- matrix(c(1,2,3,4),2,2)
## cG <- makeCacheMa... | /cachematrix.R | no_license | Lojikal/ProgrammingAssignment2 | R | false | false | 1,089 | r | ## Function takes in a Matrix X and computes the inverse of the matrix
## if the Inverse is not cached.The Inverse of the Matrix is cached on run
## if it does not already exist.
## makeCacheMatrix will create the function for caching ther inverse matrix
## example:
## g <- matrix(c(1,2,3,4),2,2)
## cG <- makeCacheMa... |
mtc <- mtcars
mtc[, c('am', 'cyl', 'vs', 'gear', 'carb')] <- lapply(mtcars[,c('am', 'cyl', 'vs', 'gear', 'carb')], factor)
fit1 <- lm(mpg ~ am, mtc)
fit2 <- lm(mpg ~ am + qsec, mtc)
fit3 <- lm(mpg ~ am*qsec, mtc)
fit4 <- lm(mpg ~ am*qsec + wt, mtc)
fit5 <- lm(mpg ~ am*qsec + hp, mtc)
fit6 <- lm(mpg ~ am*qsec + cyl, mtc... | /Regression_Models/assignment/ragmods_4.R | no_license | heyroman/DSS_Assignments | R | false | false | 811 | r | mtc <- mtcars
mtc[, c('am', 'cyl', 'vs', 'gear', 'carb')] <- lapply(mtcars[,c('am', 'cyl', 'vs', 'gear', 'carb')], factor)
fit1 <- lm(mpg ~ am, mtc)
fit2 <- lm(mpg ~ am + qsec, mtc)
fit3 <- lm(mpg ~ am*qsec, mtc)
fit4 <- lm(mpg ~ am*qsec + wt, mtc)
fit5 <- lm(mpg ~ am*qsec + hp, mtc)
fit6 <- lm(mpg ~ am*qsec + cyl, mtc... |
# parameters common to run_SSMSE and crate_scen_list
#' @param scen_name_vec A vector containing names of the scenarios. The each
#' string will be a directory containing all the model runs for a scenario.s
#' @param out_dir_scen_vec The directory to which to write output. IF NULL, will
#' default to the working dire... | /man/roxygen/templates/run_SSMSE_scen_list.R | permissive | nmfs-fish-tools/SSMSE | R | false | false | 4,304 | r | # parameters common to run_SSMSE and crate_scen_list
#' @param scen_name_vec A vector containing names of the scenarios. The each
#' string will be a directory containing all the model runs for a scenario.s
#' @param out_dir_scen_vec The directory to which to write output. IF NULL, will
#' default to the working dire... |
createCFile <- function(parameters, inputs,Eq, bden){
if(missing(bden)){
bden <- FALSE
}
StringC <- '#include <R.h>'
StringC = append(StringC,'#include <math.h>')
# define parameters and inputs
if(bden){
paraStr <- paste0('static double parms[',length(parameters)+inputs,'];')
} else {
... | /seeds-master/R/createC.R | no_license | Dominik12345/R | R | false | false | 4,163 | r | createCFile <- function(parameters, inputs,Eq, bden){
if(missing(bden)){
bden <- FALSE
}
StringC <- '#include <R.h>'
StringC = append(StringC,'#include <math.h>')
# define parameters and inputs
if(bden){
paraStr <- paste0('static double parms[',length(parameters)+inputs,'];')
} else {
... |
usePackage(packages=c("RODBC", "ReporteRs"))
# narrow down team assignment to one per person per day
teamCMH <- c("WSH - Access/Engagement",
"Community Support and Treatment Services - CSTS",
"WSH - ACT",
"WSH - ATO",
"WSH - Children's Services",
"... | /UM/LOCUS/Code/archive/ovr auxillary.r | no_license | JamesDalrymple/CMH | R | false | false | 7,558 | r | usePackage(packages=c("RODBC", "ReporteRs"))
# narrow down team assignment to one per person per day
teamCMH <- c("WSH - Access/Engagement",
"Community Support and Treatment Services - CSTS",
"WSH - ACT",
"WSH - ATO",
"WSH - Children's Services",
"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statx_print_request.R
\name{statx_print_request}
\alias{statx_print_request}
\title{Print a request body}
\usage{
statx_print_request(request)
}
\arguments{
\item{request}{\code{string}. A valid JSON request body. See the
\href{https://stat-x... | /man/statx_print_request.Rd | permissive | thomascrines/statx | R | false | true | 938 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statx_print_request.R
\name{statx_print_request}
\alias{statx_print_request}
\title{Print a request body}
\usage{
statx_print_request(request)
}
\arguments{
\item{request}{\code{string}. A valid JSON request body. See the
\href{https://stat-x... |
# Homework 1 - longley dataset testing
# Mengheng Xue
# Date: 02/06/2019
# step 1: load "longley" into new data frame called "test"
test = data.frame(longley)
# step 2: find dimensions and variable names
str(longley) # check the structure of the data
summary(longley) # summarize the dataset
dim(test) # 16 7
nrow(tes... | /homework1-longleyDatasetTest/homework1-longleyDatasetTest.R | permissive | gkranasinghe/FRE9733-Big-Data-in-Finance | R | false | false | 3,076 | r | # Homework 1 - longley dataset testing
# Mengheng Xue
# Date: 02/06/2019
# step 1: load "longley" into new data frame called "test"
test = data.frame(longley)
# step 2: find dimensions and variable names
str(longley) # check the structure of the data
summary(longley) # summarize the dataset
dim(test) # 16 7
nrow(tes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.