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 |
|---|---|---|---|---|---|---|---|---|---|
rm(list = ls())
setwd("G:/My Drive/back up/Linear models/151A 2018 FALL Linear Models/151A 2018 FALL Linear Models")
#Lecture Seven (Residual Sum of Squares, Multiple Rsquared, Standard Errors, Standardized or Studentized Residuals)
body = read.delim("bodyfat_corrected.txt", header = TRUE, sep = "")
head(body, 10)
mod... | /lecture slides/RcodeLec7.R | no_license | caojilin/stat151a | R | false | false | 2,056 | r | rm(list = ls())
setwd("G:/My Drive/back up/Linear models/151A 2018 FALL Linear Models/151A 2018 FALL Linear Models")
#Lecture Seven (Residual Sum of Squares, Multiple Rsquared, Standard Errors, Standardized or Studentized Residuals)
body = read.delim("bodyfat_corrected.txt", header = TRUE, sep = "")
head(body, 10)
mod... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn.R
\name{init_nn}
\alias{init_nn}
\title{Initialize network}
\usage{
init_nn(num_inputs, num_hidden_1, num_hidden_2, num_outputs)
}
\arguments{
\item{num_inputs}{dimension of inputs}
\item{num_hidden_1}{dimension of first hidden... | /man/init_nn.Rd | no_license | cran/simpleMLP | R | false | true | 755 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn.R
\name{init_nn}
\alias{init_nn}
\title{Initialize network}
\usage{
init_nn(num_inputs, num_hidden_1, num_hidden_2, num_outputs)
}
\arguments{
\item{num_inputs}{dimension of inputs}
\item{num_hidden_1}{dimension of first hidden... |
library(glmmTMB)
### Name: fixef
### Title: Extract fixed-effects estimates
### Aliases: fixef fixef.glmmTMB
### Keywords: models
### ** Examples
data(sleepstudy, package = "lme4")
fixef(glmmTMB(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy))
| /data/genthat_extracted_code/glmmTMB/examples/fixef.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 265 | r | library(glmmTMB)
### Name: fixef
### Title: Extract fixed-effects estimates
### Aliases: fixef fixef.glmmTMB
### Keywords: models
### ** Examples
data(sleepstudy, package = "lme4")
fixef(glmmTMB(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy))
|
#Setup
library(dplyr)
#Setting Up File Paths Online
#Bring in the Data Dictionary from the 'Data' folder
#The data dictionary file has a list of file names and years. It also contains variable names and the position of the variable in the file
#I want to rename each variable using this information. I want to... | /02_Performance_Readability/Performance_Example.R | no_license | cambreysullivan/STA_6233 | R | false | false | 869 | r | #Setup
library(dplyr)
#Setting Up File Paths Online
#Bring in the Data Dictionary from the 'Data' folder
#The data dictionary file has a list of file names and years. It also contains variable names and the position of the variable in the file
#I want to rename each variable using this information. I want to... |
## Plots graph 3
plot3 <- function(pBty="y", pCex=0.6)
{
source(paste(paste(getwd(),"/", sep=""), "plot1.R", sep=""))
dt <- getDt();
plot(x=dt$dateTime, y=dt$Sub_metering_1, type='l' ,ylab="Energy sub metering", xlab="")
points(x=dt$dateTime, y=dt$Sub_metering_2, type='l', col='red')
points(x=dt$dateTime, y=d... | /plot3.R | no_license | rennyatwork/ExData_Plotting1 | R | false | false | 528 | r | ## Plots graph 3
plot3 <- function(pBty="y", pCex=0.6)
{
source(paste(paste(getwd(),"/", sep=""), "plot1.R", sep=""))
dt <- getDt();
plot(x=dt$dateTime, y=dt$Sub_metering_1, type='l' ,ylab="Energy sub metering", xlab="")
points(x=dt$dateTime, y=dt$Sub_metering_2, type='l', col='red')
points(x=dt$dateTime, y=d... |
library(shiny)
library(readxl)
library(ISRaD)
# Define UI for data upload app ----
ui <- fluidPage(
# App title ----
titlePanel(title = div(img(src = "ISRaDlogoTextBelow_small2.png",
height = 104, width = 177),
"QA/QC",
style = "fon... | /shinyapp/app.R | no_license | huipengxi/ISRaD | R | false | false | 2,119 | r | library(shiny)
library(readxl)
library(ISRaD)
# Define UI for data upload app ----
ui <- fluidPage(
# App title ----
titlePanel(title = div(img(src = "ISRaDlogoTextBelow_small2.png",
height = 104, width = 177),
"QA/QC",
style = "fon... |
\alias{cairoToyFontFaceGetFamily}
\name{cairoToyFontFaceGetFamily}
\title{cairoToyFontFaceGetFamily}
\description{Gets the familly name of a toy font.}
\usage{cairoToyFontFaceGetFamily(font.face)}
\arguments{\item{\verb{font.face}}{[\code{\link{CairoFontFace}}] A toy font face}}
\details{ Since 1.8}
\value{[char] Th... | /RGtk2/man/cairoToyFontFaceGetFamily.Rd | no_license | lawremi/RGtk2 | R | false | false | 407 | rd | \alias{cairoToyFontFaceGetFamily}
\name{cairoToyFontFaceGetFamily}
\title{cairoToyFontFaceGetFamily}
\description{Gets the familly name of a toy font.}
\usage{cairoToyFontFaceGetFamily(font.face)}
\arguments{\item{\verb{font.face}}{[\code{\link{CairoFontFace}}] A toy font face}}
\details{ Since 1.8}
\value{[char] Th... |
server=function(input,output){
proxy=leafletProxy("map_id")
output$map_id=renderLeaflet(map)
observe({
click=input$map_id_shape_click
if(is.null(click$id))
return()
proxy%>%clearGroup(group=c("selected_city","selected_town_district"))%>%
clearMarkers()%>%
addLabe... | /Smart Travel/server.R | no_license | eason4best/2019-NTPU-Hackthon | R | false | false | 25,954 | r | server=function(input,output){
proxy=leafletProxy("map_id")
output$map_id=renderLeaflet(map)
observe({
click=input$map_id_shape_click
if(is.null(click$id))
return()
proxy%>%clearGroup(group=c("selected_city","selected_town_district"))%>%
clearMarkers()%>%
addLabe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/homepage.R
\name{generate_homepage}
\alias{generate_homepage}
\title{Create the homepage for https://defend-esc-dev.org}
\usage{
generate_homepage()
}
\description{
The homepage for our development site contains many different components that... | /man/generate_homepage.Rd | no_license | jacob-ogre/ESCindex | R | false | true | 631 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/homepage.R
\name{generate_homepage}
\alias{generate_homepage}
\title{Create the homepage for https://defend-esc-dev.org}
\usage{
generate_homepage()
}
\description{
The homepage for our development site contains many different components that... |
#' geospatial operation of intersection between the buffered river centerline sf and site sf
#' @importFrom magrittr %>%
#' @importFrom sf st_transform st_buffer st_intersection
#' @export
#' @param site_sf a sf object of sites
#' @param rivers a sf object of river centerline
#' @param buffer_dist the distance of buffe... | /R/bufferintersection.R | permissive | WeiquanLuo/rivertopo | R | false | false | 714 | r | #' geospatial operation of intersection between the buffered river centerline sf and site sf
#' @importFrom magrittr %>%
#' @importFrom sf st_transform st_buffer st_intersection
#' @export
#' @param site_sf a sf object of sites
#' @param rivers a sf object of river centerline
#' @param buffer_dist the distance of buffe... |
library(VGAM)
### Name: Oapospois
### Title: One-Altered Logarithmic Distribution
### Aliases: Oapospois doapospois poapospois qoapospois roapospois
### Keywords: distribution
### ** Examples
lambda <- 3; pobs1 <- 0.30; x <- (-1):7
doapospois(x, lambda = lambda, pobs1 = pobs1)
table(roapospois(100, lambda = lambda,... | /data/genthat_extracted_code/VGAM/examples/oapospoisUC.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 846 | r | library(VGAM)
### Name: Oapospois
### Title: One-Altered Logarithmic Distribution
### Aliases: Oapospois doapospois poapospois qoapospois roapospois
### Keywords: distribution
### ** Examples
lambda <- 3; pobs1 <- 0.30; x <- (-1):7
doapospois(x, lambda = lambda, pobs1 = pobs1)
table(roapospois(100, lambda = lambda,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/512.Error-Failure_LimitBased_ADJ_All_Graph.R
\name{PloterrAAS}
\alias{PloterrAAS}
\title{Plots error, long term power and pass/fail criteria using adjusted ArcSine method}
\usage{
PloterrAAS(n, alp, h, phi, f)
}
\arguments{
\item{n}{- Number ... | /man/PloterrAAS.Rd | no_license | RajeswaranV/proportion | R | false | true | 1,239 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/512.Error-Failure_LimitBased_ADJ_All_Graph.R
\name{PloterrAAS}
\alias{PloterrAAS}
\title{Plots error, long term power and pass/fail criteria using adjusted ArcSine method}
\usage{
PloterrAAS(n, alp, h, phi, f)
}
\arguments{
\item{n}{- Number ... |
#' Facebook API Authentication
#'
#' OAuth token based authentication with the Facebook API, with caching options
#' for automatic authentication (i.e. avoid using the browser).
#'
#' In order to collect data from Facebook, the user must first authenticate
#' with Facebook's Application Programming Interface (API). F... | /SocialMediaLab/R/AuthenticateWithFacebookAPI.R | no_license | manlius/SocialMediaLab | R | false | false | 4,126 | r | #' Facebook API Authentication
#'
#' OAuth token based authentication with the Facebook API, with caching options
#' for automatic authentication (i.e. avoid using the browser).
#'
#' In order to collect data from Facebook, the user must first authenticate
#' with Facebook's Application Programming Interface (API). F... |
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
temp <- SCC[grep("Combustion",SCC$SCC.Level.One),]
Coaldata <- temp[grep("Coal",temp$SCC.Level.Three),]
total3 <- NEI[NEI$SCC %in% Coaldata$SCC,]
year3 <- unique(total3$year)
total3 <- c(sum(total3$Emissions[which(total3$year == 199... | /plot4.R | no_license | pioneery/Exploratory-Data-Analysis-Project2 | R | false | false | 769 | r | NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
temp <- SCC[grep("Combustion",SCC$SCC.Level.One),]
Coaldata <- temp[grep("Coal",temp$SCC.Level.Three),]
total3 <- NEI[NEI$SCC %in% Coaldata$SCC,]
year3 <- unique(total3$year)
total3 <- c(sum(total3$Emissions[which(total3$year == 199... |
#' Posterior simulation
#'
#' Estimates the country models of a Bayesian GVAR model.
#'
#' @param object a list of data and model specifications for country-specific
#' models, which should be passed on to function \code{FUN}. Usually, the
#' output of a call to \code{\link{create_models}} in combination with \code{\... | /R/draw_posterior.gvecsubmodels.R | no_license | franzmohr/bgvars | R | false | false | 3,072 | r | #' Posterior simulation
#'
#' Estimates the country models of a Bayesian GVAR model.
#'
#' @param object a list of data and model specifications for country-specific
#' models, which should be passed on to function \code{FUN}. Usually, the
#' output of a call to \code{\link{create_models}} in combination with \code{\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/weatherSD.R
\name{weatherSD}
\alias{weatherSD}
\title{Computes the standard deviation of raster time series.}
\usage{
weatherSD(variable, tstart = NULL, tend = NULL, resolution = "monthly",
timedate, cores = 10, clcall = NULL)
}
\arguments{... | /man/weatherSD.Rd | no_license | henningte/herdersWDA | R | false | true | 1,326 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/weatherSD.R
\name{weatherSD}
\alias{weatherSD}
\title{Computes the standard deviation of raster time series.}
\usage{
weatherSD(variable, tstart = NULL, tend = NULL, resolution = "monthly",
timedate, cores = 10, clcall = NULL)
}
\arguments{... |
library(plyr)
library(magrittr)
library(stringr)
library(tm)
library(RWeka)
library(SnowballC)
library(ggplot2)
# download the dataset if it is not already there
if(!file.exists("./data")){
dir.create("./data")
url <- "https://d396qusza40orc.cloudfront.net/dsscapstone/dataset/Coursera-SwiftKey.zip"
download.file... | /data_preparation.R | no_license | Juhaninho/DataScienceCapstone | R | false | false | 2,621 | r | library(plyr)
library(magrittr)
library(stringr)
library(tm)
library(RWeka)
library(SnowballC)
library(ggplot2)
# download the dataset if it is not already there
if(!file.exists("./data")){
dir.create("./data")
url <- "https://d396qusza40orc.cloudfront.net/dsscapstone/dataset/Coursera-SwiftKey.zip"
download.file... |
#Stats 133 Lab 1
scored <- c(14, 14, 9, 14, 28, 13, 13, 24, 17, 6, 24, 0, 24, 13, 26, 14)
against <- c(19, 30, 16, 38, 31, 24, 23, 30, 41, 13, 20, 52, 13, 31, 24, 47)
# 1) How many points did the Raiders score in game 7?
scored [7]
# 2) What was the score of the first 5 games?
scored[c(1,2,3,4,5)]
# 3) What were th... | /labs1/lab 1/Lab 1.R | no_license | liams32/Stats-133 | R | false | false | 1,798 | r | #Stats 133 Lab 1
scored <- c(14, 14, 9, 14, 28, 13, 13, 24, 17, 6, 24, 0, 24, 13, 26, 14)
against <- c(19, 30, 16, 38, 31, 24, 23, 30, 41, 13, 20, 52, 13, 31, 24, 47)
# 1) How many points did the Raiders score in game 7?
scored [7]
# 2) What was the score of the first 5 games?
scored[c(1,2,3,4,5)]
# 3) What were th... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rds_operations.R
\name{rds_delete_db_instance}
\alias{rds_delete_db_instance}
\title{The DeleteDBInstance action deletes a previously provisioned DB instance}
\usage{
rds_delete_db_instance(DBInstanceIdentifier, SkipFinalSnapshot,
FinalDBSn... | /paws/man/rds_delete_db_instance.Rd | permissive | peoplecure/paws | R | false | true | 3,690 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rds_operations.R
\name{rds_delete_db_instance}
\alias{rds_delete_db_instance}
\title{The DeleteDBInstance action deletes a previously provisioned DB instance}
\usage{
rds_delete_db_instance(DBInstanceIdentifier, SkipFinalSnapshot,
FinalDBSn... |
## build master.sh script ##
library("EpiModelHPC")
# No PrEP Model -----------------------------------------------------------
vars <- list(PSP = 0,
PPI = 0,
PICPT = 3.59,
PHALF = 35,
RELHR = 1,
LOWP = 0.215,
DCREL = 1)
sbatch_master(va... | /scripts/followup/master.R | permissive | EpiModel/injectable-prep | R | false | false | 5,392 | r |
## build master.sh script ##
library("EpiModelHPC")
# No PrEP Model -----------------------------------------------------------
vars <- list(PSP = 0,
PPI = 0,
PICPT = 3.59,
PHALF = 35,
RELHR = 1,
LOWP = 0.215,
DCREL = 1)
sbatch_master(va... |
# Matrix
my.data <- 1:20
my.data
A <- matrix(my.data,4,5)
A
B <-matrix(my.data,4,5,byrow=T)
B
# rbind()
r1 <- c('I','am','happy')
r2 <- c('What','a','Day')
r3 <- c(1,2,3)
C <- rbind(r1,r2,r3)
C2 <- rbind(r3,r2,r1)
C2
# cbind()
c1 <- 1:5
c2 <- -1:-5
C3 <- cbind(c1,c2)
C3
# Selecting Rows and Col... | /datasets/udemy_matrix.R | no_license | sakuronohana/my_datascience | R | false | false | 827 | r | # Matrix
my.data <- 1:20
my.data
A <- matrix(my.data,4,5)
A
B <-matrix(my.data,4,5,byrow=T)
B
# rbind()
r1 <- c('I','am','happy')
r2 <- c('What','a','Day')
r3 <- c(1,2,3)
C <- rbind(r1,r2,r3)
C2 <- rbind(r3,r2,r1)
C2
# cbind()
c1 <- 1:5
c2 <- -1:-5
C3 <- cbind(c1,c2)
C3
# Selecting Rows and Col... |
# Analyze data
library(tidyverse)
library(brms)
library(caret)
# Clear workspace
rm(list=ls())
findBestFreeParam <- function(d, p) {
# Finds the best free parameter. The best free parameter is the one that
# produces the lowest RMSE between model predictions and data in a linear
# regression using 10-f... | /Experiment 3/Analysis/analyzedata.R | no_license | alanjern/behavior-explanation | R | false | false | 22,678 | r | # Analyze data
library(tidyverse)
library(brms)
library(caret)
# Clear workspace
rm(list=ls())
findBestFreeParam <- function(d, p) {
# Finds the best free parameter. The best free parameter is the one that
# produces the lowest RMSE between model predictions and data in a linear
# regression using 10-f... |
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source("../../scripts/h2o-r-test-setup.R")
#----------------------------------------------------------------------
# Purpose: This tests the stability of XGBoost models trained on
# frames with shuffled columns
#--------------------------... | /h2o-r/tests/testdir_hdfs/runit_INTERNAL_HDFS_xgb_varimp.R | permissive | ahmedengu/h2o-3 | R | false | false | 2,753 | r | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source("../../scripts/h2o-r-test-setup.R")
#----------------------------------------------------------------------
# Purpose: This tests the stability of XGBoost models trained on
# frames with shuffled columns
#--------------------------... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{graphs_8_0}
\alias{graphs_8_0}
\title{Admixture graphs of 8 leaves and 0 admixture events compressed into vectors}
\format{A data frame with 10395 rows and 225 variables.}
\source{
Calculated using \code{\link{all_... | /man/graphs_8_0.Rd | no_license | guzhongru/admixture_graph | R | false | true | 547 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{graphs_8_0}
\alias{graphs_8_0}
\title{Admixture graphs of 8 leaves and 0 admixture events compressed into vectors}
\format{A data frame with 10395 rows and 225 variables.}
\source{
Calculated using \code{\link{all_... |
#######################################################################
# ApplicationScript for Creating PDF Reports of CRAFTY CoBRA ouptut
#
# Project: CRAFTY CoBRA Demo
# Last update: 16/11/2016
# Author: Sascha Holzhauer
#######################################################################
# Only cont... | /config/R/setA/cluster/common/processReport.R | no_license | CRAFTY-ABM/CRAFTY_CoBRA_Demo | R | false | false | 2,528 | r | #######################################################################
# ApplicationScript for Creating PDF Reports of CRAFTY CoBRA ouptut
#
# Project: CRAFTY CoBRA Demo
# Last update: 16/11/2016
# Author: Sascha Holzhauer
#######################################################################
# Only cont... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_shortcuts.R
\name{make_shortcuts}
\alias{make_shortcuts}
\title{Make shortcut functions for data objects in bcmapsdata}
\usage{
make_shortcuts(file = "R/shortcuts.R")
}
\arguments{
\item{file}{the R file where the shortcut file is. Defau... | /man/make_shortcuts.Rd | permissive | YongLuo007/bcmaps | R | false | true | 817 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_shortcuts.R
\name{make_shortcuts}
\alias{make_shortcuts}
\title{Make shortcut functions for data objects in bcmapsdata}
\usage{
make_shortcuts(file = "R/shortcuts.R")
}
\arguments{
\item{file}{the R file where the shortcut file is. Defau... |
library(SearchTrees)
### Name: rectLookup
### Title: Perform Rectangular Lookup in 2d Space
### Aliases: rectLookup 'rectLookup, QuadTree-method'
### Keywords: rectangular lookup query
### ** Examples
x = rnorm(100)
y = rnorm(100)
x2 = x + runif(100, .5, 2)
y2 = y + runif(100, .5, 2)
dat2 = cbind(x, y, x2, y2)
tree... | /data/genthat_extracted_code/SearchTrees/examples/rectLookup.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 581 | r | library(SearchTrees)
### Name: rectLookup
### Title: Perform Rectangular Lookup in 2d Space
### Aliases: rectLookup 'rectLookup, QuadTree-method'
### Keywords: rectangular lookup query
### ** Examples
x = rnorm(100)
y = rnorm(100)
x2 = x + runif(100, .5, 2)
y2 = y + runif(100, .5, 2)
dat2 = cbind(x, y, x2, y2)
tree... |
#Primer Semestre
#install.packages("shiny")
library(shiny)
shinyServer(function(input, output) {
output$mayo<-renderPrint({
y<-input$select
paste(y,round(Prob_prod_Mayo[y], digits=4))
})
output$mayo2<-renderPrint({
y<-input$select2
paste(y,round(Prob_prod_Mayo[y], digits=4))
})... | /server.R | no_license | SupermercadoEmporium/Mayo | R | false | false | 9,599 | r | #Primer Semestre
#install.packages("shiny")
library(shiny)
shinyServer(function(input, output) {
output$mayo<-renderPrint({
y<-input$select
paste(y,round(Prob_prod_Mayo[y], digits=4))
})
output$mayo2<-renderPrint({
y<-input$select2
paste(y,round(Prob_prod_Mayo[y], digits=4))
})... |
\name{rect.hclust.labels}
\alias{rect.hclust.labels}
\title{Annotate the rectangles produced by rect.hclust using numbers.}
\usage{
rect.hclust.labels(tree, k = NULL, which = NULL,
x = NULL, h = NULL, border = 2, cluster = NULL)
}
\arguments{
\item{tree}{see rect.hclust. NB this must be identical to
those use... | /man/rect.hclust.labels.Rd | no_license | drmjc/mjcgraphics | R | false | false | 1,526 | rd | \name{rect.hclust.labels}
\alias{rect.hclust.labels}
\title{Annotate the rectangles produced by rect.hclust using numbers.}
\usage{
rect.hclust.labels(tree, k = NULL, which = NULL,
x = NULL, h = NULL, border = 2, cluster = NULL)
}
\arguments{
\item{tree}{see rect.hclust. NB this must be identical to
those use... |
library(delphiSurveys)
library(dplyr)
library(lubridate)
library(readr)
context("Testing creating of individual response output data for external sharing")
test_that("testing write_individual command", {
tdir <- tempfile()
test_data <- tibble(var1 = LETTERS, var2 = letters, token = LETTERS)
write_individual(t... | /surveys/delphiSurveys/tests/testthat/test-individual.R | no_license | vidyakalai/delphi-covidcast-hackathon-2020 | R | false | false | 762 | r | library(delphiSurveys)
library(dplyr)
library(lubridate)
library(readr)
context("Testing creating of individual response output data for external sharing")
test_that("testing write_individual command", {
tdir <- tempfile()
test_data <- tibble(var1 = LETTERS, var2 = letters, token = LETTERS)
write_individual(t... |
# @author Scott Dobbins
# @version 0.9.9.7
# @date 2018-01-11 22:00
### Context -----------------------------------------------------------------
context("Processing clean data")
debug_message("unit testing processed clean data")
### Cardinality -------------------------------------------------------------
test_... | /processor_test.R | no_license | sdobbins/AerialBombingOperations | R | false | false | 2,782 | r | # @author Scott Dobbins
# @version 0.9.9.7
# @date 2018-01-11 22:00
### Context -----------------------------------------------------------------
context("Processing clean data")
debug_message("unit testing processed clean data")
### Cardinality -------------------------------------------------------------
test_... |
context("Baseflow Separation")
# Load data set with baseflow computed by Tallaksen
ray <- read.csv2("tallaksen-ray-baseflow.csv")
ray$baseflow <- round(ray$baseflow, 3)
ray$time <- as.Date(ray$time, "%d.%m.%Y")
# compute baseflow with baseflow()
# vector of base flows is as long as input
ray$bf <- baseflow(r... | /data/genthat_extracted_code/lfstat/tests/test-baseflow.R | no_license | surayaaramli/typeRrh | R | false | false | 1,350 | r | context("Baseflow Separation")
# Load data set with baseflow computed by Tallaksen
ray <- read.csv2("tallaksen-ray-baseflow.csv")
ray$baseflow <- round(ray$baseflow, 3)
ray$time <- as.Date(ray$time, "%d.%m.%Y")
# compute baseflow with baseflow()
# vector of base flows is as long as input
ray$bf <- baseflow(r... |
fbGetLongTimeToken <-
function(client_id= NULL,client_secret = NULL,fb_exchange_token = NULL){
if(is.null(client_id)|is.null(client_secret)|is.null(fb_exchange_token)){
stop("Enter your Client ID, client_secret and short time token!")
}
link <- paste0("https://graph.facebook.com/oauth/access_to... | /R/fbGetLongTimeToken.R | no_license | key-Mustang/rfacebookstat | R | false | false | 758 | r | fbGetLongTimeToken <-
function(client_id= NULL,client_secret = NULL,fb_exchange_token = NULL){
if(is.null(client_id)|is.null(client_secret)|is.null(fb_exchange_token)){
stop("Enter your Client ID, client_secret and short time token!")
}
link <- paste0("https://graph.facebook.com/oauth/access_to... |
testlist <- list(phi = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = c(1.36656528938164e-311, -1.657912... | /dcurver/inst/testfiles/ddc/AFL_ddc/ddc_valgrind_files/1609866675-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 831 | r | testlist <- list(phi = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = c(1.36656528938164e-311, -1.657912... |
#' Aggregate a time series
#'
#' @description Function returns aggregated time series as xts object.
#' It can handle irregularly spaced timeseries and returns a regularly spaced one.
#' Use univariate timeseries as input for this function, and check out \code{\link{aggregateTrades}}
#' and \code{\link{aggregateQuote... | /R/data_handling.R | no_license | junfanz1/highfrequency | R | false | false | 74,071 | r | #' Aggregate a time series
#'
#' @description Function returns aggregated time series as xts object.
#' It can handle irregularly spaced timeseries and returns a regularly spaced one.
#' Use univariate timeseries as input for this function, and check out \code{\link{aggregateTrades}}
#' and \code{\link{aggregateQuote... |
# selects ideal bandwidth
#' @export
bwselect_jl = function(ests, SEs, len, plus = TRUE, z_alpha = 1.96)
{
# form the CI's' according to z_alpha
CIs = ci_form(ests, SEs, z_alpha)
# start at a sensible spot, then depending on increasing or decr psi in h
# we travel until no longer helpful
r = nrow(CIs)
fo... | /R/selector.R | no_license | jlstiles/TECDFsim | R | false | false | 5,803 | r | # selects ideal bandwidth
#' @export
bwselect_jl = function(ests, SEs, len, plus = TRUE, z_alpha = 1.96)
{
# form the CI's' according to z_alpha
CIs = ci_form(ests, SEs, z_alpha)
# start at a sensible spot, then depending on increasing or decr psi in h
# we travel until no longer helpful
r = nrow(CIs)
fo... |
sigma <- 5
f <- function(x,y) (2/pi)^(3/2) * 1/(sigma*sqrt(3)) * 1/(1+(x-y)^2/3)^2 * exp(-1/(2*sigma^2)*(x+y)^2)
set.seed(123456)
n <- 10^4
alpha <- 0.05
#sample y
x <- rnorm(n)
y <- rnorm(n)
w <- mapply(f, x, y)/(dnorm(x)*dnorm(y))
# compute estimate
is <- mean((x+y)^2*w)
#standard error of is, NOTE ALREADY DIVIDED... | /Code/Q3.R | no_license | lorenzflow/Computational-Statistics-Project-1 | R | false | false | 2,199 | r | sigma <- 5
f <- function(x,y) (2/pi)^(3/2) * 1/(sigma*sqrt(3)) * 1/(1+(x-y)^2/3)^2 * exp(-1/(2*sigma^2)*(x+y)^2)
set.seed(123456)
n <- 10^4
alpha <- 0.05
#sample y
x <- rnorm(n)
y <- rnorm(n)
w <- mapply(f, x, y)/(dnorm(x)*dnorm(y))
# compute estimate
is <- mean((x+y)^2*w)
#standard error of is, NOTE ALREADY DIVIDED... |
#' Read file
#'
#' The function reads a file.
#'
#' @param filename name of the file.
#' @return The function returns a table of classes "tbl_df", "tbl", "data.frame".
#' @details The function checks if the file exists. if it exists,
#' it reads it (also suppresses any messages that might be printed),
#' if it doesn't ... | /R/fars_functions.R | no_license | IdleImpala/fars | R | false | false | 5,506 | r | #' Read file
#'
#' The function reads a file.
#'
#' @param filename name of the file.
#' @return The function returns a table of classes "tbl_df", "tbl", "data.frame".
#' @details The function checks if the file exists. if it exists,
#' it reads it (also suppresses any messages that might be printed),
#' if it doesn't ... |
function (x, v, w)
{
e <- get("data.env", .GlobalEnv)
e[["ProbFun"]][[length(e[["ProbFun"]]) + 1]] <- list(x = x,
v = v, w = w)
.Call("_RaceID_ProbFun", x, v, w)
}
| /valgrind_test_dir/ProbFun-test.R | no_license | akhikolla/RcppDeepStateTest | R | false | false | 186 | r | function (x, v, w)
{
e <- get("data.env", .GlobalEnv)
e[["ProbFun"]][[length(e[["ProbFun"]]) + 1]] <- list(x = x,
v = v, w = w)
.Call("_RaceID_ProbFun", x, v, w)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run-examples.R
\name{run_examples}
\alias{run_examples}
\title{Run all examples in a package.}
\usage{
run_examples(pkg = ".", start = NULL, show = TRUE, test = FALSE,
run = TRUE, fresh = FALSE, document = TRUE)
}
\arguments{
\item{pkg}{pac... | /man/run_examples.Rd | no_license | Yixiangzhang1996/devtools | R | false | true | 1,742 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run-examples.R
\name{run_examples}
\alias{run_examples}
\title{Run all examples in a package.}
\usage{
run_examples(pkg = ".", start = NULL, show = TRUE, test = FALSE,
run = TRUE, fresh = FALSE, document = TRUE)
}
\arguments{
\item{pkg}{pac... |
#' Common Cliches
#'
#' A dataset containing a character vector of cliches.
#'
#' @section License: (The MIT License)
#' Copyright (c) 2016 Duncan Beaton <mailto:dunckr@@gmail.com>
#'
#' Permission is hereby granted, free of charge, to any person obtaining
#' a copy of this software and associated documentation file... | /trinker-lexicon-4c5e22b/R/cliches.R | no_license | pratyushaj/abusive-language-online | R | false | false | 1,465 | r | #' Common Cliches
#'
#' A dataset containing a character vector of cliches.
#'
#' @section License: (The MIT License)
#' Copyright (c) 2016 Duncan Beaton <mailto:dunckr@@gmail.com>
#'
#' Permission is hereby granted, free of charge, to any person obtaining
#' a copy of this software and associated documentation file... |
# Get the input values.
input <- mtcars[,c('wt','mpg')]
# Give the chart file a name.
png(file = "scatterplot.png")
# Plot the chart for cars with weight between 2.5 to 5 and mileage between 15 and 30.
plot(x = input$wt,y = input$mpg,
xlab = "Weight",
ylab = "Milage",
xlim = c(2.5,5),
ylim = c(15... | /Week0/Rbasics/plots.r | no_license | yippieyiho/dataminingMATH5836 | R | false | false | 986 | r |
# Get the input values.
input <- mtcars[,c('wt','mpg')]
# Give the chart file a name.
png(file = "scatterplot.png")
# Plot the chart for cars with weight between 2.5 to 5 and mileage between 15 and 30.
plot(x = input$wt,y = input$mpg,
xlab = "Weight",
ylab = "Milage",
xlim = c(2.5,5),
ylim = c(15... |
library(LiblineaR)
# Trains a linear SVM with parameter C on the training set with instances train_x
# and labels train_y. Then, evaluates the model on test_x computing for each
# instance the decision value. Finally, for each iteration and for each row or
# column the average decision value is evaluated. The row and ... | /linear_SVM.R | permissive | BinyuLU/SVMP300Speller | R | false | false | 2,276 | r | library(LiblineaR)
# Trains a linear SVM with parameter C on the training set with instances train_x
# and labels train_y. Then, evaluates the model on test_x computing for each
# instance the decision value. Finally, for each iteration and for each row or
# column the average decision value is evaluated. The row and ... |
rm(list=ls())
options(stringsAsFactors = F)
set.seed(1)
#!/usr/bin/env Rscript
# create at 2019.05.29
# author zhangyiming
load <- function() {
library(Seurat)
library(Mfuzz)
library(openxlsx)
library(ggplot2)
library(clusterProfiler)
library(DOSE)
library(GO.db)
library(KEGG.db)
... | /bak/5_stage_gene_module/Basal_SCC.R | no_license | Chenmengpin/inferCC | R | false | false | 10,029 | r | rm(list=ls())
options(stringsAsFactors = F)
set.seed(1)
#!/usr/bin/env Rscript
# create at 2019.05.29
# author zhangyiming
load <- function() {
library(Seurat)
library(Mfuzz)
library(openxlsx)
library(ggplot2)
library(clusterProfiler)
library(DOSE)
library(GO.db)
library(KEGG.db)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ML_SurvRegModel.R
\name{SurvRegModel}
\alias{SurvRegModel}
\alias{SurvRegStepAICModel}
\title{Parametric Survival Model}
\usage{
SurvRegModel(
dist = c("weibull", "exponential", "gaussian", "logistic", "lognormal",
"logloglogistic"),
... | /man/SurvRegModel.Rd | no_license | chen061218/MachineShop | R | false | true | 2,190 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ML_SurvRegModel.R
\name{SurvRegModel}
\alias{SurvRegModel}
\alias{SurvRegStepAICModel}
\title{Parametric Survival Model}
\usage{
SurvRegModel(
dist = c("weibull", "exponential", "gaussian", "logistic", "lognormal",
"logloglogistic"),
... |
#################################################################################################
###This code will generate grower reports by:
#1.bring in the strip data for a site
#2.run paired t-test,
#3.create plots
#4.Accesses lab results and generates reports
## Approach using polygon to pull out raw yield d... | /Landmark/Matt_Nihill/Jenharwil_2/Landmark_Brookland.R | no_license | JackieOuzman/strip_graphs | R | false | false | 28,619 | r |
#################################################################################################
###This code will generate grower reports by:
#1.bring in the strip data for a site
#2.run paired t-test,
#3.create plots
#4.Accesses lab results and generates reports
## Approach using polygon to pull out raw yield d... |
library(magrittr)
library(purrr)
# reduce ------------------------------------------------------------------
1:3 %>% reduce(`+`)
1:10 %>% reduce(`*`)
paste2 <- function(x, y, sep = ".") paste(x, y, sep = sep)
letters[1:4] %>% reduce(paste2)
letters[1:4] %>% reduce2(c("-", ".", "-"), paste2)
letters[1:8] %>% reduce2(c... | /purrr/2_fp.R | permissive | romatik/touring_the_tidyverse | R | false | false | 1,637 | r | library(magrittr)
library(purrr)
# reduce ------------------------------------------------------------------
1:3 %>% reduce(`+`)
1:10 %>% reduce(`*`)
paste2 <- function(x, y, sep = ".") paste(x, y, sep = sep)
letters[1:4] %>% reduce(paste2)
letters[1:4] %>% reduce2(c("-", ".", "-"), paste2)
letters[1:8] %>% reduce2(c... |
dat <- read.csv("finalData/train_reviews_BS.csv")
# dat <- read.csv("imp_train_restaurants.csv")
# summary(dat)
names(dat)
# dat$total = dat$useful+dat$cool+dat$funny
dat$review_length = apply(dat, 1, FUN = function(x) nchar(x['text']))
dat = na.omit(dat)
require(VGAM)
# data = subset(dat, select = c(total_votes, sta... | /Regression/final_poisson_BS.R | no_license | nikk9999/Predicting_Yelp_Review_Votes | R | false | false | 5,735 | r | dat <- read.csv("finalData/train_reviews_BS.csv")
# dat <- read.csv("imp_train_restaurants.csv")
# summary(dat)
names(dat)
# dat$total = dat$useful+dat$cool+dat$funny
dat$review_length = apply(dat, 1, FUN = function(x) nchar(x['text']))
dat = na.omit(dat)
require(VGAM)
# data = subset(dat, select = c(total_votes, sta... |
#' Tournament Player Stats
#'
#' Tournament Player Stats.
#'
#' A list will be returned that contains three elements. The content, the url and the response
#' received from the api.
#'
#' The content element of the list contains information about the matches the player played and
#' information about global sta... | /R/get_tournament_player_stats.R | no_license | cran/RDota2 | R | false | false | 1,854 | r | #' Tournament Player Stats
#'
#' Tournament Player Stats.
#'
#' A list will be returned that contains three elements. The content, the url and the response
#' received from the api.
#'
#' The content element of the list contains information about the matches the player played and
#' information about global sta... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{dictionary_schedules}
\alias{dictionary_schedules}
\title{Data Dictionary: Schedules}
\format{
An object of class \code{data.frame} with 27 rows and 2 columns.
}
\usage{
dictionary_schedules
}
\description{
A dataf... | /man/dictionary_schedules.Rd | permissive | ssavala/nflreadr | R | false | true | 560 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{dictionary_schedules}
\alias{dictionary_schedules}
\title{Data Dictionary: Schedules}
\format{
An object of class \code{data.frame} with 27 rows and 2 columns.
}
\usage{
dictionary_schedules
}
\description{
A dataf... |
#' @import behavr
#' @importFrom data.table ":="
#' @importFrom stats "na.omit"
#' @importFrom utils "read.csv" "download.file"
NULL
| /R/aaa.R | no_license | rethomics/scopr | R | false | false | 134 | r | #' @import behavr
#' @importFrom data.table ":="
#' @importFrom stats "na.omit"
#' @importFrom utils "read.csv" "download.file"
NULL
|
\name{make.ngrams}
\alias{make.ngrams}
\title{Make text n-grams}
\description{
Function that combines a vector of text units (words,
characters, POS-tags, other features) into pairs, triplets, or
longer sequences, commonly referred to as n-grams.
}
\usage{
make.ngrams(input.text, ngram.size = 1)
}
\arguments{
\item... | /man/make.ngrams.Rd | no_license | mikekestemont/stylo | R | false | false | 3,455 | rd | \name{make.ngrams}
\alias{make.ngrams}
\title{Make text n-grams}
\description{
Function that combines a vector of text units (words,
characters, POS-tags, other features) into pairs, triplets, or
longer sequences, commonly referred to as n-grams.
}
\usage{
make.ngrams(input.text, ngram.size = 1)
}
\arguments{
\item... |
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ct)
x1 <- matrix(c(12, 5, 9, 7), ncol = 2)
# Define UI for applicat... | /ct/inst/shiny-apps/app1/ui.R | permissive | richarddmorey/contingencyTablesShiny | R | false | false | 1,787 | r | #
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ct)
x1 <- matrix(c(12, 5, 9, 7), ncol = 2)
# Define UI for applicat... |
library("data.table")
##fileUrl<-"http://www.cpc.ncep.noaa.gov/data/indices/wksst8110.for"
fileUrl<-"https://d396qusza40orc.cloudfront.net/getdata%2Fwksst8110.for"
download.file(fileUrl,dest="./data/num.txt",method="curl")
tab<-read.fwf("./data/num.txt",skip=4, widths=c(10,5,4,4,5,4,4,5,4,4,5,4,4))
sum(tab$V6)
| /dc_q2_q5.R | no_license | DataScienceGB/test | R | false | false | 313 | r | library("data.table")
##fileUrl<-"http://www.cpc.ncep.noaa.gov/data/indices/wksst8110.for"
fileUrl<-"https://d396qusza40orc.cloudfront.net/getdata%2Fwksst8110.for"
download.file(fileUrl,dest="./data/num.txt",method="curl")
tab<-read.fwf("./data/num.txt",skip=4, widths=c(10,5,4,4,5,4,4,5,4,4,5,4,4))
sum(tab$V6)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/student.R
\name{rmatrixit}
\alias{rmatrixit}
\title{Matrix inverted-t sampler}
\usage{
rmatrixit(n, nu, M, U, V, checkSymmetry = TRUE, keep = TRUE)
}
\arguments{
\item{n}{sample size, a positive integer}
\item{nu}{degrees of freedom, any pos... | /man/rmatrixit.Rd | no_license | stla/matrixsampling | R | false | true | 1,299 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/student.R
\name{rmatrixit}
\alias{rmatrixit}
\title{Matrix inverted-t sampler}
\usage{
rmatrixit(n, nu, M, U, V, checkSymmetry = TRUE, keep = TRUE)
}
\arguments{
\item{n}{sample size, a positive integer}
\item{nu}{degrees of freedom, any pos... |
\encoding{UTF-8}
\name{MUS.extraction}
\alias{MUS.extraction}
\title{Extract a sample using Monetary Unit Sampling.}
\description{
Extract a sample using Monetary Unit Sampling. At the end of the
extraction step, you get to know the items that you have to audit.
}
\usage{
MUS.extraction(plan, start.point, seed, obe... | /man/MUS.extraction.Rd | no_license | alsguimaraes/MUS | R | false | false | 3,238 | rd | \encoding{UTF-8}
\name{MUS.extraction}
\alias{MUS.extraction}
\title{Extract a sample using Monetary Unit Sampling.}
\description{
Extract a sample using Monetary Unit Sampling. At the end of the
extraction step, you get to know the items that you have to audit.
}
\usage{
MUS.extraction(plan, start.point, seed, obe... |
library(GEOmap)
### Name: boundGEOmap
### Title: Set Bounds for GEOmap
### Aliases: boundGEOmap
### Keywords: misc
### ** Examples
library(geomapdata)
data(worldmap)
worldmap = boundGEOmap(worldmap)
| /data/genthat_extracted_code/GEOmap/examples/boundGEOmap.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 210 | r | library(GEOmap)
### Name: boundGEOmap
### Title: Set Bounds for GEOmap
### Aliases: boundGEOmap
### Keywords: misc
### ** Examples
library(geomapdata)
data(worldmap)
worldmap = boundGEOmap(worldmap)
|
library(shiny)
library(stringr)
#Define server logic required to plot various variables against mpg
shinyServer(function(input, output) {
output$table <- renderDataTable({
dataset <- read.csv("./data/todos.csv",
header = TRUE)
... | /data_products/server.R | no_license | dcgodoyg/jhudatasciencespecialization | R | false | false | 1,412 | r | library(shiny)
library(stringr)
#Define server logic required to plot various variables against mpg
shinyServer(function(input, output) {
output$table <- renderDataTable({
dataset <- read.csv("./data/todos.csv",
header = TRUE)
... |
# Use cbind() function to add a column or multiple columns to a matrix,
# which merges matrices and/or vectors together by column.
# Construct star_wars_matrix
box_office <- c(460.998, 314.4, 290.475, 247.900, 309.306, 165.8)
star_wars_matrix <- matrix(box_office, nrow = 3, byrow = TRUE,
... | /section 3/add_columns.R | no_license | esonpaguia/r-tutorial-2 | R | false | false | 700 | r | # Use cbind() function to add a column or multiple columns to a matrix,
# which merges matrices and/or vectors together by column.
# Construct star_wars_matrix
box_office <- c(460.998, 314.4, 290.475, 247.900, 309.306, 165.8)
star_wars_matrix <- matrix(box_office, nrow = 3, byrow = TRUE,
... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/cognostics.R
\name{cogMean}
\alias{cogMean}
\title{Compute Mean Cognostic}
\usage{
cogMean(x, desc = "mean", group = "common", defLabel = FALSE,
defActive = TRUE, filterable = TRUE)
}
\arguments{
\item{x}{numeric vector from which t... | /man/cogMean.Rd | permissive | jfgilman/trelliscope | R | false | false | 596 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/cognostics.R
\name{cogMean}
\alias{cogMean}
\title{Compute Mean Cognostic}
\usage{
cogMean(x, desc = "mean", group = "common", defLabel = FALSE,
defActive = TRUE, filterable = TRUE)
}
\arguments{
\item{x}{numeric vector from which t... |
RMSE = function(a, b){
sqrt(mean((a - b)^2))
}
# Import the dataset
dataset = read.csv('polyRegression.csv')
print(colnames(dataset))
dataset <- dataset[,-1]
print(colnames(dataset))
# Splitting the dataset
library(caTools)
split = sample.split(dataset$X, SplitRatio = 0.8)
training_set = subset(dataset, split == ... | /Subject_Regression/R4_svr.R | permissive | mahnooranjum/R_Programming | R | false | false | 1,306 | r |
RMSE = function(a, b){
sqrt(mean((a - b)^2))
}
# Import the dataset
dataset = read.csv('polyRegression.csv')
print(colnames(dataset))
dataset <- dataset[,-1]
print(colnames(dataset))
# Splitting the dataset
library(caTools)
split = sample.split(dataset$X, SplitRatio = 0.8)
training_set = subset(dataset, split == ... |
library(glmnet)
mydata = read.table("./TrainingSet/RF/lung_other.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.4,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/lung_other/lung_other_051.txt',a... | /Model/EN/Classifier/lung_other/lung_other_051.R | no_license | leon1003/QSMART | R | false | false | 361 | r | library(glmnet)
mydata = read.table("./TrainingSet/RF/lung_other.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.4,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/lung_other/lung_other_051.txt',a... |
draw3DMapTrack <- function(mapRaster,
trackdf=NULL,
spList=NULL, # overrides feature layers in rasterStack
featureLevels=NULL,
maxElev=3000,
minElev=0,
... | /R/displayfunctions.R | permissive | CraigMohn/maptrack3d | R | false | false | 20,345 | r | draw3DMapTrack <- function(mapRaster,
trackdf=NULL,
spList=NULL, # overrides feature layers in rasterStack
featureLevels=NULL,
maxElev=3000,
minElev=0,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/condense.R
\name{condense}
\alias{condense}
\title{Sample points based on distance matrix}
\usage{
condense(d, radius, seed = 1, ...)
}
\arguments{
\item{d}{object of class 'dist'}
\item{radius}{(numeric) radius around a point}
\item{seed}{... | /man/condense.Rd | no_license | talegari/sidekicks | R | false | true | 1,263 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/condense.R
\name{condense}
\alias{condense}
\title{Sample points based on distance matrix}
\usage{
condense(d, radius, seed = 1, ...)
}
\arguments{
\item{d}{object of class 'dist'}
\item{radius}{(numeric) radius around a point}
\item{seed}{... |
linmodEst <- function(x, y) {
## compute QR-decomposition of x
qx <- qr(x)
## compute (x’x)^(-1) x’y
coef <- solve.qr(qx, y)
## degrees of freedom and standard deviation of residuals
df <- nrow(x) - ncol(x)
sigma2 <- sum((y - x %*% coef) ^ 2) / df
## compute sigma^2 * (x’x)^-1
vcov <- sigma2 * chol2in... | /R/linreg.R | no_license | hilgerch/Linreg | R | false | false | 1,225 | r | linmodEst <- function(x, y) {
## compute QR-decomposition of x
qx <- qr(x)
## compute (x’x)^(-1) x’y
coef <- solve.qr(qx, y)
## degrees of freedom and standard deviation of residuals
df <- nrow(x) - ncol(x)
sigma2 <- sum((y - x %*% coef) ^ 2) / df
## compute sigma^2 * (x’x)^-1
vcov <- sigma2 * chol2in... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/A_DynTxRegime.R
\docType{class}
\name{DynTxRegime-class}
\alias{DynTxRegime-class}
\title{Class \code{DynTxRegime}}
\description{
Class \code{DynTxRegime} is a component of all statistical methods
implemented in the package. This class conta... | /man/DynTxRegime-class.Rd | no_license | cran/DynTxRegime | R | false | true | 589 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/A_DynTxRegime.R
\docType{class}
\name{DynTxRegime-class}
\alias{DynTxRegime-class}
\title{Class \code{DynTxRegime}}
\description{
Class \code{DynTxRegime} is a component of all statistical methods
implemented in the package. This class conta... |
library(tidycensus)
library(purrr)
library(readr)
library(stringr)
library(dplyr)
library(tidyr)
library(tibble)
library(forcats)
library(yaml)
library(ggplot2)
source("src/load_acs_variable_data.R")
# goal: get into wide form like with plot_descriptives
# then summarise and look at the descriptives
# join by city t... | /src/compare_to_context.R | no_license | ccgilroy/ma-thesis | R | false | false | 5,837 | r | library(tidycensus)
library(purrr)
library(readr)
library(stringr)
library(dplyr)
library(tidyr)
library(tibble)
library(forcats)
library(yaml)
library(ggplot2)
source("src/load_acs_variable_data.R")
# goal: get into wide form like with plot_descriptives
# then summarise and look at the descriptives
# join by city t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lsEspaDownloadOrders.R
\name{lsEspaDownloadOrders}
\alias{lsEspaDownloadOrders}
\title{Downloads the images that have been pre-processed by ESPA}
\usage{
lsEspaDownloadOrders(
orders,
AppRoot,
username = NULL,
password = NUL... | /man/lsEspaDownloadOrders.Rd | no_license | cran/RGISTools | R | false | true | 3,676 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lsEspaDownloadOrders.R
\name{lsEspaDownloadOrders}
\alias{lsEspaDownloadOrders}
\title{Downloads the images that have been pre-processed by ESPA}
\usage{
lsEspaDownloadOrders(
orders,
AppRoot,
username = NULL,
password = NUL... |
########################################################
#
# Movement analysis for thrushes in
# a fragmented landscape
#
# Natalia Stefanini Silveira - nat.stefanini at gmail.com
# Bernardo Niebuhr - bernardo_brandaum at yahoo.com.br
# Aug. 2015
#
# Reference: Silveira et al. 2015.
# Effects of land cover on the movem... | /turdus_movement_Silveira_etal_2016_PONE/Silveira_etal_Appendix_S1_R_code.R | permissive | bniebuhr/movecology | R | false | false | 18,132 | r | ########################################################
#
# Movement analysis for thrushes in
# a fragmented landscape
#
# Natalia Stefanini Silveira - nat.stefanini at gmail.com
# Bernardo Niebuhr - bernardo_brandaum at yahoo.com.br
# Aug. 2015
#
# Reference: Silveira et al. 2015.
# Effects of land cover on the movem... |
# svm_server.R
library(caret)
library(LiblineaR)
# Loading Initial Data
load("stat154-dropbox/train_join.RData")
load("stat154-dropbox/test_joined.RData")
# Quick Data Cleaning
joined_train$n.activity <- as.numeric(as.character(joined_train$n.activity))
# Splitting dataset by 80% train, 20% test (from training datas... | /code/oldscripts/jong_svm_server.R | no_license | vaibhavram/s154_project | R | false | false | 1,477 | r | # svm_server.R
library(caret)
library(LiblineaR)
# Loading Initial Data
load("stat154-dropbox/train_join.RData")
load("stat154-dropbox/test_joined.RData")
# Quick Data Cleaning
joined_train$n.activity <- as.numeric(as.character(joined_train$n.activity))
# Splitting dataset by 80% train, 20% test (from training datas... |
x <- rnorm(10,20,2)
x
rapply()
rapply(x, order)
## Read outcome data
file <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## Check that state and outcome are valid
ValidStates <- file$State == "TX"
colnum <- 17
NAs <- EligibleRows[ , colnum]!="Not Available"
... | /rProgramming/ProgrammingAssignment3/Supplimental.R | no_license | mstallkamp4/datasciencecoursera | R | false | false | 2,193 | r |
x <- rnorm(10,20,2)
x
rapply()
rapply(x, order)
## Read outcome data
file <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## Check that state and outcome are valid
ValidStates <- file$State == "TX"
colnum <- 17
NAs <- EligibleRows[ , colnum]!="Not Available"
... |
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/1615836507-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,048 | 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... |
# setwd("/home/themi/IOWA_notebook/counts")
setwd("D:/IOWA_notebook/counts")
library(DESeq2)
library("ggplot2")
#library("vsn")
library("pheatmap")
library("RColorBrewer")
library("org.Hs.eg.db")
library("clusterProfiler")
counts_hungria <- read.table("counts_non_rRNA_iowa.txt", header = T, stringsAsFactors = ... | /R scripts/deseq_sem_T2.R | no_license | theminegreiros/GBS-gene-expression-analysis-pipeline | R | false | false | 70,904 | r | # setwd("/home/themi/IOWA_notebook/counts")
setwd("D:/IOWA_notebook/counts")
library(DESeq2)
library("ggplot2")
#library("vsn")
library("pheatmap")
library("RColorBrewer")
library("org.Hs.eg.db")
library("clusterProfiler")
counts_hungria <- read.table("counts_non_rRNA_iowa.txt", header = T, stringsAsFactors = ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/processArgs.R
\name{processArgs}
\alias{processArgs}
\alias{chkstop_df}
\alias{chkstop_okmiss}
\alias{chkstop_type}
\alias{chkstop_revitems}
\alias{chk_imin}
\alias{chk_imax}
\alias{chkstop_minmax}
\title{Argument Processors for \c... | /man/processArgs.Rd | no_license | cran/PROscorerTools | R | false | true | 2,833 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/processArgs.R
\name{processArgs}
\alias{processArgs}
\alias{chkstop_df}
\alias{chkstop_okmiss}
\alias{chkstop_type}
\alias{chkstop_revitems}
\alias{chk_imin}
\alias{chk_imax}
\alias{chkstop_minmax}
\title{Argument Processors for \c... |
printer <- function(r, x, y){
print(paste0("x = ", x))
}
| /R/Printer.R | no_license | Qing-Gong/earth | R | false | false | 60 | r | printer <- function(r, x, y){
print(paste0("x = ", x))
}
|
powerdata <- read.table("household_power_consumption.txt", header = TRUE, sep = ";")
powerdata$Date <- as.Date(powerdata$Date, format="%d/%m/%Y")
mydata <- subset(powerdata, Date == "2007-02-01" | Date == "2007-02-02")
mydata$datetime <- paste(as.character(mydata$Date), as.character(mydata$Time))
mydata$datetime <- st... | /plot3.R | no_license | pawnypro/ExData_Plotting1 | R | false | false | 1,146 | r | powerdata <- read.table("household_power_consumption.txt", header = TRUE, sep = ";")
powerdata$Date <- as.Date(powerdata$Date, format="%d/%m/%Y")
mydata <- subset(powerdata, Date == "2007-02-01" | Date == "2007-02-02")
mydata$datetime <- paste(as.character(mydata$Date), as.character(mydata$Time))
mydata$datetime <- st... |
#!/usr/bin/env R
##### UG R STATISTICS DEMONSTRATION (YEAR 2) #####
setwd("~/Documents/Other/Code/")
rm(list=ls())
graphics.off()
GaussianSample <- rnorm(1000, m=10, sd=1)
PoissonSample <- rpois(1000, lambda=10)
par(mfrow=c(1,2))
par(mfg=c(1,1)); hist(GaussianSample, col=rgb(0.5,1,0), main="n = 1000", breaks=20)
pa... | /Code/R/Demonstration_UG.R | no_license | saulmoore1/MSc_CMEE | R | false | false | 2,174 | r | #!/usr/bin/env R
##### UG R STATISTICS DEMONSTRATION (YEAR 2) #####
setwd("~/Documents/Other/Code/")
rm(list=ls())
graphics.off()
GaussianSample <- rnorm(1000, m=10, sd=1)
PoissonSample <- rpois(1000, lambda=10)
par(mfrow=c(1,2))
par(mfg=c(1,1)); hist(GaussianSample, col=rgb(0.5,1,0), main="n = 1000", breaks=20)
pa... |
# List all the packages that will be used
packages <- c("phytools",
"phangorn",
"ape",
"ggplot2",
"Racmacs",
"ggacmap",
"ggpubr",
"plotly",
"factoextra",
"cowplot",
"seqinr",
... | /src/dependencies.R | no_license | bweedop/antigenicIsolation | R | false | false | 1,608 | r | # List all the packages that will be used
packages <- c("phytools",
"phangorn",
"ape",
"ggplot2",
"Racmacs",
"ggacmap",
"ggpubr",
"plotly",
"factoextra",
"cowplot",
"seqinr",
... |
install.packages(dplyr)
library(dplyr)
install.packages(chron)
library(chron)
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile="power")
data<-file.choose()
#import data
power<-read.table(data, sep=";", header=TRUE)
#conver test data Dat... | /plot1.R | no_license | simonswes/ExData_Plotting1 | R | false | false | 850 | r |
install.packages(dplyr)
library(dplyr)
install.packages(chron)
library(chron)
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile="power")
data<-file.choose()
#import data
power<-read.table(data, sep=";", header=TRUE)
#conver test data Dat... |
checkMatricesXX <- function(X_t1,X_t2) {
# X_t1 - checked
# X_t2 - checked
if(ncol(X_t1) != ncol(X_t2)) {
stop("Input matrices must have the same number of columns")
}
} | /R/checkMatricesXX.R | no_license | aciobanusebi/s2fa | R | false | false | 187 | r | checkMatricesXX <- function(X_t1,X_t2) {
# X_t1 - checked
# X_t2 - checked
if(ncol(X_t1) != ncol(X_t2)) {
stop("Input matrices must have the same number of columns")
}
} |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fastphase.R
\name{WriteFastPHASE}
\alias{WriteFastPHASE}
\title{Save a vector with haplotypes as a simplified fastPHASE file ready for
imputation.}
\usage{
WriteFastPHASE(g, pref, n = NULL)
}
\arguments{
\item{g}{character vector with haploty... | /man/WriteFastPHASE.Rd | permissive | evodify/imputeqc | R | false | true | 632 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fastphase.R
\name{WriteFastPHASE}
\alias{WriteFastPHASE}
\title{Save a vector with haplotypes as a simplified fastPHASE file ready for
imputation.}
\usage{
WriteFastPHASE(g, pref, n = NULL)
}
\arguments{
\item{g}{character vector with haploty... |
# install.packages("caret")
library(rpart)
library(caret)
setwd("~/Workspace/cpsc_340/Assignment_2")
train_data <- read.csv("data/2014CensusTraining.csv")
train_half_data <- read.csv("data/2014HalfCensusTraining.csv")
test_data <- read.csv("data/2014NewCensusTest.csv")
# Entire data
F5 <- rpart(train_data$class ~ age... | /Assignment_2/assignment2.R | no_license | rafadaguiar/cpsc_340 | R | false | false | 1,815 | r | # install.packages("caret")
library(rpart)
library(caret)
setwd("~/Workspace/cpsc_340/Assignment_2")
train_data <- read.csv("data/2014CensusTraining.csv")
train_half_data <- read.csv("data/2014HalfCensusTraining.csv")
test_data <- read.csv("data/2014NewCensusTest.csv")
# Entire data
F5 <- rpart(train_data$class ~ age... |
testlist <- list(n = -16711936L, x = structure(c(1.03243427034734e-305, 5.42310838375115e-312 ), .Dim = 2:1))
result <- do.call(multivariance:::doubleCenterBiasCorrectedUpperLower,testlist)
str(result) | /multivariance/inst/testfiles/doubleCenterBiasCorrectedUpperLower/libFuzzer_doubleCenterBiasCorrectedUpperLower/doubleCenterBiasCorrectedUpperLower_valgrind_files/1612735610-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 201 | r | testlist <- list(n = -16711936L, x = structure(c(1.03243427034734e-305, 5.42310838375115e-312 ), .Dim = 2:1))
result <- do.call(multivariance:::doubleCenterBiasCorrectedUpperLower,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Results.R
\name{results,run-method}
\alias{results,run-method}
\title{Create a df with every run selected}
\usage{
\S4method{results}{run}(object, plot = F)
}
\arguments{
\item{run}{}
}
\description{
Create a df with every run selected
}
| /man/results-run-method.Rd | no_license | Peccary-PMX/PeccaResult | R | false | true | 316 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Results.R
\name{results,run-method}
\alias{results,run-method}
\title{Create a df with every run selected}
\usage{
\S4method{results}{run}(object, plot = F)
}
\arguments{
\item{run}{}
}
\description{
Create a df with every run selected
}
|
#' Get the graph's edf filtered by a selection of edges
#'
#' From a graph object of class \code{dgr_graph}, get the graph's internal edge
#' data frame that is filtered by the edge ID values currently active as a
#' selection.
#'
#' This function makes use of an active selection of edges (and the function
#' ending wi... | /R/get_edge_df_ws.R | permissive | lionel-/DiagrammeR | R | false | false | 2,276 | r | #' Get the graph's edf filtered by a selection of edges
#'
#' From a graph object of class \code{dgr_graph}, get the graph's internal edge
#' data frame that is filtered by the edge ID values currently active as a
#' selection.
#'
#' This function makes use of an active selection of edges (and the function
#' ending wi... |
library(ape)
testtree <- read.tree("10150_2.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="10150_2_unrooted.txt") | /codeml_files/newick_trees_processed_and_cleaned/10150_2/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("10150_2.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="10150_2_unrooted.txt") |
# Future Sales
# Eugene Lucino - Team Why Axis
# read data (change file path as needed)
sales <- read.csv("Machine Learning/Predict Future Sales/sales_train.csv")
# no missing values here!
colSums(is.na(sales))
# but 6 duplicates; remove with nodup
sales[duplicated(sales),]
nodup <- unique(sales)
# one... | /preprocessing.r | no_license | tequania/Machine-Learning-Project | R | false | false | 1,351 | r | # Future Sales
# Eugene Lucino - Team Why Axis
# read data (change file path as needed)
sales <- read.csv("Machine Learning/Predict Future Sales/sales_train.csv")
# no missing values here!
colSums(is.na(sales))
# but 6 duplicates; remove with nodup
sales[duplicated(sales),]
nodup <- unique(sales)
# one... |
# 1st
# The vector pioneers has already been created for you
pioneers <- c("GAUSS:1777", "BAYES:1702", "PASCAL:1623", "PEARSON:1857")
# Split names from birth year
split_math <- strsplit(pioneers, split = ":")
# Convert to lowercase strings: split_low
# lapply(tolower(split_math, "FUN"))
split_low <- lapply(split_ma... | /fourthIntermediate.r | no_license | anugrah-danang-abiyoga/self-journal-for-R | R | false | false | 1,907 | r | # 1st
# The vector pioneers has already been created for you
pioneers <- c("GAUSS:1777", "BAYES:1702", "PASCAL:1623", "PEARSON:1857")
# Split names from birth year
split_math <- strsplit(pioneers, split = ":")
# Convert to lowercase strings: split_low
# lapply(tolower(split_math, "FUN"))
split_low <- lapply(split_ma... |
library(pRoloc)
### Name: checkFvarOverlap
### Title: Compare a feature variable overlap
### Aliases: checkFvarOverlap
### ** Examples
library("pRolocdata")
data(dunkley2006)
res <- checkFvarOverlap(dunkley2006, dunkley2006,
"markers", "markers.orig")
str(res)
| /data/genthat_extracted_code/pRoloc/examples/checkFvarOverlap.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 292 | r | library(pRoloc)
### Name: checkFvarOverlap
### Title: Compare a feature variable overlap
### Aliases: checkFvarOverlap
### ** Examples
library("pRolocdata")
data(dunkley2006)
res <- checkFvarOverlap(dunkley2006, dunkley2006,
"markers", "markers.orig")
str(res)
|
# Master code generative modeling thesis
# By: Harold Achicanoy
# Universidad del Valle
options(warn = -1, scipen = 999)
suppressMessages(library(readr))
# Run StyleGAN function
run_stylegan <- function(source_domain = "paintings", target_domain = "young_faces", pretrained_model = "network-snapshot-008040.pkl", resol... | /master_code.R | no_license | haachicanoy/data_augmentation-sgan-tl | R | false | false | 7,871 | r | # Master code generative modeling thesis
# By: Harold Achicanoy
# Universidad del Valle
options(warn = -1, scipen = 999)
suppressMessages(library(readr))
# Run StyleGAN function
run_stylegan <- function(source_domain = "paintings", target_domain = "young_faces", pretrained_model = "network-snapshot-008040.pkl", resol... |
library(testthat)
library(parsnip)
library(rlang)
library(tibble)
# ------------------------------------------------------------------------------
context("keras linear regression")
source(test_path("helpers.R"))
source(test_path("helper-objects.R"))
hpc <- hpc_data[1:150, c(2:5, 8)]
# ------------------------------... | /tests/testthat/test_linear_reg_keras.R | permissive | mgaldame/parsnip | R | false | false | 2,582 | r | library(testthat)
library(parsnip)
library(rlang)
library(tibble)
# ------------------------------------------------------------------------------
context("keras linear regression")
source(test_path("helpers.R"))
source(test_path("helper-objects.R"))
hpc <- hpc_data[1:150, c(2:5, 8)]
# ------------------------------... |
# Plot 3.r
# Use Data.Table Library for quickly loading data into R.
library(data.table)
library(lubridate)
# Create Column Names for reading in the datatable
columnnames = c("Date", "Time", "Global_active_power",
"Global_reactive_power", "Voltage",
"Global_intensity","Sub_metering_1",... | /plot3.R | no_license | sundalex/Exploratory_Data_Analysis_Project_1 | R | false | false | 1,459 | r | # Plot 3.r
# Use Data.Table Library for quickly loading data into R.
library(data.table)
library(lubridate)
# Create Column Names for reading in the datatable
columnnames = c("Date", "Time", "Global_active_power",
"Global_reactive_power", "Voltage",
"Global_intensity","Sub_metering_1",... |
#'---------------------------------------------------------------------------------------
#'---------------------------------------------------------------------------------------
#' Prep environment.
#'---------------------------------------------------------------------------------------
#'---------------------------... | /Exploring inherited datasets.R | permissive | schrawj/GOBACK | R | false | false | 7,636 | r | #'---------------------------------------------------------------------------------------
#'---------------------------------------------------------------------------------------
#' Prep environment.
#'---------------------------------------------------------------------------------------
#'---------------------------... |
# Course :CS 513 Data Mining
# First Name : Neil
# Last Name : Gupte
# Id : 10445674
# purpose : hw 7 ANN
rm(list=ls())
library(neuralnet)
dataSet<-read.csv("wisc_bc_ContinuousVar.csv",na.strings = '?')
View(dataSet)
table(dataSet$diagnosis)
#To factor the data set
da... | /hw7 ann/hw07_ann.R | no_license | neilgupte75/CS_513_KDD_Stevens_Neil | R | false | false | 918 | r | # Course :CS 513 Data Mining
# First Name : Neil
# Last Name : Gupte
# Id : 10445674
# purpose : hw 7 ANN
rm(list=ls())
library(neuralnet)
dataSet<-read.csv("wisc_bc_ContinuousVar.csv",na.strings = '?')
View(dataSet)
table(dataSet$diagnosis)
#To factor the data set
da... |
if("RMySQL" %in% rownames(installed.packages()) == FALSE)
{install.packages("RMySQL")}
if("psych" %in% rownames(installed.packages()) == FALSE)
{install.packages("psych")}
if("ggplot2" %in% rownames(installed.packages()) == FALSE)
{install.packages("ggplot2")}
library(RMySQL)
#library(psych)
#library... | /kmeans/kmeansPlotGraph_OnCampus.R | no_license | rohitkhadse/crime_data_r | R | false | false | 1,561 | r |
if("RMySQL" %in% rownames(installed.packages()) == FALSE)
{install.packages("RMySQL")}
if("psych" %in% rownames(installed.packages()) == FALSE)
{install.packages("psych")}
if("ggplot2" %in% rownames(installed.packages()) == FALSE)
{install.packages("ggplot2")}
library(RMySQL)
#library(psych)
#library... |
function (data, pi, mu, sd)
{
e <- get("data.env", .GlobalEnv)
e[["loglik_norm_gC"]][[length(e[["loglik_norm_gC"]]) + 1]] <- list(data = data,
pi = pi, mu = mu, sd = sd)
.Call("_mixR_loglik_norm_gC", data, pi, mu, sd)
}
| /valgrind_test_dir/loglik_norm_gC-test.R | no_license | akhikolla/RcppDeepStateTest | R | false | false | 242 | r | function (data, pi, mu, sd)
{
e <- get("data.env", .GlobalEnv)
e[["loglik_norm_gC"]][[length(e[["loglik_norm_gC"]]) + 1]] <- list(data = data,
pi = pi, mu = mu, sd = sd)
.Call("_mixR_loglik_norm_gC", data, pi, mu, sd)
}
|
# main
# directory set up
path1 <- getwd()
path <- paste0(path1, "/")
setwd(path)
lapply(paste0("R/", list.files(path = "R/", recursive = TRUE)), source)
# Debugging and unbugging
debug(GapminderApp)
GapminderApp(path)
undebug(GapminderApp) | /weekR/r-project-the-bridge_2/miscellaneous/main.R | no_license | Jaraiz91/Javier_Araiz_TheBridge | R | false | false | 245 | r | # main
# directory set up
path1 <- getwd()
path <- paste0(path1, "/")
setwd(path)
lapply(paste0("R/", list.files(path = "R/", recursive = TRUE)), source)
# Debugging and unbugging
debug(GapminderApp)
GapminderApp(path)
undebug(GapminderApp) |
# Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... | /mepstrends/hc_use/json/code/r/meanEXP0__event__race__.r | permissive | HHS-AHRQ/MEPS-summary-tables | R | false | false | 3,185 | r | # Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... |
# This uses an estimating equation to estimate the complier stochastic direct effect and its variance, from the following publication
# Kara E. Rudolph, Oleg Sofrygin, and Mark J. van der Laan. "Complier stochastic direct effects: identification and robust estimation." arXiv preprint arXiv:1810.12452 (2018).
# a is the... | /CSDE_ee.R | no_license | kararudolph/SDE-SIE | R | false | false | 5,138 | r | # This uses an estimating equation to estimate the complier stochastic direct effect and its variance, from the following publication
# Kara E. Rudolph, Oleg Sofrygin, and Mark J. van der Laan. "Complier stochastic direct effects: identification and robust estimation." arXiv preprint arXiv:1810.12452 (2018).
# a is the... |
### R code from vignette source 'geepack-manual.Rnw'
### Encoding: UTF-8
###################################################
### code chunk number 1: geepack-manual.Rnw:16-19
###################################################
require( geepack )
prettyVersion <- packageDescription("geepack")$Version
prettyDate <- form... | /library/geepack/doc/geepack-manual.R | permissive | mayousif/Turbidity-Cleaner | R | false | false | 3,291 | r | ### R code from vignette source 'geepack-manual.Rnw'
### Encoding: UTF-8
###################################################
### code chunk number 1: geepack-manual.Rnw:16-19
###################################################
require( geepack )
prettyVersion <- packageDescription("geepack")$Version
prettyDate <- form... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.