- Vamolas
- Posts : 2
Join date : 2009-11-26
Εισαγωγή csv και warnings
Sun 21 Aug 2011 - 2:03
Μια ερώτηση ήθελα να κάνω (με 50 σκέλη περίπου... ).
Παίρνω αυτά τα warnings ή καλύτερα τουλάχιστον αυτά γιατί ίσως να υπάρχουν και άλλα που δεν τα δείχνει το R.
warnings()
Warning messages:
1: NAs introduced by coercion
2: In deparse(substitute(arg)) : NAs introduced by coercion
3: In format.default(structure(as.character(x), names = names(x), ... :
NAs introduced by coercion
4: In deparse(substitute(arg)) : NAs introduced by coercion
5: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
6: In deparse(substitute(arg)) : NAs introduced by coercion
7: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
8: In deparse(substitute(arg)) : NAs introduced by coercion
9: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
10: In deparse(substitute(arg)) : NAs introduced by coercion
11: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
12: In deparse(substitute(arg)) : NAs introduced by coercion
13: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
14: In deparse(substitute(arg)) : NAs introduced by coercion
15: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
16: In deparse(substitute(arg)) : NAs introduced by coercion
17: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
18: In deparse(substitute(arg)) : NAs introduced by coercion
19: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
20: In deparse(substitute(arg)) : NAs introduced by coercion
21: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
22: In paste(substr(cn[long], 1L, 250L), "...") : NAs introduced by coercion
23: In deparse(x[[1L]]) : NAs introduced by coercion
24: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
25: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
26: In deparse(x[[1L]]) : NAs introduced by coercion
27: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
28: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
29: In deparse(x[[1L]]) : NAs introduced by coercion
30: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
31: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
32: In deparse(x[[1L]]) : NAs introduced by coercion
33: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
34: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
35: In deparse(x[[1L]]) : NAs introduced by coercion
36: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
37: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
38: In deparse(x[[1L]]) : NAs introduced by coercion
39: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
40: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
41: In deparse(x[[1L]]) : NAs introduced by coercion
42: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
43: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
44: In deparse(x[[1L]]) : NAs introduced by coercion
45: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
46: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
47: In deparse(x[[1L]]) : NAs introduced by coercion
48: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
49: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
50: In deparse(x[[1L]]) : NAs introduced by coercion
There were 50 or more warnings (use warnings() to see the first 50)
Απλά ένα csv έβαλα χωρίς missing values.
(library(foreign) ;read.csv ("C:/... .csv") &
...<- read.table("C:/... .csv", sep=";" , header=TRUE))
Να ανησυχήσω;
Παίρνω αυτά τα warnings ή καλύτερα τουλάχιστον αυτά γιατί ίσως να υπάρχουν και άλλα που δεν τα δείχνει το R.
warnings()
Warning messages:
1: NAs introduced by coercion
2: In deparse(substitute(arg)) : NAs introduced by coercion
3: In format.default(structure(as.character(x), names = names(x), ... :
NAs introduced by coercion
4: In deparse(substitute(arg)) : NAs introduced by coercion
5: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
6: In deparse(substitute(arg)) : NAs introduced by coercion
7: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
8: In deparse(substitute(arg)) : NAs introduced by coercion
9: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
10: In deparse(substitute(arg)) : NAs introduced by coercion
11: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
12: In deparse(substitute(arg)) : NAs introduced by coercion
13: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
14: In deparse(substitute(arg)) : NAs introduced by coercion
15: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
16: In deparse(substitute(arg)) : NAs introduced by coercion
17: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
18: In deparse(substitute(arg)) : NAs introduced by coercion
19: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
20: In deparse(substitute(arg)) : NAs introduced by coercion
21: In prettyNum(.Internal(format(x, trim, digits, nsmall, ... :
NAs introduced by coercion
22: In paste(substr(cn[long], 1L, 250L), "...") : NAs introduced by coercion
23: In deparse(x[[1L]]) : NAs introduced by coercion
24: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
25: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
26: In deparse(x[[1L]]) : NAs introduced by coercion
27: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
28: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
29: In deparse(x[[1L]]) : NAs introduced by coercion
30: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
31: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
32: In deparse(x[[1L]]) : NAs introduced by coercion
33: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
34: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
35: In deparse(x[[1L]]) : NAs introduced by coercion
36: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
37: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
38: In deparse(x[[1L]]) : NAs introduced by coercion
39: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
40: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
41: In deparse(x[[1L]]) : NAs introduced by coercion
42: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
43: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
44: In deparse(x[[1L]]) : NAs introduced by coercion
45: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
46: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
47: In deparse(x[[1L]]) : NAs introduced by coercion
48: In deparse(substitute(x), width.cutoff = 500L) : NAs introduced by coercion
49: In paste(deparse(substitute(x), width.cutoff = 500L), ... :
NAs introduced by coercion
50: In deparse(x[[1L]]) : NAs introduced by coercion
There were 50 or more warnings (use warnings() to see the first 50)
Απλά ένα csv έβαλα χωρίς missing values.
(library(foreign) ;read.csv ("C:/... .csv") &
...<- read.table("C:/... .csv", sep=";" , header=TRUE))
Να ανησυχήσω;
Re: Εισαγωγή csv και warnings
Sun 21 Aug 2011 - 19:29
Δοκίμασε να αλλάξεις τη μορφή του αρχείου αν δε βγάζεις άκρη όσο είναι csv..
Με το εξέλ το μετατρέπεις σε .txt tab delimited και έπειτα :
temp1<-read.delim("D://tokalotopalikarixereikiallomonopati.txt")
Εμένα μου έτρωγε κάτι κολλήματα όταν τα dataset ήταν μεγάλα στα .csv και μετά πείραζα τη μνήμη αλλά δε βλέπω να έχεις το ίδιο πρόβλημα..
Με το εξέλ το μετατρέπεις σε .txt tab delimited και έπειτα :
temp1<-read.delim("D://tokalotopalikarixereikiallomonopati.txt")
Εμένα μου έτρωγε κάτι κολλήματα όταν τα dataset ήταν μεγάλα στα .csv και μετά πείραζα τη μνήμη αλλά δε βλέπω να έχεις το ίδιο πρόβλημα..
- R4ever
- Posts : 44
Join date : 2010-01-20
Age : 44
Re: Εισαγωγή csv και warnings
Sun 21 Aug 2011 - 19:36
Poia entoli xrisimopoiises akribos, tin read.csv() or kapoia alli? Polles fores xreiazetai na allakseis to sep argument.
- Vamolas
- Posts : 2
Join date : 2009-11-26
Re: Εισαγωγή csv και warnings
Thu 8 Sep 2011 - 22:39
Ευχαριστώ πολύ κύριοι! Ε λοιπόν δούλεψε κάνοντας txt το αρχείο προέλευσης των δεδομένων. Pas mal… Merci monsieur Paterask. Επιτέλους όμως βρήκα κάτι άλλο να εκνευρίζομαι. Προσπαθώ να εντοπίσω την αντίστοιχη στο R εντολή που στο Stata είναι η “foreach”. Αυτή αυτό που κάνει είναι πχ
foreach var of varlist weight height calories {
regress circumference `var’
}
Όπου για κάθε μια μεταβλητή από την λίστα αυτών που βρίσκονται μεταξύ της λέξης varlist και το άνοιγμα της αγκύλης εκτελεί την ή τις εντολές που βρίσκονται στην αγκύλη αντικαθιστώντας με κάθε λέξη της λίστας που είπα την λέξη var. Loop δηλαδή. Ποια είναι στο περίπου η εντολή για να την ψάξω;
foreach var of varlist weight height calories {
regress circumference `var’
}
Όπου για κάθε μια μεταβλητή από την λίστα αυτών που βρίσκονται μεταξύ της λέξης varlist και το άνοιγμα της αγκύλης εκτελεί την ή τις εντολές που βρίσκονται στην αγκύλη αντικαθιστώντας με κάθε λέξη της λίστας που είπα την λέξη var. Loop δηλαδή. Ποια είναι στο περίπου η εντολή για να την ψάξω;
Permissions in this forum:
You cannot reply to topics in this forum