haotu : an open lab notebook

2018/07/12

the difference in hours between times in google sheets

Filed under: Google, Google Docs, Google Drive, Sheets — Tags: , — S @ 07:18

You can watch the video, but just make your times numeric, subtract and multiply by 24. You will need to use the format tab in sheets, below is the formula formatNumeric() is that step.

(formatNumeric(clock out) - formatNumeric(clock in)) * 24

 

 

Advertisements

2018/07/10

Filestream Memory Problem Full

remove all temp files windows+R

then type

explorer

%temp%

temp

prefetch

 

delete them files!

 

https://windowsreport.com/windows-10-temporary-files-wont-delete/

2018/05/24

Store Copy file or folder in multiple places or locations google drive

Filed under: Drive, Google, Google Drive, Uncategorized — Tags: , , , — S @ 08:21

click on object and shift+z

2018/02/26

r remove all objects except

Filed under: R — Tags: — S @ 02:08
rm(list=setdiff(ls(), "x"))

https://stackoverflow.com/questions/6190051/how-can-i-remove-all-objects-but-one-from-the-workspace-in-r

extract numeric number from character string

Filed under: Manipulate Data in R, R — Tags: — S @ 01:29
library(stringr)
str_extract(data, "[[:digit:]]+")

 

https://stackoverflow.com/questions/15451251/extract-numeric-part-of-strings-of-mixed-numbers-and-characters-in-r

replace NA with values from other columns

Filed under: R, R Stats — Tags: , , — S @ 01:27
slf2$Year[is.na(slf2$Year)] <- slf2$Ano[is.na(slf2$Year)]
data <- data.frame('a' = c('A','B','C','D','E'),
 'x' = c(1,2,NA,NA,NA),
 'y' = c(NA,NA,3,NA,NA),
 'z' = c(NA,NA,NA,4,5))

cbind(data[1], mycol = na.omit(unlist(data[-1])))

 

https://stackoverflow.com/questions/14563531/combine-column-to-remove-nas

2018/02/24

set working directory R notebook, markdown

Filed under: R, R Markdown — Tags: , , — S @ 00:08
```{r "setup", include=FALSE}
library(knitr)
opts_knit$set(root.dir = "~/mydir")
```

https://philmikejones.wordpress.com/2015/05/20/set-root-directory-knitr/

2018/02/01

R Markdown Resources

Filed under: R, R Markdown, R Stats — Tags: , , , , — S @ 09:10

cheatsheets here https://www.rstudio.com/resources/cheatsheets/

online tutorial

http://rmarkdown.rstudio.com/lesson-1.html

chapter in r for data science

http://r4ds.had.co.nz/r-markdown.html

 

2018/01/31

save the first (or any) element of a string split

Filed under: errors in R, Manipulate Data in R, R, R, R Stats — Tags: , — S @ 06:58
dirs<-matrix(ncol = 2,data=unlist(strsplit(out$`Full Name`,split=",")),byrow = TRUE)[,1]

2018/01/29

Replace . in string in R

Filed under: errors in R, Manipulate Data in R, R, R, R Stats — Tags: — S @ 07:54
gsub(x = ff,pattern = "[.]",replacement="")
Older Posts »

Blog at WordPress.com.