diff --git a/StudentData/v1_Data_Introduction.md b/StudentData/v1_Data_Introduction.md index 1923fcc..fcb2b29 100644 --- a/StudentData/v1_Data_Introduction.md +++ b/StudentData/v1_Data_Introduction.md @@ -19,6 +19,9 @@ There is both meta data and feature data included in LIBS, since their are no ot Main change made to the LIBS data set is that the elemental compounds originally had "o" (lowercase letter o) to represent "Oxygen" has been changed to "O" (uppercase letter O). +## Libs Earth References +Same exact columns as the normal LIBS data frame, but only the "scct" targets. That is, only the earth references. Note that none of these earth references are in the normal LIBS data frame. + # Sample data Sample data is the data for the, currently 16, samples. There are four data frames for this. diff --git a/StudentData/v1_consistent_data_naming.Rmd b/StudentData/v1_consistent_data_naming.Rmd index f44d749..0a31599 100644 --- a/StudentData/v1_consistent_data_naming.Rmd +++ b/StudentData/v1_consistent_data_naming.Rmd @@ -53,11 +53,13 @@ colnames(pixl.df) <- c("Lat","Lon","Sol","Sample", "Na2O","MgO","Al2O3","SiO2","P2O5","SO3","Cl","K2O","CaO","TiO2","Cr2O3","MnO","FeOT", "Name","Type","Campaign","Location","Abrasion") # Renaming LIBS -libs.df <- cbind(libs.df,libs_type.df$"type",libs_type.df$"earthsample?") +libs.df <- cbind(libs.df,libs_type.df$"type") colnames(libs.df) <- c("Sol","Lat","Lon","Target","Point", "SiO2","SiO2_stdev","TiO2","TiO2_stdev","Al2O3","Al2O3-stdev","FeOT","FeOT_stdev","MgO","MgO_stdev","CaO","CaO_stdev","Na2O","Na2O_stdev","K2O","K2O_stdev", "Total","distance_mm","Tot.Em.", - "Type","Earth_Sample") + "Type") +libs_type.df <- libs_type.df$"earthsample?" + # Renaming Lithology colnames(lithology.df) <- c("Sample","Name","SampleType","Campaign","Abrasion", "Feldspar","Plagioclase","Pyroxene","Olivine","Quartz", @@ -103,11 +105,11 @@ pixl.df <- pixl.df[,c("Sample", "P2O5","SO3","Cl","Cr2O3","MnO" #These ones don't show up in LIBS )] # Resorting LIBS columns -libs.df <- libs.df[,c("Target","Point","Sol","Lat","Lon","Type","Earth_Sample", +libs.df <- libs.df[,c("Target","Point","Sol","Lat","Lon","Type", "SiO2","SiO2_stdev","TiO2","TiO2_stdev","Al2O3","Al2O3-stdev","FeOT","FeOT_stdev","MgO","MgO_stdev","CaO","CaO_stdev","Na2O","Na2O_stdev","K2O","K2O_stdev", "Total","distance_mm","Tot.Em.")] # Resorting Lithology columns -lithology.df <- lithology.df[,c("Sample", +lithology.df <- lithology.df[1:16,c("Sample", "Plagioclase","Sulfate","Ca-sulfate","Hydrated Ca-sulfate", "Mg-sulfate","Hydrated Sulfates","Hydrated Mg-Fe sulfate","Perchlorates", "Na-perchlorate","Amorphous Silicate","Phosphate","Pyroxene", @@ -135,8 +137,8 @@ pixl_libs.df <- pixl_libs.df[,c("Target.libs","Point.libs","Sol.libs","Lat.libs" ``` -Check types and fix them (ex Sample, Sol, Lat, Lon -> numeric, Name -> character, Abrasion, Campaign, Type, SampleType -> Factor) # Fixing data types +Check types and fix them (ex Sample, Sol, Lat, Lon -> numeric, Name -> character, Abrasion, Campaign, Type, SampleType -> Factor) ```{r} # Pixl ## Already good! @@ -144,6 +146,7 @@ Check types and fix them (ex Sample, Sol, Lat, Lon -> numeric, Name -> character # Libs libs.df$Point <- as.factor(libs.df$Point) # Was originally "character" +libs_type.df <- as.logical(libs_type.df) # Was originally "numeric" # Lithology lithology.df[,2:36] <- lapply(lithology.df[,2:36],as.factor) # Was originally "character" @@ -169,11 +172,21 @@ sample_meta.df$SampleType <- as.factor(sample_meta.df$SampleType) ``` +# Seperating Libs +Separating out earth reference Libs from normal Libs +```{r} +# Creating a data frame with only the Scct Libs data +libs_earth_references.df <- libs.df[libs_type.df,] + +# Removing the Scct Libs data from Libs.df +libs.df <- libs.df[!libs_type.df,] +``` # Saving New data frames ```{r} saveRDS(sample_meta.df, "v1_sample_meta.Rds") saveRDS(libs.df, "v1_libs.Rds") +saveRDS(libs_earth_references.df, "v1_libs_earth_references.Rds") saveRDS(lithology.df, "v1_lithology.Rds") saveRDS(sherloc.df, "v1_sherloc.Rds") saveRDS(pixl.df, "v1_pixl.Rds") diff --git a/StudentData/v1_libs.Rds b/StudentData/v1_libs.Rds index 1cdf67e..017d288 100644 Binary files a/StudentData/v1_libs.Rds and b/StudentData/v1_libs.Rds differ diff --git a/StudentData/v1_libs_earth_references.Rds b/StudentData/v1_libs_earth_references.Rds new file mode 100644 index 0000000..aef5c43 Binary files /dev/null and b/StudentData/v1_libs_earth_references.Rds differ diff --git a/StudentData/v1_lithology.Rds b/StudentData/v1_lithology.Rds index 04f1928..276174e 100644 Binary files a/StudentData/v1_lithology.Rds and b/StudentData/v1_lithology.Rds differ