Project

General

Profile

« Previous | Next » 

Revision 6956389d

Added by Benoit Parmentier about 8 years ago

adding quick function to extract from data.frame

View differences:

climate/research/oregon/interpolation/global_product_assessment_part1_functions.R
4 4
#Combining tables and figures for individual runs for years and tiles.
5 5
#AUTHOR: Benoit Parmentier 
6 6
#CREATED ON: 05/24/2016  
7
#MODIFIED ON: 09/04/2016            
7
#MODIFIED ON: 09/06/2016            
8 8
#Version: 1
9 9
#PROJECT: Environmental Layers project     
10 10
#COMMENTS: Initial commit, script based on part NASA biodiversity conference 
......
446 446
  return(plot_obj)
447 447
}
448 448

  
449
extract_from_df <- function(x,col_selected,val_selected){
450
  df_tmp <- read.table(x,stringsAsFactors=F,sep=",")
451
  #data_subset <- subset(data_stations,col_selected==val_selected)
452
  data_subset <- subset(df_tmp,df_tmp$id%in%val_selected)
453
  return(data_subset)
454
}
455

  
449 456
############################ END OF SCRIPT ##################################

Also available in: Unified diff