The data I am having trouble importing from sqlite are in four columns:
PeakAwy_L
PeakAwy_R
PeakTwd_L
PeakTwd_R
I have the following R code to pull in those columns into R:
data_raw <- query_tbl(table = “isok”) %>%
select(PeakAwy_L,
PeakAwy_R,
PeakTwd_L,
PeakTwd_R)
However when I view the first few rows in R, the data are skewed 1 column down from the column they are supposed to be in. For example, the data that should appear in PeakAwy_L is in PeakAwy_R. This trend continues ultimately excluding the first column of data I want entirely and assigning the data from the next column, (that is not even mentioned in the R code), in sqlite to PeakTwd_R.
Does anyone know why this is happening?
I have ensured that the columns are named the same between R and in the database structure for columns in sqlite.
I have also ensured that the data types for all four columns are the same, NUMERIC, in sqlite.
schillea1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.