Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 208929

Changing columns right to left in a tibble

$
0
0

I have a table - read from an excel file, with column names in English and some variables in Hebrew. As I read the excel file and receive a tibble, the column names don't fit the data.

I use the following code to read the table:

excel_file <- file.path(the file path, the file)

tab_1 <- read_xlsx(excel_file)
tab_1

The result that I'm getting:

# A tibble: 2 x 5
  case      a     b     c     d
  <chr> <dbl> <dbl> <dbl> <dbl>
1 שחור      3     2     1     4
2 אדום      2     5     2     3
>

How can I change the order of the column names? I have looked all over and found no solution.


Viewing all articles
Browse latest Browse all 208929

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>