You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Philipp, Just wondering if you could help me identify how to debug the following error: Error in svd(x, nu = 0, nv = k) : infinite or missing values in 'x'
This is coming from the following:
spectra <- read_opus_univ(vial_paths)
test_table <- spectra %>%
gather_spc() %>%
resample_spc(x_unit = 'wavenumber',
wn_interval=2) %>%
average_spc() %>%
preprocess_spc(select = 'sg_1_w21')
#### Read N ANalysis data ####
Nitrogen_Raw <- readxl::read_xlsx('Nitrogen_analysis.xlsx', skip = 5)[1:108,] %>%
mutate(sample_id = paste('Harvest',H,'Row',Row,'Range',Range, sep = ' ')) %>% # Create a sampleID
select(sample_id, H, Row, Range, `%C`, `%N`) %>% # Move sampleID to the front
mutate(sample_id = as.factor(sample_id)) %>%
rename(N = `%N`,
C = `%C`)
#### Join N analysis dataset with Spectral data ####
spec_chem <- join_spc_chem(spc_tbl = test_table, chem_tbl = Nitrogen_Raw, by = "sample_id")
pls_mod <- fit_pls(
spec_chem = spec_chem[!is.na(spec_chem$N),],
response =
N,
center = T,
scale = T,
print = T
)
I assume this is because there is missing data somewhere, but I don't know how exactly to clean it up. Any ideas would be appreciated!
The text was updated successfully, but these errors were encountered:
Hi Philipp, Just wondering if you could help me identify how to debug the following error:
Error in svd(x, nu = 0, nv = k) : infinite or missing values in 'x'
This is coming from the following:
I assume this is because there is missing data somewhere, but I don't know how exactly to clean it up. Any ideas would be appreciated!
The text was updated successfully, but these errors were encountered: