[R] rbind Missing Something: Need New Eyes
Peter Langfelder
peter.langfelder at gmail.com
Fri Feb 1 01:34:10 CET 2013
On Thu, Jan 31, 2013 at 3:55 PM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> I don't see what's missing in my statements to add rows to a data frame
> and someone else will probably see what needs to be added to the statements.
>
> The data frame has this structure (without any data):
>
> $ PHYLUM : chr
> $ SUBPHYLUM : chr
> $ SUPERCLASS : chr
> $ CLASS : chr
> $ SUBCLASS : chr
> $ INFRACLASS : chr
> $ SUPERORDER : chr
> $ ORDER : chr
> $ SUBORDER : chr
> $ INFRAORDER : chr
> $ SUPERFAMILY: chr
> $ FAMILY : chr
> $ SUBFAMILY : chr
> $ TRIBE : chr
> $ SUBTRIBE : chr
> $ GENUS : chr
> $ TAXON : chr
>
> One command (all on one line) is:
>
> itis.ttable <- rbind(itis.ttable, data.frame(PHYLUM = "ARTHROPODA",
> SUBPHYLUM = "MANDIBULATA", SUPERCLASS = NA, CLASS = "INSECTA", SUBCLASS =
> "DICONDYLIA", INFRACLASS = "PTERYGOTA", SUPERORDER = "PANORPIDA", ORDER =
> "TRICHOPTERA", SUBORDER = "INTEGRIPALPIA", INFRAORDER = "PLENITENTORIA",
> SUPERFAMILY = "LIMNEPHILOIDAE", FAMILY = "LIMNEPHILIDAE", SUBFAMILY =
> "LIMNEPHILINAE", TRIBE = "STENOPHYLACINI", SUBTRIBE = NA, GENUS =
> "CHYRANDRA", TAXON = "CENTRALIS"))
>
> R's response is to ask for more input by displaying the continuation
> prompt, +.
>
Can't reproduce your problem:
> data.frame(PHYLUM = "ARTHROPODA",
+ SUBPHYLUM = "MANDIBULATA", SUPERCLASS = NA, CLASS = "INSECTA", SUBCLASS =
+ "DICONDYLIA", INFRACLASS = "PTERYGOTA", SUPERORDER = "PANORPIDA", ORDER =
+ "TRICHOPTERA", SUBORDER = "INTEGRIPALPIA", INFRAORDER = "PLENITENTORIA",
+ SUPERFAMILY = "LIMNEPHILOIDAE", FAMILY = "LIMNEPHILIDAE", SUBFAMILY =
+ "LIMNEPHILINAE", TRIBE = "STENOPHYLACINI", SUBTRIBE = NA, GENUS =
+ "CHYRANDRA", TAXON = "CENTRALIS")
PHYLUM SUBPHYLUM SUPERCLASS CLASS SUBCLASS INFRACLASS SUPERORDER
1 ARTHROPODA MANDIBULATA NA INSECTA DICONDYLIA PTERYGOTA PANORPIDA
ORDER SUBORDER INFRAORDER SUPERFAMILY FAMILY
1 TRICHOPTERA INTEGRIPALPIA PLENITENTORIA LIMNEPHILOIDAE LIMNEPHILIDAE
SUBFAMILY TRIBE SUBTRIBE GENUS TAXON
1 LIMNEPHILINAE STENOPHYLACINI NA CHYRANDRA CENTRALIS
> itis.ttable = data.frame(PHYLUM = "ARTHROPODA",
+ SUBPHYLUM = "MANDIBULATA", SUPERCLASS = NA, CLASS = "INSECTA", SUBCLASS =
+ "DICONDYLIA", INFRACLASS = "PTERYGOTA", SUPERORDER = "PANORPIDA", ORDER =
+ "TRICHOPTERA", SUBORDER = "INTEGRIPALPIA", INFRAORDER = "PLENITENTORIA",
+ SUPERFAMILY = "LIMNEPHILOIDAE", FAMILY = "LIMNEPHILIDAE", SUBFAMILY =
+ "LIMNEPHILINAE", TRIBE = "STENOPHYLACINI", SUBTRIBE = NA, GENUS =
+ "CHYRANDRA", TAXON = "CENTRALIS")
> itis.ttable <- rbind(itis.ttable, data.frame(PHYLUM = "ARTHROPODA",
+ SUBPHYLUM = "MANDIBULATA", SUPERCLASS = NA, CLASS = "INSECTA", SUBCLASS =
+ "DICONDYLIA", INFRACLASS = "PTERYGOTA", SUPERORDER = "PANORPIDA", ORDER =
+ "TRICHOPTERA", SUBORDER = "INTEGRIPALPIA", INFRAORDER = "PLENITENTORIA",
+ SUPERFAMILY = "LIMNEPHILOIDAE", FAMILY = "LIMNEPHILIDAE", SUBFAMILY =
+ "LIMNEPHILINAE", TRIBE = "STENOPHYLACINI", SUBTRIBE = NA, GENUS =
+ "CHYRANDRA", TAXON = "CENTRALIS"))
>
All complete without any continuation prompts.
Peter
More information about the R-help
mailing list