I have two data tables as .dbf files that I want to extract values from by row and populate an empty data frame with the new values using the following equation; (tmax_08 - tmin_08)/2 - 65. This will result in values both positive and negative in which I want to separate those and square each value and take the sum of squares at the end. Below is what I have so far.
Install.packages("foreign")
library(foreign)
tmax_08<- read.dbf("E:/Adam Stuff/Daymet_Daily_UTM/1km table/tmax/tmax_2008_daymet.dbf")
tmin_08 <- read.dbf("E:/Adam Stuff/Daymet_Daily_UTM/1km table/tmin/tmin_2008_daymet.dbf")
my.df <- data.frame(matrix(0, ncol = 366, nrow = 24024))
row <- tmax_08[1,]
row2 <- tmin_08[1,]
I have as you can see been able to extract the first row and all columns from each .dbf table, however automating this would be much better as I have a lot of files this needs to be done for. Thank you in advance for any help provided!