I want to analyse prices of private fixed investments in usa. So i downloaded my data's excel and i converted my excel to csv. But i see 1 observation and 67 variables. Normally it must be inverse (67 observations and 1 variable or 2 variables (with date)) Because my excel composed to date and price. Therefore i share my excel's pictures. First picture which i coverted to csv. Second picture is orginal which i downloaded from official website.
Asked
Active
Viewed 54 times
0
-
1You can read Excel files into R direclty using the `readxl` package. `mydata <- read_excel("path/to/my/file.xlsx")` https://readxl.tidyverse.org/ – Phil Jan 22 '22 at 16:24
-
1[See here](https://stackoverflow.com/q/5963269/5325862) on making a reproducible example that is easier for folks to help with. Both data and code should be in text, not images. Your screenshot shows clear syntax errors being flagged for you (`$` with nothing after), which you should take care of first – camille Jan 22 '22 at 17:34
1 Answers
0
In R you can transpose the data frame by:
new_data <- t(base)
with base being the name of your data.frame in R Studio.

cucumber95
- 76
- 7
-
thanks for your comment. you are perfect but when i write your command, everthing is going perfect but column names are being Null and i can't analyze or use command plot... I think that my csv's shape is not true. – Omer Kirac Jan 22 '22 at 15:49