How to index an element of a list object in R

Indexing a list is done using double bracket, i.e. hypo_list[[1]] (e.g. have a look here: http://www.r-tutor.com/r-introduction/list). BTW: read.table does not return a table but a dataframe (see value section in ?read.table). So you will have a list of dataframes, rather than a list of table objects. The principal mechanism is identical for tables and dataframes … Read more

read.csv warning ‘EOF within quoted string’ prevents complete reading of file

You need to disable quoting. cit <- read.csv(“citations.CSV”, quote = “”, row.names = NULL, stringsAsFactors = FALSE) str(cit) ## ‘data.frame’: 112543 obs. of 13 variables: ## $ row.names : chr “10.2307/675394” “10.2307/30007362” “10.2307/4254931” “10.2307/20537934” … ## $ id : chr “10.2307/675394\t” “10.2307/30007362\t” “10.2307/4254931\t” “10.2307/20537934\t” … ## $ doi : chr “Archaeological Inference and Inductive Confirmation\t” … Read more

Specify custom Date format for colClasses argument in read.table/read.csv

You can write your own function that accepts a string and converts it to a Date using the format you want, then use the setAs to set it as an as method. Then you can use your function as part of the colClasses. Try: setAs(“character”,”myDate”, function(from) as.Date(from, format=”%d/%m/%Y”) ) tmp <- c(“1, 15/08/2008”, “2, 23/05/2010”) … Read more