Search code examples
arraysruppercasecapitalize

Make uppercase in array


Use of order Apartment Canada Toronto
38 37 2042 37 Appartment Building Apt 54 357

can you help for making capital letters for the charcaters in my array?


Solution

  • Try this:

    names(ordered_use) <-toupper(names(ordered_use))
    
    > ordered_use
             APARTMENT       APARTMENT BLDG  APARTMENT BUILDING      APARTMENT UNIT APPARTMENT BUILDING 
                     38                  37                2042                  37                  54 
                    APT 
                    357