View cp_all.sh
#!/bin/bash
cp **/*MES.csv All
View removing_triggers_function.R
# define a function
replace_nth_ETG4000 <- function(x, mark) {
x <- x %>% group_by(Mark) %>% mutate(Count = row_number()) %>% data.frame()
double_marks <- which(x$Mark == mark & x$Count %% 2 == 0)
x$Mark[double_marks] <- 0
x <- subset(x, select = -Count)
return(x)
}
# remove second occurrence of Mark 2
View removing_triggers_cleaning.R
# remove all but block borders
borders1 <- which(df$Mark == 1)
borders9 <- which(df$Mark == 9)
borders10 <- which(df$Mark == 10)
df[borders1,] <- 0
df[borders9,] <- 0
df[borders10,] <- 0
# block borders
View removing_triggers_loading.R
# install fnirsr
devtools::install_github("erzk/fnirsr")
library(dplyr)
library(fnirsr)
# file path
p01_path <- "/media/.../p01_fnirs_data_MES_Probe1.csv" # MES file
# load the header
View hitachi2nirs_markings.m
% Reading vector of stimulus markers and arranging this into the format
% required by Homer2 and storing in the variable "aux"
markertimes = [find(vector_onset>0) find(vector_onset<0)];
markers = vector_onset(markertimes);
unique_markers = unique(markers);
aux = zeros(count, length(unique_markers));
for stimuli=1:length(unique_markers)
if offset == 'y' || offset == 'Y' % Version 3
stim_on_off = find(vector_onset==(unique_markers(stimuli))); % Version 3
stim_markers = stim_on_off(1:2:length(stim_on_off)-1); % Version 3
View hitachi2nirs.m
clear all
clc
%% Version 3 update: channels and wavelengths are re-ordered such that they
% are in the order Homer2 software expects.
% User choice to remove marker at end of stimulus as this is not needed in
% Homer. Thanks to Ian Wiggins for your assistance with Version 3 edits.
% Rebecca S Dewey 29th July 2014
%% Revision update: stimulus markers are now read into the "aux" variable
View geofacet_grid_Poland.R
# geofacet - Polska
# Ludność w miastach w % ogółu ludności (dane roczne)
library(dplyr)
library(geofacet)
library(ggplot2)
library(readxl)
# dane z Banku Danych Lokalnych
# https://bdl.stat.gov.pl/BDL/dane/podgrup/tablica
View zooplaR_introduction.R
# install the package
devtools::install_github("erzk/zooplaR")
# load it
library(zooplaR)
# set up the keys
file.edit("~/.Renviron")
zoopla_key <- "YOUR_KEY_GOES_HERE"
zoopla_key <- Sys.getenv("zoopla_key")
View matlab_jupyter_linux.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View fnirs_dygraph.R
devtools::install_github("erzk/fnirsr")
library(dygraphs)
library(fnirsr)
file_path <- system.file("extdata", "Hitachi_ETG4000_24Ch_Total.csv", package = "fnirsr")
ETG_header <- load_ETG4000_header(file_path)
rawData <- load_ETG4000_data(file_path, ETG_header)
# prepare the events