.data2Excel_Mac
////////////////////////////
 
.data2excel_Mac<-function(keyword_or_ID){
"Objective      : keyword or ID
   keyword_or_ID: such as 'c1_', 'c5_', 12, 44
                  Note: assume that the 'clipr' package is installed. 
                  install.packages('clipr')
          
 Example 1>.data2excelMac('c1_') # all images for chapter 1
 
 Example 2>.d3('c1_')            # the same as the above
 
 Example 3>.d3(10)               # getting data to Excel

";.zdata2excel_Mac_(keyword_or_ID)}

////////////////////////////

Find out all the system files
////////////////////////////

>a<-system.file(package="openxlsx")
>a  #  [1] "C:/Users/Paul Yan/AppData/Local/R/win-library/4.3/openxlsx"
>setwd(a)
> dir()
 [1] " DESCRIPTION"  " doc"          " extdata"      " help"        
 [5] " html"         " INDEX"        " libs"         " LICENSE"     
 [9] " MD5"          " Meta"         " NAMESPACE"    " NEWS.md"     
[13] " R"            " WORDLIST"    
> dir("extdata/")
 [1] " ~$loadExample.xlsx"           " build_font_size_lookup.R"      " cloneEmptyWorksheetExample.xlsx"  
 [4] " cloneWorksheetExample.xlsx"   " ColorTabs3.xlsx"               " conditional_formatting_testing.R" 
 [7] " einstein.jpg"                 " groupTest.xlsx"                " inlineStr.xlsx"                   
[10] " load_xlsx_testing.R"          " loadExample.xlsx"              " loadPivotTables.xlsx"             
[13] " loadThreadComment.xlsx"       " namedRegions.xlsx"             " namedRegions2.xlsx"               
[16] " namedRegions3.xlsx"           " read_failure_test.xlsx"        " readTest.xlsx"                    
[19] " stack_style_testing.R"            
> 
> dir("extdata/",pattern="xlsx")  # if Excel files only
 [1] " ~$loadExample.xlsx"           " cloneEmptyWorksheetExample.xlsx" " cloneWorksheetExample.xlsx"      
 [4] " ColorTabs3.xlsx"              " groupTest.xlsx"                  " inlineStr.xlsx"                  
 [7] " load_xlsx_testing.R"          " loadExample.xlsx"                " loadPivotTables.xlsx"            
[10] " loadThreadComment.xlsx"       " namedRegions.xlsx"               " namedRegions2.xlsx"              
[13] " namedRegions3.xlsx"           " read_failure_test.xlsx"          " readTest.xlsx"                   

////////////////////////////