Exel Datei importieren für Mac

Wie erweitere ich R um eigene Funktionen oder Pakete? Welches Paket ist passend für meine Fragestellung?

Moderatoren: EDi, jogo

jogo
Beiträge: 2086
Registriert: Fr Okt 07, 2016 8:25 am

Re: Exel Datei importieren für Mac

Beitrag von jogo »

Bei mir sieht das so aus:

Code: Alles auswählen

library("readxl")

# setwd("~/Desktop/R.Zeug/Nija")
Daten <- read_excel("ZA6907_v1-0-0.xlsx")

Code: Alles auswählen

> str(Daten)
Classes ‘tbl_df’, ‘tbl’ and 'data.frame':	1025 obs. of  106 variables:
 $ za_nr  : num  6907 6907 6907 6907 6907 ...
 $ version: chr  "1.0.0 (2017-10-11)" "1.0.0 (2017-10-11)" "1.0.0 (2017-10-11)" "1.0.0 (2017-10-11)" ...
 $ doi    : chr  "doi:10.4232/1.12904" "doi:10.4232/1.12904" "doi:10.4232/1.12904" "doi:10.4232/1.12904" ...
 $ PID    : num  1 2 3 4 5 6 7 8 9 10 ...
 $ V0A    : num  1 1 1 1 1 1 1 1 1 1 ...
 $ V0B    : num  4 2 5 6 1 2 3 5 1 3 ...
 $ V1A    : num  34 1 1 34 7 1 1 1 1 1 ...
Gruß, Jörg
Athomas
Beiträge: 769
Registriert: Mo Feb 26, 2018 8:19 pm

Re: Exel Datei importieren für Mac

Beitrag von Athomas »

Folgendes kommt dann: ...
Du hast absolut Recht - ich gucke jetzt mal, woran das liegt :( !
Athomas
Beiträge: 769
Registriert: Mo Feb 26, 2018 8:19 pm

Re: Exel Datei importieren für Mac

Beitrag von Athomas »

Die Datei war (zumindest nach meinem Download) schreibgeschützt.
Wenn ich eine Kopie davon ohne Schreibschutz speichere, kann ich die prima lesen:

Code: Alles auswählen

> library(openxlsx)
> Datei <- read.xlsx("P:/R/R Forum/Excel Mac/Kopie von ZA6907_v1-0-0.xlsx")
> str(Datei)
'data.frame':	1025 obs. of  106 variables:
 $ za_nr  : num  6907 6907 6907 6907 6907 ...
 $ version: chr  "1.0.0 (2017-10-11)" "1.0.0 (2017-10-11)" "1.0.0 (2017-10-11)" "1.0.0 (2017-10-11)" ...
 $ doi    : chr  "doi:10.4232/1.12904" "doi:10.4232/1.12904" "doi:10.4232/1.12904" "doi:10.4232/1.12904" ...
 $ PID    : num  1 2 3 4 5 6 7 8 9 10 ...
 $ V0A    : num  1 1 1 1 1 1 1 1 1 1 ...
 $ V0B    : num  4 2 5 6 1 2 3 5 1 3 ...
 $ V1A    : num  34 1 1 34 7 1 1 1 1 1 ...
 $ V1B    : num  0 6 34 0 34 34 6 8 34 34 ...
 $ V3A    : num  4 1 1 1 4 1 1 1 1 5 ...
 $ V3B    : num  0 1 1 1 0 1 1 1 1 0 ...
 $ V3C    : num  0 2 10 3 0 10 11 3 1 6 ...
 $ V3D    : num  0 0 0 0 0 0 0 0 0 0 ...
 $ V3E    : num  0 1 0 2 0 0 1 1 2 0 ...
 $ V3F    : num  0 1 0 1 0 0 1 1 1 2 ...
 $ V3G    : num  2 2 3 3 4 3 1 1 3 3 ...
 $ V4     : num  1 2 12 3 10 2 10 3 1 3 ...
Antworten