content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/events_guildmemberupdate.r
\name{events.guild_member_update}
\alias{events.guild_member_update}
\title{Event, emits whenever a member updates it's state}
\usage{
events.guild_member_update(data, client)
}
\arguments{
\item{data}{The event fie... | /man/events.guild_member_update.Rd | no_license | TheOnlyArtz/Pirate | R | false | true | 915 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/events_guildmemberupdate.r
\name{events.guild_member_update}
\alias{events.guild_member_update}
\title{Event, emits whenever a member updates it's state}
\usage{
events.guild_member_update(data, client)
}
\arguments{
\item{data}{The event fie... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linkage-methods.R
\docType{methods}
\name{lva.internal}
\alias{lva.internal}
\alias{lva.internal,array-method}
\title{lva.internal}
\usage{
lva.internal(x, ...)
\S4method{lva.internal}{array}(
x,
grp,
element = 3,
type = "lm",
subj... | /man/lva.internal.Rd | no_license | pappewaio/AllelicImbalance | R | false | true | 2,266 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linkage-methods.R
\docType{methods}
\name{lva.internal}
\alias{lva.internal}
\alias{lva.internal,array-method}
\title{lva.internal}
\usage{
lva.internal(x, ...)
\S4method{lva.internal}{array}(
x,
grp,
element = 3,
type = "lm",
subj... |
#upload the data file into R
car <- read.csv("CarPrice_Assignment.csv", stringsAsFactors = F, header = T)
library(dplyr)
library(stringr)
library(MASS)
library(car)
#check the na values in the file
na_values <- car %>% summarise_all(funs(sum(is.na(.)/n())))
View(na_values)
#No na values
#To add the Car compan... | /car_price_lm.R | no_license | raghavan-ds/linear-regression-R | R | false | false | 25,948 | r | #upload the data file into R
car <- read.csv("CarPrice_Assignment.csv", stringsAsFactors = F, header = T)
library(dplyr)
library(stringr)
library(MASS)
library(car)
#check the na values in the file
na_values <- car %>% summarise_all(funs(sum(is.na(.)/n())))
View(na_values)
#No na values
#To add the Car compan... |
library(tidyverse)
library(modelr)
library(ggplot2)
library(lme4)
df <- read.csv("../Sawyer_Research_Data_Analysis/MetaData_exc.csv", stringsAsFactors = FALSE)
names(df)
glimpse(df)
# Separate the sex
MaleT<- grep("^M", df$Sex)
FemaleT<- grep("^F", df$Sex)
# Remove Controls and blanks from group
df <- subset(df, Se... | /Memory.R | no_license | jzushi/RBFCCF | R | false | false | 1,398 | r | library(tidyverse)
library(modelr)
library(ggplot2)
library(lme4)
df <- read.csv("../Sawyer_Research_Data_Analysis/MetaData_exc.csv", stringsAsFactors = FALSE)
names(df)
glimpse(df)
# Separate the sex
MaleT<- grep("^M", df$Sex)
FemaleT<- grep("^F", df$Sex)
# Remove Controls and blanks from group
df <- subset(df, Se... |
##This code is used to process the meteorological data and climate analysis for the tree-ring stable oxygen isotope extreme values
## The aims are:
### 1. Process the meteorological data and climate response.
### 2. Detect the signal of the tree-ring stable oxygen isotope extreme
### 3. Climate reconst... | /2020-02 updated code for extreme stable oxygen data.R | no_license | GuobaoXu/Tree-ring-max-and-min-oxygen | R | false | false | 64,994 | r | ##This code is used to process the meteorological data and climate analysis for the tree-ring stable oxygen isotope extreme values
## The aims are:
### 1. Process the meteorological data and climate response.
### 2. Detect the signal of the tree-ring stable oxygen isotope extreme
### 3. Climate reconst... |
#' Aggregate Predictions
#'
#' Aggregate predicitons results by averaging (for \code{regr}, and \code{classif} with prob) or mode ( \code{classif} with response).
#' (works for regr, classif, multiclass)
#'
#' @param pred.list [list of \code{Predictions}]\cr
#' @export
aggregatePredictions = function(pred.list, sp... | /R/aggregatePredictions.R | no_license | philippstats/mlr | R | false | false | 4,320 | r | #' Aggregate Predictions
#'
#' Aggregate predicitons results by averaging (for \code{regr}, and \code{classif} with prob) or mode ( \code{classif} with response).
#' (works for regr, classif, multiclass)
#'
#' @param pred.list [list of \code{Predictions}]\cr
#' @export
aggregatePredictions = function(pred.list, sp... |
testlist <- list(kern = c(0.00753173901853728, 0, 0, 0, 0), val = c(9.34349497625167e-275, 5.91668024075023e-257, -2.75802740282252e-28, -8.6077086674033e-26, -8.63673874871544e-26, -3.41266294396796e+38, 7.66727900074612e-180, 4.79805310736869e-23, -7.45992038897424e-239, 1.02719694514458e+281, -1.30631276493468e+... | /lowpassFilter/inst/testfiles/convolve/AFL_convolve/convolve_valgrind_files/1616007487-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 620 | r | testlist <- list(kern = c(0.00753173901853728, 0, 0, 0, 0), val = c(9.34349497625167e-275, 5.91668024075023e-257, -2.75802740282252e-28, -8.6077086674033e-26, -8.63673874871544e-26, -3.41266294396796e+38, 7.66727900074612e-180, 4.79805310736869e-23, -7.45992038897424e-239, 1.02719694514458e+281, -1.30631276493468e+... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/VarID_functions.R
\name{maxNoisyGenes}
\alias{maxNoisyGenes}
\title{Function for extracting genes maximal variability}
\usage{
maxNoisyGenes(noise, cl = NULL, set = NULL)
}
\arguments{
\item{noise}{List object with the background noise model ... | /RaceID/man/maxNoisyGenes.Rd | no_license | akhikolla/InformationHouse | R | false | true | 1,271 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/VarID_functions.R
\name{maxNoisyGenes}
\alias{maxNoisyGenes}
\title{Function for extracting genes maximal variability}
\usage{
maxNoisyGenes(noise, cl = NULL, set = NULL)
}
\arguments{
\item{noise}{List object with the background noise model ... |
SKAT_2Kernel_Ortho_Optimal_Get_Params_each_r_FixedRho1 <-
function(z1.1, z2.1, rho2){
c1<-matrix(rep(0,4* length(rho2)), ncol=length(rho2))
A1<-t(z1.1) %*% z1.1
B1<-t(z2.1) %*% z2.1
A2<-A1 %*% A1
B2<-B1 %*% B1
A11<-t(z1.1) %*% z2.1
A22<-A11 %*% t(A11)
B22<-t(A11) %*% A11
B333<-t(A11) %*% A1 %*% A11
... | /TransMetaRare/R/SKAT_2Kernel_Ortho_Optimal_Get_Params_each_r_FixedRho1.R | no_license | shijingc/TransMetaRare | R | false | false | 894 | r | SKAT_2Kernel_Ortho_Optimal_Get_Params_each_r_FixedRho1 <-
function(z1.1, z2.1, rho2){
c1<-matrix(rep(0,4* length(rho2)), ncol=length(rho2))
A1<-t(z1.1) %*% z1.1
B1<-t(z2.1) %*% z2.1
A2<-A1 %*% A1
B2<-B1 %*% B1
A11<-t(z1.1) %*% z2.1
A22<-A11 %*% t(A11)
B22<-t(A11) %*% A11
B333<-t(A11) %*% A1 %*% A11
... |
% Generated by roxygen2 (4.0.0): do not edit by hand
\name{stat_fivenumber}
\alias{stat_fivenumber}
\title{Calculate components of a five-number summary}
\usage{
stat_fivenumber(mapping = NULL, data = NULL, geom = "boxplot",
position = "dodge", na.rm = FALSE, ...)
}
\arguments{
\item{na.rm}{If \code{FALSE} (the defau... | /man/stat_fivenumber.Rd | no_license | daroczig/ggthemes | R | false | false | 1,726 | rd | % Generated by roxygen2 (4.0.0): do not edit by hand
\name{stat_fivenumber}
\alias{stat_fivenumber}
\title{Calculate components of a five-number summary}
\usage{
stat_fivenumber(mapping = NULL, data = NULL, geom = "boxplot",
position = "dodge", na.rm = FALSE, ...)
}
\arguments{
\item{na.rm}{If \code{FALSE} (the defau... |
context("Comprehensive Test for Disparate Impact Remover Algorithm")
test_that("running dataset test", {
dd <- aif360::aif_dataset(
data_path = system.file("extdata", "data.csv", package="aif360"),
favor_label=0,
unfavor_label=1,
unprivileged_protected_attribute=0,
privileged_protected_attribute... | /aif360/aif360-r/tests/testthat/test-disparate-impact-remover.R | permissive | SumaiyaSaima05/AIF360 | R | false | false | 860 | r | context("Comprehensive Test for Disparate Impact Remover Algorithm")
test_that("running dataset test", {
dd <- aif360::aif_dataset(
data_path = system.file("extdata", "data.csv", package="aif360"),
favor_label=0,
unfavor_label=1,
unprivileged_protected_attribute=0,
privileged_protected_attribute... |
########
#Coded by Cristina Robinson
#Last Modified 5-1-2019
########
#SET UP!!!
rm(list = objects())
#setwd()##set your directory here
dir <- getwd()
source("Source_OCEvolution.R")#Libraries and scripts
#load trees and data (this takes a while)
ConsensusTree <- LoadPrettyTree("HacketTrees.nex") #note that the variab... | /Final Code CMR/things you need to run/OCEvolution.R | no_license | NeuroBio/2018-OCEvolution | R | false | false | 17,198 | r | ########
#Coded by Cristina Robinson
#Last Modified 5-1-2019
########
#SET UP!!!
rm(list = objects())
#setwd()##set your directory here
dir <- getwd()
source("Source_OCEvolution.R")#Libraries and scripts
#load trees and data (this takes a while)
ConsensusTree <- LoadPrettyTree("HacketTrees.nex") #note that the variab... |
#Read and observe data
accident <- read.csv("~/Documents/IDV/technology/final project/clean data/accident_data/accident.csv", header=TRUE)
vehicle <- read.csv("~/Documents/IDV/technology/final project/clean data/accident_data/vehicle.csv", header=TRUE)
accident <- data.frame(accident)
vehicle <- data.frame(vehicle)
... | /fars_cleanup.R | no_license | jotasolano/fars_cleanup | R | false | false | 1,766 | r | #Read and observe data
accident <- read.csv("~/Documents/IDV/technology/final project/clean data/accident_data/accident.csv", header=TRUE)
vehicle <- read.csv("~/Documents/IDV/technology/final project/clean data/accident_data/vehicle.csv", header=TRUE)
accident <- data.frame(accident)
vehicle <- data.frame(vehicle)
... |
#Grid Template sourced from https://github.com/Appsilon/shiny.semantic-hackathon-2020/tree/master/polluter-alert
grid_template <- grid_template(
default = list(
areas = rbind(
c("title", "map"),
c("summary", "map"),
c("user", "map")
),
cols_width = c("400px", "1fr"),
rows_height = c... | /ui.R | no_license | Jamesohare1/marineApp | R | false | false | 1,108 | r | #Grid Template sourced from https://github.com/Appsilon/shiny.semantic-hackathon-2020/tree/master/polluter-alert
grid_template <- grid_template(
default = list(
areas = rbind(
c("title", "map"),
c("summary", "map"),
c("user", "map")
),
cols_width = c("400px", "1fr"),
rows_height = c... |
#Use libraries
library(shiny)
library(plotly)
#Begin Shiny UI
shinyUI(
#Navbar Page
navbarPage(
#App Title
title = 'Iris Species Data Visualization',
#App theme
theme = "styles.css",
#Scatterplot Tabpanel
tabPanel('Scatterplot',
sidebarLayout(
... | /ui.R | no_license | rhazvita/Shiny-Web-App | R | false | false | 3,393 | r | #Use libraries
library(shiny)
library(plotly)
#Begin Shiny UI
shinyUI(
#Navbar Page
navbarPage(
#App Title
title = 'Iris Species Data Visualization',
#App theme
theme = "styles.css",
#Scatterplot Tabpanel
tabPanel('Scatterplot',
sidebarLayout(
... |
library(devtools)
library(ggmap)
library(xlsx)
# 파일 불러오기
dep_data <- read.csv("../Data/collectData/N_20200421_서울시 현대백화점.csv")
dep_data
# 주소 추출
dep_code <- as.character(dep_data$지번)
dep_code
# 구글 API활용 좌표 출력
googleAPIkey <- "AIzaSyDxB5P_GoIqF7KUzM4cRh9KUZbEYjbVfX4"
register_google(googleAPIkey)
dep_code <- geocode(d... | /Data_Preprocessing_R/Y_20200421_department_hyundai.R | no_license | h0n9670/ApartmentPrice | R | false | false | 496 | r | library(devtools)
library(ggmap)
library(xlsx)
# 파일 불러오기
dep_data <- read.csv("../Data/collectData/N_20200421_서울시 현대백화점.csv")
dep_data
# 주소 추출
dep_code <- as.character(dep_data$지번)
dep_code
# 구글 API활용 좌표 출력
googleAPIkey <- "AIzaSyDxB5P_GoIqF7KUzM4cRh9KUZbEYjbVfX4"
register_google(googleAPIkey)
dep_code <- geocode(d... |
nothern.teams <-c(86, 74, 69, 59, 59, 45, 39)
southern.teams <-c(67, 66, 65, 62, 61, 55, 45, 44, 43, 41, 28, 26, 23)
wilcox.test(nothern.teams, southern.teams)
## Question 4
setwd("C:/Users/qwert/Downloads")
# import the data
rut2000_data <- read.csv(file.choose())
# transform columns
rut2000_data$Date <- as.Date(... | /financemetheds.R | no_license | TheAlchemistNerd/R-Programming | R | false | false | 2,086 | r | nothern.teams <-c(86, 74, 69, 59, 59, 45, 39)
southern.teams <-c(67, 66, 65, 62, 61, 55, 45, 44, 43, 41, 28, 26, 23)
wilcox.test(nothern.teams, southern.teams)
## Question 4
setwd("C:/Users/qwert/Downloads")
# import the data
rut2000_data <- read.csv(file.choose())
# transform columns
rut2000_data$Date <- as.Date(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/deriv.R
\name{derivicefiles}
\alias{derivicefiles}
\title{Load metadata and location of files of derived sea ice data products.}
\usage{
derivicefiles(product = "time_since_melt", ...)
}
\arguments{
\item{product}{which derived product}
\ite... | /man/derivicefiles.Rd | no_license | AustralianAntarcticDivision/raadtools | R | false | true | 573 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/deriv.R
\name{derivicefiles}
\alias{derivicefiles}
\title{Load metadata and location of files of derived sea ice data products.}
\usage{
derivicefiles(product = "time_since_melt", ...)
}
\arguments{
\item{product}{which derived product}
\ite... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse... | /cachematrix.R | no_license | paolobroglio/ProgrammingAssignment2 | R | false | false | 785 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse... |
#' Generate the panel organization UI
#'
#' Generates the user interface to control the organization of the panels, specifically their sizes.
#'
#' @param active_panels A data.frame specifying the currently active panels, see the output of \code{\link{.setup_initial}}.
#'
#' @return
#' A HTML tag object containing the ... | /R/dynamicUI.R | permissive | sorjuela/iSEE | R | false | false | 64,326 | r | #' Generate the panel organization UI
#'
#' Generates the user interface to control the organization of the panels, specifically their sizes.
#'
#' @param active_panels A data.frame specifying the currently active panels, see the output of \code{\link{.setup_initial}}.
#'
#' @return
#' A HTML tag object containing the ... |
####################################################
# METAPOPULATION MODEL FOR INFECTION DYNAMICS
# WITH ANNUAL BIRTH PULSES
# DENSITY-DEPENDENT DEATH RATE
# AND MATERNAL TRANSFER OF ANTIBODIES
# -------------------------------------------
# ANALYSIS OF RESULTS FROM SIMULATION SERIES 3
##########... | /MSIR/Outputs/DDD MSIR Series 3 stoch Analysis.R | no_license | orestif/metapopulation | R | false | false | 5,041 | r | ####################################################
# METAPOPULATION MODEL FOR INFECTION DYNAMICS
# WITH ANNUAL BIRTH PULSES
# DENSITY-DEPENDENT DEATH RATE
# AND MATERNAL TRANSFER OF ANTIBODIES
# -------------------------------------------
# ANALYSIS OF RESULTS FROM SIMULATION SERIES 3
##########... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/imagebuilder_operations.R
\name{imagebuilder_list_workflow_step_executions}
\alias{imagebuilder_list_workflow_step_executions}
\title{Shows runtime data for each step in a runtime instance of the workflow
that you specify in the request}
\usa... | /cran/paws.compute/man/imagebuilder_list_workflow_step_executions.Rd | permissive | paws-r/paws | R | false | true | 1,034 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/imagebuilder_operations.R
\name{imagebuilder_list_workflow_step_executions}
\alias{imagebuilder_list_workflow_step_executions}
\title{Shows runtime data for each step in a runtime instance of the workflow
that you specify in the request}
\usa... |
cv.coxsplsDR =
function (data, method = c("efron", "breslow"), nfold = 5, nt = 10, eta = .5, plot.it = TRUE,
se = TRUE, givefold, scaleX = TRUE, scaleY = FALSE, folddetails = FALSE, allCVcrit=FALSE,
details=FALSE, namedataset="data", save=FALSE, verbose=TRUE,...)
{
try(attachNamespace(... | /plsRcox/R/cv.coxsplsDR.R | no_license | ingted/R-Examples | R | false | false | 20,097 | r | cv.coxsplsDR =
function (data, method = c("efron", "breslow"), nfold = 5, nt = 10, eta = .5, plot.it = TRUE,
se = TRUE, givefold, scaleX = TRUE, scaleY = FALSE, folddetails = FALSE, allCVcrit=FALSE,
details=FALSE, namedataset="data", save=FALSE, verbose=TRUE,...)
{
try(attachNamespace(... |
# Load libraries
library(tidyverse)
library(psych)
# Load Floyd week data
con = DBI::dbConnect(RMariaDB::MariaDB(), dbname = 'household_pulse',
host = '127.0.0.1', user = '', password = '')
pulse_floyd = tbl(con, 'pulse2020_puf_05') %>%
select(SCRAM, gad2_sum, phq2_sum, is_black, is_white,
... | /setup_census.R | no_license | gtsherman/floyd-mental-health | R | false | false | 2,263 | r | # Load libraries
library(tidyverse)
library(psych)
# Load Floyd week data
con = DBI::dbConnect(RMariaDB::MariaDB(), dbname = 'household_pulse',
host = '127.0.0.1', user = '', password = '')
pulse_floyd = tbl(con, 'pulse2020_puf_05') %>%
select(SCRAM, gad2_sum, phq2_sum, is_black, is_white,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acdatabase_dbtest.R
\name{agdb.checkid}
\alias{agdb.checkid}
\title{Check an id}
\usage{
agdb.checkid(id, null_permitted = F)
}
\arguments{
\item{id}{char: A proposed id}
\item{null_permitted}{bool: whether NULL should return T or F}
}
\valu... | /man/agdb.checkid.Rd | permissive | SamT123/acutilsLite | R | false | true | 583 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acdatabase_dbtest.R
\name{agdb.checkid}
\alias{agdb.checkid}
\title{Check an id}
\usage{
agdb.checkid(id, null_permitted = F)
}
\arguments{
\item{id}{char: A proposed id}
\item{null_permitted}{bool: whether NULL should return T or F}
}
\valu... |
# This function gets slope and adj_R from lm
# This might not be usfeul as of 2017-10-05
lm_slope_adj_R <- function(formula){
regresion <- lm( formula )
ss <- summary(regresion)
return(c( coef(regresion)[2] , ss$adj.r.squared))
} | /lm_slope_adj_R.R | no_license | matiasandina/useful_functions | R | false | false | 237 | r | # This function gets slope and adj_R from lm
# This might not be usfeul as of 2017-10-05
lm_slope_adj_R <- function(formula){
regresion <- lm( formula )
ss <- summary(regresion)
return(c( coef(regresion)[2] , ss$adj.r.squared))
} |
## 1. Install packages
install.packages("dplyr")
install.packages("tidyr")
install.packages("tidyverse")
## 2. Load libraries
library(dplyr)
library(tidyr)
library(tidyverse)
## 3. Set Working Directory
setwd("/Users/ussadethlo/Desktop/DSTR/EDA_Project_2/EDA_Project_2")
## 4. Download and Extract file
zip_file <... | /plot3.R | no_license | sdethloff/EDA_Project_2 | R | false | false | 1,179 | r | ## 1. Install packages
install.packages("dplyr")
install.packages("tidyr")
install.packages("tidyverse")
## 2. Load libraries
library(dplyr)
library(tidyr)
library(tidyverse)
## 3. Set Working Directory
setwd("/Users/ussadethlo/Desktop/DSTR/EDA_Project_2/EDA_Project_2")
## 4. Download and Extract file
zip_file <... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{AverageDrawdown}
\alias{AverageDrawdown}
\alias{AverageRecovery}
\title{Calculates the average of the observed drawdowns.}
\usage{
AverageDrawdown(R, ...)
AverageRecovery(R, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries ... | /man/AverageDrawdown.Rd | no_license | ecjbosu/PerformanceAnalytics | R | false | false | 558 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{AverageDrawdown}
\alias{AverageDrawdown}
\alias{AverageRecovery}
\title{Calculates the average of the observed drawdowns.}
\usage{
AverageDrawdown(R, ...)
AverageRecovery(R, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries ... |
##The cacheSolve function can be used to return the inverse of a matrix.
##Efficiency is provided by caching any inverse using the makeCacheMatrix:
## An efficient approach is used in that once the matrix inverse is calculated
## it is cached by the makeCacheMatrix method. Future access to the
## matrix inverse t... | /cachematrix.R | no_license | lhcrsa/ProgrammingAssignment2 | R | false | false | 1,482 | r | ##The cacheSolve function can be used to return the inverse of a matrix.
##Efficiency is provided by caching any inverse using the makeCacheMatrix:
## An efficient approach is used in that once the matrix inverse is calculated
## it is cached by the makeCacheMatrix method. Future access to the
## matrix inverse t... |
power <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(power) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subpower <- subset(power,power$Date=="1/2/2007" | power$Date =="2/2/2007")
subpower$Date... | /plot4.R | no_license | Sahil54/ExData_Plotting1 | R | false | false | 1,460 | r | power <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(power) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subpower <- subset(power,power$Date=="1/2/2007" | power$Date =="2/2/2007")
subpower$Date... |
##########################################
# Zero-inflated Negative Binomial (ZINB) #
##########################################
#####################################
# Install or Load Required Packages #
#####################################
if(! require("pacman")) install.packages("pacman", repos='http://cran.us.r-... | /Library/run_ZINB.R | no_license | biobakery/maaslin2_benchmark | R | false | false | 5,650 | r | ##########################################
# Zero-inflated Negative Binomial (ZINB) #
##########################################
#####################################
# Install or Load Required Packages #
#####################################
if(! require("pacman")) install.packages("pacman", repos='http://cran.us.r-... |
#user can manually enter candidates_idx_array
# choose top 3 models
if ( ! exists("candidates_idx_array", envir=.GlobalEnv) ) {
candidates_idx_array <- chosen_min_test_err_idx[order( v_auc[chosen_min_test_err_idx], decreasing=TRUE ) ]
}
for (chosen_index in candidates_idx_array[1:min(length(candidates_idx_array)... | /kaggle_rapleaf_hackerdojo/naive_bayes/res_pred_and_save.r | no_license | sonalranjan/analytics_machine_learning | R | false | false | 2,061 | r |
#user can manually enter candidates_idx_array
# choose top 3 models
if ( ! exists("candidates_idx_array", envir=.GlobalEnv) ) {
candidates_idx_array <- chosen_min_test_err_idx[order( v_auc[chosen_min_test_err_idx], decreasing=TRUE ) ]
}
for (chosen_index in candidates_idx_array[1:min(length(candidates_idx_array)... |
# check if data is whitened or of class "coords"
whitenCheck <- function(x, verbose = FALSE) {
whitened <- FALSE
# 1) check whether 'coords' class
# and if so, if it is actually whitened
if(class(x) == "coords") {
xw <- x
z <- x$y
zCov <- c... | /R/clusterICA_util.R | no_license | pws3141/clusterICA | R | false | false | 14,315 | r | # check if data is whitened or of class "coords"
whitenCheck <- function(x, verbose = FALSE) {
whitened <- FALSE
# 1) check whether 'coords' class
# and if so, if it is actually whitened
if(class(x) == "coords") {
xw <- x
z <- x$y
zCov <- c... |
dir.create("~/psm/models", recursive = T)
dir.create("~/psm/psm_combined")
dotR <- file.path(Sys.getenv("HOME"), ".R")
if (!file.exists(dotR)) dir.create(dotR)
M <- file.path(dotR, "Makevars")
if (!file.exists(M)) file.create(M)
cat("\nCXX14FLAGS=-O3 -march=native -mtune=native -fPIC",
"CXX14=g++", # or clang++ bu... | /scripts/psm_cluster/psm_matched_run_do.R | no_license | emoriebeck/big-five-prediction | R | false | false | 7,155 | r | dir.create("~/psm/models", recursive = T)
dir.create("~/psm/psm_combined")
dotR <- file.path(Sys.getenv("HOME"), ".R")
if (!file.exists(dotR)) dir.create(dotR)
M <- file.path(dotR, "Makevars")
if (!file.exists(M)) file.create(M)
cat("\nCXX14FLAGS=-O3 -march=native -mtune=native -fPIC",
"CXX14=g++", # or clang++ bu... |
## Enter names of counts and interviews data files (either SAS or CSV files)
CNTS_FILE <- "ashcnts.sas7bdat"
INTS_FILE <- "ashints.sas7bdat"
## Enter creel location must be "ash","byf","cpw","lsb","rdc","sax","sup", "wsh"
LOCATION <- "ash"
## Enter start and end dates (must be two digits mon/day and four-digit year)
ST... | /zzzOgleOnly/zzzOld/LS_OPEN_2014_BEFORE ACCESS/data/ash_2014_info.R | no_license | droglenc/WiDNR_Creel | R | false | false | 522 | r | ## Enter names of counts and interviews data files (either SAS or CSV files)
CNTS_FILE <- "ashcnts.sas7bdat"
INTS_FILE <- "ashints.sas7bdat"
## Enter creel location must be "ash","byf","cpw","lsb","rdc","sax","sup", "wsh"
LOCATION <- "ash"
## Enter start and end dates (must be two digits mon/day and four-digit year)
ST... |
testlist <- list(A = structure(c(2.32784507357645e-308, 9.53818016386547e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_ro... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613108187-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 344 | r | testlist <- list(A = structure(c(2.32784507357645e-308, 9.53818016386547e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_ro... |
grid::grid.newpage()
grid::pushViewport(grid::viewport(
height = unit(0.8, "npc"),
layout = grid::grid.layout(nrow = 3, ncol = 1,
heights = unit.c(unit(0.2, "npc"),
unit(2.5, "lines"),
... | /tests/splash.R | no_license | iNZightVIT/dev | R | false | false | 782 | r | grid::grid.newpage()
grid::pushViewport(grid::viewport(
height = unit(0.8, "npc"),
layout = grid::grid.layout(nrow = 3, ncol = 1,
heights = unit.c(unit(0.2, "npc"),
unit(2.5, "lines"),
... |
# Exploratory Data Analysis - Assignment 2
#3.Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad) variable,
#which of these four sources have seen decreases in emissions from 1999-2008 for Baltimore City?
#Which have seen increases in emissions from 1999-2008?
#Use the ggplot2 plott... | /Plot3.R | no_license | azpmerrill/ExData_Project2 | R | false | false | 983 | r | # Exploratory Data Analysis - Assignment 2
#3.Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad) variable,
#which of these four sources have seen decreases in emissions from 1999-2008 for Baltimore City?
#Which have seen increases in emissions from 1999-2008?
#Use the ggplot2 plott... |
#' @importFrom tidyr pivot_wider
#' @importFrom tidyr separate
#' @importFrom dplyr select
#' @importFrom tibble tibble
#' @import SummarizedExperiment
#' @importFrom magrittr %>%
## Returns tidy data to SE or DF
.tidyReturn <- function(tidyData, compVars, sampleVars, metaData = NULL, toSE) {
## Return data to... | /R/return.R | no_license | tuh8888/MSPrep | R | false | false | 3,302 | r | #' @importFrom tidyr pivot_wider
#' @importFrom tidyr separate
#' @importFrom dplyr select
#' @importFrom tibble tibble
#' @import SummarizedExperiment
#' @importFrom magrittr %>%
## Returns tidy data to SE or DF
.tidyReturn <- function(tidyData, compVars, sampleVars, metaData = NULL, toSE) {
## Return data to... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{Ctry.info}
\alias{Ctry.info}
\title{Ctry.info}
\usage{
Ctry.info(x, y)
}
\arguments{
\item{x}{= a vector of country codes}
\item{y}{= a column in the classif-ctry file}
}
\description{
handles the addition and removal of countri... | /man/Ctry.info.Rd | no_license | Turnado-dx/EPFR | R | false | true | 623 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{Ctry.info}
\alias{Ctry.info}
\title{Ctry.info}
\usage{
Ctry.info(x, y)
}
\arguments{
\item{x}{= a vector of country codes}
\item{y}{= a column in the classif-ctry file}
}
\description{
handles the addition and removal of countri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/debug.R
\name{debug_seedHash}
\alias{debug_seedHash}
\title{Seed hash of the block}
\usage{
debug_seedHash(number)
}
\arguments{
\item{number}{Integer - Number of the block.}
}
\value{
Data - Seed hash of the block by number.
}
... | /man/debug_seedHash.Rd | no_license | cran/gethr | R | false | true | 1,438 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/debug.R
\name{debug_seedHash}
\alias{debug_seedHash}
\title{Seed hash of the block}
\usage{
debug_seedHash(number)
}
\arguments{
\item{number}{Integer - Number of the block.}
}
\value{
Data - Seed hash of the block by number.
}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vapour_input_geometry.R
\name{vapour_read_geometry}
\alias{vapour_read_geometry}
\alias{vapour_read_geometry_text}
\alias{vapour_read_extent}
\alias{vapour_read_type}
\title{Read GDAL feature geometry}
\usage{
vapour_read_geometry(
dsource,... | /man/vapour_read_geometry.Rd | no_license | jsta/vapour | R | false | true | 3,802 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vapour_input_geometry.R
\name{vapour_read_geometry}
\alias{vapour_read_geometry}
\alias{vapour_read_geometry_text}
\alias{vapour_read_extent}
\alias{vapour_read_type}
\title{Read GDAL feature geometry}
\usage{
vapour_read_geometry(
dsource,... |
## Put comments here that give an overall description of what your
## functions do
## The overall objective is to compute the inverse of a matrix and
## store ot locally to save computation time if it needs to be accessed repeatedly
##Assumption in this case is the matrix is always invertible
## Concept is there are ... | /cachematrix.R | no_license | harshithbiotech/ProgrammingAssignment2 | R | false | false | 1,254 | r | ## Put comments here that give an overall description of what your
## functions do
## The overall objective is to compute the inverse of a matrix and
## store ot locally to save computation time if it needs to be accessed repeatedly
##Assumption in this case is the matrix is always invertible
## Concept is there are ... |
ui <- fixedPage(theme = shinythemes::shinytheme("lumen"), # paper lumen cosmo
tags$head(includeCSS(paste0("./www/styles.css"))),
div(headerPanel(app_title), style = 'width:1560px;'),
div(tabsetPanel(
# ================ #
tabPanel("Welcome!", fluid = TRUE,
mainPanel(class = "welcome",
fluidRow(tag... | /regeneration_additional_timepoints/app_ui.R | no_license | diazdc/shiny-apps-main | R | false | false | 19,081 | r | ui <- fixedPage(theme = shinythemes::shinytheme("lumen"), # paper lumen cosmo
tags$head(includeCSS(paste0("./www/styles.css"))),
div(headerPanel(app_title), style = 'width:1560px;'),
div(tabsetPanel(
# ================ #
tabPanel("Welcome!", fluid = TRUE,
mainPanel(class = "welcome",
fluidRow(tag... |
# location clustering
# libraries ---------------------------------------------------------------
library(readr) # For reading in data
library(dplyr) # for data manipulation
# Read in Data ------------------------------------------------------------
your_data_file_path <- "IAA/Fall 3/clustering/data/"
calendar... | /clustering/HW1/location_clustering.R | no_license | sopheeli/F3-Blueteam12 | R | false | false | 1,611 | r | # location clustering
# libraries ---------------------------------------------------------------
library(readr) # For reading in data
library(dplyr) # for data manipulation
# Read in Data ------------------------------------------------------------
your_data_file_path <- "IAA/Fall 3/clustering/data/"
calendar... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render_dependency_matrix.R
\name{render_dependency_matrix}
\alias{render_dependency_matrix}
\title{Renders a dependency matrix as dependency graph}
\usage{
render_dependency_matrix(
dependencies,
rankdir = "LR",
layout = "dot",... | /man/render_dependency_matrix.Rd | no_license | cran/heuristicsmineR | R | false | true | 872 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render_dependency_matrix.R
\name{render_dependency_matrix}
\alias{render_dependency_matrix}
\title{Renders a dependency matrix as dependency graph}
\usage{
render_dependency_matrix(
dependencies,
rankdir = "LR",
layout = "dot",... |
\name{party-methods}
\alias{party-methods}
\alias{length.party}
\alias{print.party}
\alias{print.simpleparty}
\alias{print.constparty}
\alias{[.party}
\alias{[[.party}
\alias{depth.party}
\alias{width.party}
\alias{getCall.party}
\alias{nodeprune}
\alias{nodeprune.party}
\title{ Methods for Party Objects }
\description... | /man/party-methods.Rd | no_license | cran/partykit | R | false | false | 3,883 | rd | \name{party-methods}
\alias{party-methods}
\alias{length.party}
\alias{print.party}
\alias{print.simpleparty}
\alias{print.constparty}
\alias{[.party}
\alias{[[.party}
\alias{depth.party}
\alias{width.party}
\alias{getCall.party}
\alias{nodeprune}
\alias{nodeprune.party}
\title{ Methods for Party Objects }
\description... |
#########################
## SNU Global Data Center
## 2019 March
## Sooahn Shin
#########################
rm(list=ls())
library(tidyverse)
library(tidytext)
library(SnowballC)
library(udpipe)
library(lattice)
library(wesanderson)
library(ggraph)
library(igraph)
## user specific working directory setup
if(Sys.getenv... | /Analysis/4. keyplayer.R | no_license | JuwonOh/GlobalDataCenter | R | false | false | 3,362 | r | #########################
## SNU Global Data Center
## 2019 March
## Sooahn Shin
#########################
rm(list=ls())
library(tidyverse)
library(tidytext)
library(SnowballC)
library(udpipe)
library(lattice)
library(wesanderson)
library(ggraph)
library(igraph)
## user specific working directory setup
if(Sys.getenv... |
# sanger_AKRvDBA_missense_genes function
#
# written by Brian Ritchey
#
#
sanger_AKRvDBA_missense_genes <-
function(chr, pos1, pos2){
require(rvest)
require(rentrez)
pos1 <- pos1 * 10^6
pos2 <- pos2 * 10^6
query_1 <- "https://www.sanger.ac.uk/sanger/Mouse_SnpViewer/rel-1211?gene=&context=0&loc="
... | /sanger_AKRvDBA_missense_genes.R | no_license | BrianRitchey/qtl | R | false | false | 1,409 | r | # sanger_AKRvDBA_missense_genes function
#
# written by Brian Ritchey
#
#
sanger_AKRvDBA_missense_genes <-
function(chr, pos1, pos2){
require(rvest)
require(rentrez)
pos1 <- pos1 * 10^6
pos2 <- pos2 * 10^6
query_1 <- "https://www.sanger.ac.uk/sanger/Mouse_SnpViewer/rel-1211?gene=&context=0&loc="
... |
# Predict orthoptera based on satellite observations
# Thomas Nauss
if(Sys.info()["sysname"] == "Windows"){
source("D:/orthoptera/orthoptera_prediction/src/00_set_environment.R")
} else {
source("/media/tnauss/myWork/analysis/orthoptera/orthoptera_prediction/src/00_set_environment.R")
}
compute <- TRUE
# Analyse... | /src/05_gls_analysis.R | permissive | environmentalinformatics-marburg/orthoptera_prediction | R | false | false | 1,778 | r | # Predict orthoptera based on satellite observations
# Thomas Nauss
if(Sys.info()["sysname"] == "Windows"){
source("D:/orthoptera/orthoptera_prediction/src/00_set_environment.R")
} else {
source("/media/tnauss/myWork/analysis/orthoptera/orthoptera_prediction/src/00_set_environment.R")
}
compute <- TRUE
# Analyse... |
#' @title Function to make a violin plot.
#'
#' @description
#' \code{plot.violins} creates a violin plot from a list of numerical vectors.
#'
#' @param dat.list A list of numerical vectors. Each list item will be associated with its own violin, representing its distribution.
#' @param x A character or numerical ... | /Ch. 2-3/Ch. 3/Results/Functions/plot.violins2.r | no_license | anasanz/MyScripts | R | false | false | 4,869 | r | #' @title Function to make a violin plot.
#'
#' @description
#' \code{plot.violins} creates a violin plot from a list of numerical vectors.
#'
#' @param dat.list A list of numerical vectors. Each list item will be associated with its own violin, representing its distribution.
#' @param x A character or numerical ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/boot.fcor.R
\name{boot.fcor}
\alias{boot.fcor}
\title{Fisher-transformed Pearson's correlation: Bootstrap-based Heterogeneity Test for Between-study Heterogeneity in Random- or Mixed- Effects Model}
\usage{
boot.fcor(
n,
z,
lambda = 0,
... | /man/boot.fcor.Rd | no_license | cran/boot.heterogeneity | R | false | true | 3,445 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/boot.fcor.R
\name{boot.fcor}
\alias{boot.fcor}
\title{Fisher-transformed Pearson's correlation: Bootstrap-based Heterogeneity Test for Between-study Heterogeneity in Random- or Mixed- Effects Model}
\usage{
boot.fcor(
n,
z,
lambda = 0,
... |
require(graphics)
mosaicplot(Titanic, main = "Survival on the Titanic")
apply(Titanic, c(3,4),sum)
apply(Titanic, c(2,4),sum)
str(Titanic)
df <- as.data.frame(Titanic)
head(df)
titanic.raw <- NULL
for(i in 1:4){titanic.raw <- cbind(titanic.raw, rep(as.character(df[,i]), df$Freq))}
titanic.raw <- as.data.frame(titani... | /lab9/lab9.r | no_license | schnapple/csci2961-master | R | false | false | 884 | r | require(graphics)
mosaicplot(Titanic, main = "Survival on the Titanic")
apply(Titanic, c(3,4),sum)
apply(Titanic, c(2,4),sum)
str(Titanic)
df <- as.data.frame(Titanic)
head(df)
titanic.raw <- NULL
for(i in 1:4){titanic.raw <- cbind(titanic.raw, rep(as.character(df[,i]), df$Freq))}
titanic.raw <- as.data.frame(titani... |
##Plot 4 - the quadruple plot.
##Reading dataset
powerr <- read.csv('/home/sara/Work/Courses/Coursera/Data_Science_Specialization/Course4/Week1/Course_project/data/household_power_consumption.txt', header = TRUE, sep = ";")
##Extracting the desired date range.
powerr2 = subset(powerr, powerr$Date == "1/2/2007" | powe... | /plot4.R | no_license | lightks/ProgrammingAssignment1_course4 | R | false | false | 1,818 | r | ##Plot 4 - the quadruple plot.
##Reading dataset
powerr <- read.csv('/home/sara/Work/Courses/Coursera/Data_Science_Specialization/Course4/Week1/Course_project/data/household_power_consumption.txt', header = TRUE, sep = ";")
##Extracting the desired date range.
powerr2 = subset(powerr, powerr$Date == "1/2/2007" | powe... |
# Measurements of electric power consumption in one household
# with a one-minute sampling rate over a period of almost 4 years.
# Different electrical quantities and some sub-metering values are available.
# This data set has 2,075,259 rows and 9 columns
# The memory usage of this data set is 224131200 Bytes
# Read... | /plot1.R | no_license | pachidam/ExData_Plotting1 | R | false | false | 1,487 | r | # Measurements of electric power consumption in one household
# with a one-minute sampling rate over a period of almost 4 years.
# Different electrical quantities and some sub-metering values are available.
# This data set has 2,075,259 rows and 9 columns
# The memory usage of this data set is 224131200 Bytes
# Read... |
> Resp_Prod <- c(
+ 45,43,41,42,
+ 44,44,45,43,
+ 40,44,45,46,
+ 44,45,46,45
+ )
> Trt_Operadores <- rep( c("Operador1", "Operador2", "Operador3", "Operador4"), each = 4)
> Blq_Tecnica <- rep(c("Tecnica1", "Tecnica2", "Tecnica3", "Tecnica4"), times = 4)
> Datos<- data.frame(Resp_Prod, Trt_Operad... | /Tarea3_AOVRB/source/consoleRebeca3.r | no_license | CarlosRDGZ/Metodos_Estadisticos_2018 | R | false | false | 2,714 | r | > Resp_Prod <- c(
+ 45,43,41,42,
+ 44,44,45,43,
+ 40,44,45,46,
+ 44,45,46,45
+ )
> Trt_Operadores <- rep( c("Operador1", "Operador2", "Operador3", "Operador4"), each = 4)
> Blq_Tecnica <- rep(c("Tecnica1", "Tecnica2", "Tecnica3", "Tecnica4"), times = 4)
> Datos<- data.frame(Resp_Prod, Trt_Operad... |
#' Spark Data Types
#'
#' These function support supplying a spark read schema. This is particularly useful
#' when reading data with nested arrays when you are not interested in several of
#' the nested fields.
#'
#' @param sc A \code{spark_connection}
#' @param struct_fields A vector or fields obtained from \code{... | /R/data_types.R | permissive | kashenfelter/sparklyr.nested | R | false | false | 4,038 | r | #' Spark Data Types
#'
#' These function support supplying a spark read schema. This is particularly useful
#' when reading data with nested arrays when you are not interested in several of
#' the nested fields.
#'
#' @param sc A \code{spark_connection}
#' @param struct_fields A vector or fields obtained from \code{... |
## `````````````````````````````````````````````
#### Read Me ####
## `````````````````````````````````````````````
# From the following line in csv
# starttime start_station_id tripduration
# 1 8/1/2016 00:01:22 302 288
# The start_time field is populated as "8"
# 8 302 288
# This file is... | /2.Code/reduce data v 2.R | no_license | patternproject/r.nycBikeData2 | R | false | false | 2,356 | r | ## `````````````````````````````````````````````
#### Read Me ####
## `````````````````````````````````````````````
# From the following line in csv
# starttime start_station_id tripduration
# 1 8/1/2016 00:01:22 302 288
# The start_time field is populated as "8"
# 8 302 288
# This file is... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/zzz.R
\name{get_base_url}
\alias{get_base_url}
\title{get AlphaVantage base url}
\usage{
get_base_url()
}
\description{
get AlphaVantage base url
}
| /man/get_base_url.Rd | no_license | schardtbc/avR | R | false | true | 226 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/zzz.R
\name{get_base_url}
\alias{get_base_url}
\title{get AlphaVantage base url}
\usage{
get_base_url()
}
\description{
get AlphaVantage base url
}
|
# TODO: Automatic compilation of documents
#
# Author: Miguel Alvarez
################################################################################
library(knitr)
setwd("M:/WorkspaceEclipse/Guides")
## taxlist_firststeps ----------------------------------------------------------
## library(taxlist)
##... | /src/Compile.R | no_license | kamapu/Guides | R | false | false | 592 | r | # TODO: Automatic compilation of documents
#
# Author: Miguel Alvarez
################################################################################
library(knitr)
setwd("M:/WorkspaceEclipse/Guides")
## taxlist_firststeps ----------------------------------------------------------
## library(taxlist)
##... |
#
# This is a template for creating a leaflet chroropleth map shiny application.
# This app uses mock data that resembles survey answers to several major & minor categories
# This app is based on rstudio's 'superzip' example authored by Joe Cheng.
#
# Author: Jasper Ginn
#
library(leaflet)
library(RColorBrewer)
libra... | /server.R | no_license | JasperHG90/shiny-choropleth-map-example | R | false | false | 4,501 | r |
#
# This is a template for creating a leaflet chroropleth map shiny application.
# This app uses mock data that resembles survey answers to several major & minor categories
# This app is based on rstudio's 'superzip' example authored by Joe Cheng.
#
# Author: Jasper Ginn
#
library(leaflet)
library(RColorBrewer)
libra... |
## These functions create a matrix object given dimensions by the user
## For the given object cacheSolve calculates the inverse of the object
## and caches the result for reference. Operators on the object include
## "get," "set," "getinverse" and "setinverse"
## takes provided matrix and creates an object with fun... | /cachematrix.R | no_license | kpeterse/ProgrammingAssignment2 | R | false | false | 1,116 | r | ## These functions create a matrix object given dimensions by the user
## For the given object cacheSolve calculates the inverse of the object
## and caches the result for reference. Operators on the object include
## "get," "set," "getinverse" and "setinverse"
## takes provided matrix and creates an object with fun... |
## preparations ####
LID.1548 = read.table("/Users/xhu/Documents/1548-links.txt")[,2]
library(solr);library(pracma);library(permute);library(data.table);library(caret);library(dummies);library(BBmisc)
url = 'http://localhost:8987/solr/LSH/afts'
# searching with LID, 15 of them cannot be found. The rest are all cases.... | /features/entity_selection.R | no_license | Ginny15/pulearning | R | false | false | 4,950 | r | ## preparations ####
LID.1548 = read.table("/Users/xhu/Documents/1548-links.txt")[,2]
library(solr);library(pracma);library(permute);library(data.table);library(caret);library(dummies);library(BBmisc)
url = 'http://localhost:8987/solr/LSH/afts'
# searching with LID, 15 of them cannot be found. The rest are all cases.... |
remove(list = ls())
#
# library(alluvial)
# library(ggalluvial)
# # library(vaersvax)
# data(vaccinations)
# levels(vaccinations$response) <- rev(levels(vaccinations$response))
# ggplot(vaccinations,
# aes(x = survey, stratum = response, alluvium = subject,
# y = freq,
# fill = response,... | /_Sankey_Network/sankeyNetwork_v0.R | permissive | Yingjie4Science/R_code_cheatsheet | R | false | false | 4,195 | r |
remove(list = ls())
#
# library(alluvial)
# library(ggalluvial)
# # library(vaersvax)
# data(vaccinations)
# levels(vaccinations$response) <- rev(levels(vaccinations$response))
# ggplot(vaccinations,
# aes(x = survey, stratum = response, alluvium = subject,
# y = freq,
# fill = response,... |
sink("Variants_counts_EUR_cyp.txt")
print('CYP')
data <- read.table('EUR_anc.frq', header=TRUE, row.names=NULL)
freq = c(0.01, 0.05, 0.25)
for(f in freq){
MIF <- data[,6]
MIF <- subset(MIF, MIF >0) #remove 0
hist<- hist(MIF, plot =FALSE, breaks= c(0,f,1))
#colnames
colnames <- c()
for(x in 1:(length(hist$break... | /results/2017.05.30/SFS_SAMESIZE/get_histcounts_EUR.R | no_license | arsthilaire/PGX_DENOVO | R | false | false | 971 | r | sink("Variants_counts_EUR_cyp.txt")
print('CYP')
data <- read.table('EUR_anc.frq', header=TRUE, row.names=NULL)
freq = c(0.01, 0.05, 0.25)
for(f in freq){
MIF <- data[,6]
MIF <- subset(MIF, MIF >0) #remove 0
hist<- hist(MIF, plot =FALSE, breaks= c(0,f,1))
#colnames
colnames <- c()
for(x in 1:(length(hist$break... |
# OpenSilex API
#
# No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
#
# OpenAPI spec version: 1.0.0-rc+2
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' DataCSVValidationDTO Class
#'
#' @field errors
#' @field dataErrors
#' @field sizeMa... | /R/DataCSVValidationDTO.r | no_license | OpenSILEX/opensilexClientToolsR | R | false | false | 6,114 | r | # OpenSilex API
#
# No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
#
# OpenAPI spec version: 1.0.0-rc+2
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' DataCSVValidationDTO Class
#'
#' @field errors
#' @field dataErrors
#' @field sizeMa... |
context("fetchKSSL() -- requires internet connection")
## sample data
x <- fetchKSSL(series='sierra')
x.morph <- fetchKSSL(series='sierra', returnMorphologicData = TRUE)
test_that("fetchKSSL() returns an SPC or list", {
# standard request
expect_match(class(x), 'SoilProfileCollection')
# SPC + morphologi... | /tests/testthat/test-fetchKSSL.R | no_license | ewanoleghe/soilDB | R | false | false | 1,165 | r | context("fetchKSSL() -- requires internet connection")
## sample data
x <- fetchKSSL(series='sierra')
x.morph <- fetchKSSL(series='sierra', returnMorphologicData = TRUE)
test_that("fetchKSSL() returns an SPC or list", {
# standard request
expect_match(class(x), 'SoilProfileCollection')
# SPC + morphologi... |
context("mesh-sanity")
library(raster)
library(sf)
library(silicate)
library(dplyr)
v <- raster(diag(3))
p <- st_as_sf(rasterToPolygons(v, dissolve = TRUE))
tp <- st_cast(sfdct::ct_triangulate(p), warn = FALSE)
nverts <- 16
test_that("vertex de-duplication is sane", {
expect_equal(sc_coord(p) %>% distinct() %>% nro... | /tests/testthat/test-mesh-sanity.R | no_license | cuulee/anglr | R | false | false | 1,293 | r | context("mesh-sanity")
library(raster)
library(sf)
library(silicate)
library(dplyr)
v <- raster(diag(3))
p <- st_as_sf(rasterToPolygons(v, dissolve = TRUE))
tp <- st_cast(sfdct::ct_triangulate(p), warn = FALSE)
nverts <- 16
test_that("vertex de-duplication is sane", {
expect_equal(sc_coord(p) %>% distinct() %>% nro... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EAP.R
\name{EAP}
\alias{EAP}
\title{Calculating Expected a Posteriori Value for Theta}
\usage{
EAP(raschObj, lower = -6, upper = 6)
}
\value{
A numeric representing the likelihood theta is correct
\item{Top/Bottom}{expected a posteriori valu... | /easyRasch/man/EAP.Rd | no_license | emilyg95/Midterm | R | false | true | 826 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EAP.R
\name{EAP}
\alias{EAP}
\title{Calculating Expected a Posteriori Value for Theta}
\usage{
EAP(raschObj, lower = -6, upper = 6)
}
\value{
A numeric representing the likelihood theta is correct
\item{Top/Bottom}{expected a posteriori valu... |
# Copyright 2015 Province of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | /tests/testthat/test-utils.R | permissive | bcgov/wqbc | R | false | false | 2,539 | r | # Copyright 2015 Province of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
# data preparation for baby mental life study 2
library(tidyverse)
# data prep ----
# load in de-identified raw data
d0 <- read.csv("../data/deidentified/baby_mental_life_s2_data.csv") %>% select(-X)
# make question key
s2_question_key <- d0[1,] %>%
t() %>%
data.frame() %>%
rownames_to_column("question_qualtr... | /code/data_prep_s2.R | no_license | kgweisman/baby_mental_life_ms | R | false | false | 11,786 | r | # data preparation for baby mental life study 2
library(tidyverse)
# data prep ----
# load in de-identified raw data
d0 <- read.csv("../data/deidentified/baby_mental_life_s2_data.csv") %>% select(-X)
# make question key
s2_question_key <- d0[1,] %>%
t() %>%
data.frame() %>%
rownames_to_column("question_qualtr... |
#' Get Owens Lake areas polygons from database
pull_onlake_polygons <- function(){
query <- paste0("SELECT dca.dust_control_area_id AS objectid, dca.dca_name, ",
"dca.bacm_type, dca.phase, ",
"ST_X(ST_TRANSFORM((ST_DUMPPOINTS(dca.geom)).geom, 26911)) AS x, ",
... | /R/gis_functions.R | no_license | jwbannister/aiRsci | R | false | false | 7,712 | r | #' Get Owens Lake areas polygons from database
pull_onlake_polygons <- function(){
query <- paste0("SELECT dca.dust_control_area_id AS objectid, dca.dca_name, ",
"dca.bacm_type, dca.phase, ",
"ST_X(ST_TRANSFORM((ST_DUMPPOINTS(dca.geom)).geom, 26911)) AS x, ",
... |
## Logo home page
### om_skeleton home.R
### Tom Weishaar - Oct 2017 - v0.1
### Skeleton for multi-page, multi-user web site in Shiny, with user authentication
rv$trigger = 0
output$pageStub <- renderUI({
x = rv$limn
if(page_debug_on) {
cat(paste0("Rendering ", webpage$name, " v.", rv$limn, "\n"))
}
if(s... | /Logo_page.R | permissive | Gresliebear/Vessel_Webapp | R | false | false | 724 | r | ## Logo home page
### om_skeleton home.R
### Tom Weishaar - Oct 2017 - v0.1
### Skeleton for multi-page, multi-user web site in Shiny, with user authentication
rv$trigger = 0
output$pageStub <- renderUI({
x = rv$limn
if(page_debug_on) {
cat(paste0("Rendering ", webpage$name, " v.", rv$limn, "\n"))
}
if(s... |
\name{getWS}
\alias{getWS}
\title{Walk Score API Call}
\description{A function to perform the basic Walk Score API call.}
\usage{getWS(x, y, key)}
\arguments{
\item{x}{ longitude of query location (numeric) }
\item{y}{ latitude of query location (numeric) }
\item{key}{ your Walk Score API key (string... | /man/getWS.Rd | no_license | ajinkyaghorpade/walkscoreAPI | R | false | false | 1,720 | rd | \name{getWS}
\alias{getWS}
\title{Walk Score API Call}
\description{A function to perform the basic Walk Score API call.}
\usage{getWS(x, y, key)}
\arguments{
\item{x}{ longitude of query location (numeric) }
\item{y}{ latitude of query location (numeric) }
\item{key}{ your Walk Score API key (string... |
library(shiny)
shinyUI(pageWithSidebar(
headerPanel("The application is really simple: just enter a numeric value to get its square and cube"),
sidebarPanel(
numericInput('id1', 'Your numeric input', 0, min = 0, max = 10, step = 1)
),
mainPanel(
h3('The square of what you entered!'),
verbat... | /ui.R | no_license | motazel/ExData_Plotting1 | R | false | false | 431 | r | library(shiny)
shinyUI(pageWithSidebar(
headerPanel("The application is really simple: just enter a numeric value to get its square and cube"),
sidebarPanel(
numericInput('id1', 'Your numeric input', 0, min = 0, max = 10, step = 1)
),
mainPanel(
h3('The square of what you entered!'),
verbat... |
library(saws)
### Name: clogistCalc
### Title: Conditional Logistic Regression fit
### Aliases: clogistCalc clogistInfo clogistLoglike
### Keywords: nonlinear
### ** Examples
data(micefat)
cout<-clogistCalc(micefat$N,micefat$NTUM,micefat[,c("fatCal","totalCal")],micefat$cluster)
## usual model based variance
saws(... | /data/genthat_extracted_code/saws/examples/clogistCalc.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 445 | r | library(saws)
### Name: clogistCalc
### Title: Conditional Logistic Regression fit
### Aliases: clogistCalc clogistInfo clogistLoglike
### Keywords: nonlinear
### ** Examples
data(micefat)
cout<-clogistCalc(micefat$N,micefat$NTUM,micefat[,c("fatCal","totalCal")],micefat$cluster)
## usual model based variance
saws(... |
# Compression attempt for large sankey file.
library(data.table)
library(ngram)
library(tm)
library(stylo)
chars <- strsplit(rawToChar(as.raw(1:255)),"")[[1]]
chars2 <- strsplit(rawToChar(as.raw(c(33:126,128:255))),"")[[1]]
length(chars)
length(chars2)
dat <- readLines("ProviderNetworkFull.html")
d... | /Tools/TextFileCompression.R | no_license | chacemcneil/Personal | R | false | false | 5,220 | r | # Compression attempt for large sankey file.
library(data.table)
library(ngram)
library(tm)
library(stylo)
chars <- strsplit(rawToChar(as.raw(1:255)),"")[[1]]
chars2 <- strsplit(rawToChar(as.raw(c(33:126,128:255))),"")[[1]]
length(chars)
length(chars2)
dat <- readLines("ProviderNetworkFull.html")
d... |
#' Balance Scale Dataset.
#'
#' This data set was generated to model psychological experimental results. Each
#' example is classified as having the balance scale tip to the right, tip to the left,
#' or be balanced. The attributes are the left weight, the left distance, the right
#' weight, and the right distance. The... | /R/balance.R | no_license | cran/hhcartr | R | false | false | 996 | r | #' Balance Scale Dataset.
#'
#' This data set was generated to model psychological experimental results. Each
#' example is classified as having the balance scale tip to the right, tip to the left,
#' or be balanced. The attributes are the left weight, the left distance, the right
#' weight, and the right distance. The... |
require("RColorBrewer")
require("gplots")
source("Colour_Scheme.R")
source("/nfs/users/nfs_t/ta6/NetworkInferencePipeline/Dropouts/DE_vs_bulk/Other_FS_functions.R")
source("/nfs/users/nfs_t/ta6/NetworkInferencePipeline/Dropouts/Results_Git/Consistent_Setup.R")
getFeatures <- function(counts, norm, fdr=0.01, name="Te... | /FS_Times.R | no_license | tallulandrews/Figures | R | false | false | 8,229 | r | require("RColorBrewer")
require("gplots")
source("Colour_Scheme.R")
source("/nfs/users/nfs_t/ta6/NetworkInferencePipeline/Dropouts/DE_vs_bulk/Other_FS_functions.R")
source("/nfs/users/nfs_t/ta6/NetworkInferencePipeline/Dropouts/Results_Git/Consistent_Setup.R")
getFeatures <- function(counts, norm, fdr=0.01, name="Te... |
vcov.gpcm <-
function (object, robust = FALSE, ...) {
if (!inherits(object, "gpcm"))
stop("Use only with 'gpcm' objects.\n")
inv.Hessian <- if (robust) {
inv.H <- ginv(object$hessian)
outer.score <- scoregpcmSNW(object)
inv.H %*% outer.score %*% inv.H
} else
g... | /R/vcov.gpcm.R | no_license | gscriver/ltm | R | false | false | 762 | r | vcov.gpcm <-
function (object, robust = FALSE, ...) {
if (!inherits(object, "gpcm"))
stop("Use only with 'gpcm' objects.\n")
inv.Hessian <- if (robust) {
inv.H <- ginv(object$hessian)
outer.score <- scoregpcmSNW(object)
inv.H %*% outer.score %*% inv.H
} else
g... |
#! /usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
if (length(args)!=7) {
stop("At least seven arguments must be supplied", call.=FALSE)
}
#usage Rscript merge3_methbin_plot.R dir1 samp1 dir2 samp2 dir3 samp3 savedir
dir1=args[1]
samp1=args[2]
dir2=args[3]
samp2=args[4]
dir3=args[5]
samp3=args[6]
saved... | /merge3_methbin_plot.R | no_license | rachelGoldfeder/cfDNA | R | false | false | 4,058 | r | #! /usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
if (length(args)!=7) {
stop("At least seven arguments must be supplied", call.=FALSE)
}
#usage Rscript merge3_methbin_plot.R dir1 samp1 dir2 samp2 dir3 samp3 savedir
dir1=args[1]
samp1=args[2]
dir2=args[3]
samp2=args[4]
dir3=args[5]
samp3=args[6]
saved... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/advancedArg.R
\name{advancedArg}
\alias{advancedArg}
\title{List advanced arguments}
\usage{
advancedArg(fun, package = "derfinder", browse = interactive())
}
\arguments{
\item{fun}{The name of a function(s) that has advanced arguments in
\co... | /man/advancedArg.Rd | no_license | cyang-2014/derfinder | R | false | true | 1,275 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/advancedArg.R
\name{advancedArg}
\alias{advancedArg}
\title{List advanced arguments}
\usage{
advancedArg(fun, package = "derfinder", browse = interactive())
}
\arguments{
\item{fun}{The name of a function(s) that has advanced arguments in
\co... |
no_duplicados = unique(data_frame_inicio)
not_in_planilla = no_duplicados[!(no_duplicados$email %in% c(contactados$Email,respuestas$Email,reunion_hecha$Email)),]
not_in_deal = not_in_planilla[!(not_in_planilla$company %in% datos_deals$`Associated Company`),]
no_duplicados_final = not_in_deal
| /LIMPIADOR DE DATOS/eliminador_duplicados.R | no_license | rquintana-abstracta/data_cleaner2 | R | false | false | 295 | r | no_duplicados = unique(data_frame_inicio)
not_in_planilla = no_duplicados[!(no_duplicados$email %in% c(contactados$Email,respuestas$Email,reunion_hecha$Email)),]
not_in_deal = not_in_planilla[!(not_in_planilla$company %in% datos_deals$`Associated Company`),]
no_duplicados_final = not_in_deal
|
#### Import database
setwd("~/SELECT ERASMUS MUNDUS/ENERBYTE- Thesis&internship/THESIS - Enerbyte/Chapter 2. Case study Data analysis/R for Tesi/test_01_tesi")
rubi <- read.csv("~/SELECT ERASMUS MUNDUS/ENERBYTE- Thesis&internship/THESIS - Enerbyte/Chapter 2. Case study Data analysis/R for Tesi/test_01_tesi/data_id... | /R scripts/script_44.2_kmeans_wd_k7fmacqueenclus.R | no_license | josepotal/master-thesis--clustering-energy-profiles | R | false | false | 9,992 | r |
#### Import database
setwd("~/SELECT ERASMUS MUNDUS/ENERBYTE- Thesis&internship/THESIS - Enerbyte/Chapter 2. Case study Data analysis/R for Tesi/test_01_tesi")
rubi <- read.csv("~/SELECT ERASMUS MUNDUS/ENERBYTE- Thesis&internship/THESIS - Enerbyte/Chapter 2. Case study Data analysis/R for Tesi/test_01_tesi/data_id... |
test.simple1 <- function() {
sourceMatrix <- matrix(1:4, nrow=2, ncol=2)
expected <- solve(sourceMatrix)
cm <- makeCacheMatrix(sourceMatrix)
checkEquals(sourceMatrix, cm$get())
checkEquals(expected, cacheSolve(cm))
}
test.inverseNotCalculated <- function() {
cm <- makeCacheMatrix(matrix(1:4, nr... | /runit.cachematrix.R | no_license | malaffoon/ProgrammingAssignment2 | R | false | false | 1,282 | r | test.simple1 <- function() {
sourceMatrix <- matrix(1:4, nrow=2, ncol=2)
expected <- solve(sourceMatrix)
cm <- makeCacheMatrix(sourceMatrix)
checkEquals(sourceMatrix, cm$get())
checkEquals(expected, cacheSolve(cm))
}
test.inverseNotCalculated <- function() {
cm <- makeCacheMatrix(matrix(1:4, nr... |
#Importing from ggsheet
#install.packages('gsheet')
library(gsheet)
regr1 = "https://docs.google.com/spreadsheets/d/1QogGSuEab5SZyZIw1Q8h-0yrBNs1Z_eEBJG7oRESW5k/edit#gid=107865534"
logr1 = "https://docs.google.com/spreadsheets/d/1QogGSuEab5SZyZIw1Q8h-0yrBNs1Z_eEBJG7oRESW5k/edit#gid=560796239"
df1 = as.data.frame(gsh... | /05-dataIE/20a-importgg.R | no_license | DUanalytics/rAnalytics | R | false | false | 698 | r | #Importing from ggsheet
#install.packages('gsheet')
library(gsheet)
regr1 = "https://docs.google.com/spreadsheets/d/1QogGSuEab5SZyZIw1Q8h-0yrBNs1Z_eEBJG7oRESW5k/edit#gid=107865534"
logr1 = "https://docs.google.com/spreadsheets/d/1QogGSuEab5SZyZIw1Q8h-0yrBNs1Z_eEBJG7oRESW5k/edit#gid=560796239"
df1 = as.data.frame(gsh... |
plink.simulate <- function(n.SNPs=NULL,
labels=paste0("SNP", 1:length(n.SNPs)),
lower.bound=0.01,
upper.bound=1,
OR.het=1, ## Note: over hom alt
OR.hom=1, ## Note: over hom alt
... | /Rplink/R/plink.simulate.R | no_license | unfated/cross-population-PRS | R | false | false | 5,341 | r | plink.simulate <- function(n.SNPs=NULL,
labels=paste0("SNP", 1:length(n.SNPs)),
lower.bound=0.01,
upper.bound=1,
OR.het=1, ## Note: over hom alt
OR.hom=1, ## Note: over hom alt
... |
library(sdef)
### Name: extractFeatures.T
### Title: Extracting the lists of features of interest
### Aliases: extractFeatures.T
### ** Examples
data = simulation(n=500,GammaA=1,GammaB=1,r1=0.5,r2=0.8,
DEfirst=300,DEsecond=200,DEcommon=100)
Th<- ratio(data=data$Pval)
feat.names = data$names
feat.lists.T <- extractF... | /data/genthat_extracted_code/sdef/examples/extractFeatures.T.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 374 | r | library(sdef)
### Name: extractFeatures.T
### Title: Extracting the lists of features of interest
### Aliases: extractFeatures.T
### ** Examples
data = simulation(n=500,GammaA=1,GammaB=1,r1=0.5,r2=0.8,
DEfirst=300,DEsecond=200,DEcommon=100)
Th<- ratio(data=data$Pval)
feat.names = data$names
feat.lists.T <- extractF... |
options = commandArgs(trailingOnly = TRUE)
input = options[1]
output = options[2]
data = read.table(input, header=T,row.names=1,sep="\t")
summary.results = data.frame(zeros = colSums(data==0),
nonzeros = colSums(data>0),
mean.ab.reads = apply(data,2,func... | /software/step1.3_generate_summary.R | no_license | wyc9559/miQTL_cookbook | R | false | false | 518 | r | options = commandArgs(trailingOnly = TRUE)
input = options[1]
output = options[2]
data = read.table(input, header=T,row.names=1,sep="\t")
summary.results = data.frame(zeros = colSums(data==0),
nonzeros = colSums(data>0),
mean.ab.reads = apply(data,2,func... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/supporter.R
\name{null_or_character}
\alias{null_or_character}
\title{Check value NULL or character}
\usage{
null_or_character(x)
}
\arguments{
\item{x}{a value to be checked for character or NULL}
}
\description{
Check value NULL or characte... | /man/null_or_character.Rd | permissive | cparsania/phyloR | R | false | true | 343 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/supporter.R
\name{null_or_character}
\alias{null_or_character}
\title{Check value NULL or character}
\usage{
null_or_character(x)
}
\arguments{
\item{x}{a value to be checked for character or NULL}
}
\description{
Check value NULL or characte... |
#import data set
data = read.csv('Mall_Customers.csv')
X <- data[4:5]
#using the elbow method
set.seed(6)
wcss = vector()
for(i in 1:10) {
wcss[i] <- sum(kmeans(X,i)$withinss)
}
plot(1:10,wcss,type = 'b',main=paste('elbow graph'),xlab = "no of clusters",
ylab = "wcss")
#kmeans
kmeans = kmeans(X ,5, iter... | /Kmeans/source/kmeansR.R | no_license | naveenanallamotu/MachineLearningWithR | R | false | false | 716 | r | #import data set
data = read.csv('Mall_Customers.csv')
X <- data[4:5]
#using the elbow method
set.seed(6)
wcss = vector()
for(i in 1:10) {
wcss[i] <- sum(kmeans(X,i)$withinss)
}
plot(1:10,wcss,type = 'b',main=paste('elbow graph'),xlab = "no of clusters",
ylab = "wcss")
#kmeans
kmeans = kmeans(X ,5, iter... |
source("SpaceTimeStructureMix.R")
load("human_sample_covariance.Robj")
metadata <- read.table("human_sample_metadata.txt",header=TRUE,stringsAsFactors=FALSE)
sim.data <- list("geo.coords" = cbind(metadata$lon,metadata$lat),
"time.coords" = metadata$time,
"sample.covariance" = sample.cov,
"n.loci" = 87158)
... | /datasets/HumanData/analyses/old/temporal/spatial1/k_3/exe.spatialStructure.R | no_license | gbradburd/spatialStructure | R | false | false | 669 | r | source("SpaceTimeStructureMix.R")
load("human_sample_covariance.Robj")
metadata <- read.table("human_sample_metadata.txt",header=TRUE,stringsAsFactors=FALSE)
sim.data <- list("geo.coords" = cbind(metadata$lon,metadata$lat),
"time.coords" = metadata$time,
"sample.covariance" = sample.cov,
"n.loci" = 87158)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bertini-package.R, R/bertini.R
\docType{package}
\name{bertini}
\alias{bertini}
\alias{package-bertini}
\alias{bertini-package}
\alias{bertini}
\title{Evaluate Bertini Code}
\usage{
bertini(code, dir = tempdir(), quiet = TRUE)
}
\arguments{
\... | /man/bertini.Rd | no_license | Csun1992/bertini | R | false | true | 1,650 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bertini-package.R, R/bertini.R
\docType{package}
\name{bertini}
\alias{bertini}
\alias{package-bertini}
\alias{bertini-package}
\alias{bertini}
\title{Evaluate Bertini Code}
\usage{
bertini(code, dir = tempdir(), quiet = TRUE)
}
\arguments{
\... |
###############################################################################
# Simulates position of birds by individual, season, year, and month.
# Incorporates migratory connectivity, movement within season, and dispersal
# between seasons.
# Does not incorporate births or deaths.
#################################... | /R/simConnectivity.R | no_license | eriqande/MigConnectivity | R | false | false | 14,856 | r | ###############################################################################
# Simulates position of birds by individual, season, year, and month.
# Incorporates migratory connectivity, movement within season, and dispersal
# between seasons.
# Does not incorporate births or deaths.
#################################... |
#create plot data
planet_plot_data <- data.frame(plot_number = 1:20,
planet = c(rep("Kashyyyk", 5),
rep("Forest Moon of Endor", 5),
rep("Dagobah", 5),
rep("Na... | /R/examples/gregory_all_example.R | no_license | cran/gregRy | R | false | false | 2,990 | r | #create plot data
planet_plot_data <- data.frame(plot_number = 1:20,
planet = c(rep("Kashyyyk", 5),
rep("Forest Moon of Endor", 5),
rep("Dagobah", 5),
rep("Na... |
library(mongolite)
library(rtweet)
library(lubridate)
library(tidyverse)
library(lobstr)
rt <- search_tweets(
"마스크", n = 1000, include_rts = FALSE
)
rt %>% head
nrow(rt)
Sys.getenv()
# install.packages("mongolite")
# con$insert(rt)
# con$find()
# con$drop()
mask_tweets = mongo("mask_tweets",
db = "te... | /R/docs/mongodb/mongolite_connect.R | no_license | emflant/sample | R | false | false | 5,593 | r | library(mongolite)
library(rtweet)
library(lubridate)
library(tidyverse)
library(lobstr)
rt <- search_tweets(
"마스크", n = 1000, include_rts = FALSE
)
rt %>% head
nrow(rt)
Sys.getenv()
# install.packages("mongolite")
# con$insert(rt)
# con$find()
# con$drop()
mask_tweets = mongo("mask_tweets",
db = "te... |
bgnbd.pmf.General.fixed <- function (params, t.start, t.end, x) {
max.length = max(length(t.start), length(t.end), length(x))
if (max.length%%length(t.start))
warning("Maximum vector length not a multiple of the length of t.start")
if (max.length%%length(t.end))
warning("Maximum vector len... | /fun.fixed.R | no_license | Helen-R/shop_cluster | R | false | false | 7,106 | r | bgnbd.pmf.General.fixed <- function (params, t.start, t.end, x) {
max.length = max(length(t.start), length(t.end), length(x))
if (max.length%%length(t.start))
warning("Maximum vector length not a multiple of the length of t.start")
if (max.length%%length(t.end))
warning("Maximum vector len... |
#**************************************************************************
# 6. Compare emissions from motor vehicle sources in Baltimore City ####
# with emissions from motor vehicle sources in Los Angeles County, CA
# (fips=="06037"). Which has seen greater changes over time?
#***... | /plot6.R | no_license | connectomania/ExData_Plotting2 | R | false | false | 2,629 | r |
#**************************************************************************
# 6. Compare emissions from motor vehicle sources in Baltimore City ####
# with emissions from motor vehicle sources in Los Angeles County, CA
# (fips=="06037"). Which has seen greater changes over time?
#***... |
##-------------------------------------------
##
## Data Science PCE Interview Question
##
##-------------------------------------------
# Question: Two trains are slowly going towards each
# other at 4mph and 6mph and are 20 miles apart.
#
# There is a fly that can go 8 mph flying between
# each of them.... | /9_NLP/prob_interview_question.R | no_license | siva2k16/DataScience350 | R | false | false | 2,077 | r | ##-------------------------------------------
##
## Data Science PCE Interview Question
##
##-------------------------------------------
# Question: Two trains are slowly going towards each
# other at 4mph and 6mph and are 20 miles apart.
#
# There is a fly that can go 8 mph flying between
# each of them.... |
##' Delaunay triangulation in N dimensions
##'
##' The Delaunay triangulation is a tessellation of the convex hull of
##' the points such that no \eqn{N}-sphere defined by the \eqn{N}-
##' triangles contains any other points from the set.
##'
##' @param p An \eqn{M}-by-\eqn{N} matrix whose rows represent \eqn{M}
##' ... | /fuzzedpackages/geometry/R/delaunayn.R | no_license | akhikolla/testpackages | R | false | false | 6,774 | r | ##' Delaunay triangulation in N dimensions
##'
##' The Delaunay triangulation is a tessellation of the convex hull of
##' the points such that no \eqn{N}-sphere defined by the \eqn{N}-
##' triangles contains any other points from the set.
##'
##' @param p An \eqn{M}-by-\eqn{N} matrix whose rows represent \eqn{M}
##' ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.