-
Importing Data From
csv
File Into aDataframe
- Storing the content of a file allGenomeVersion.csv into a dataframe myGenome -
read.csv2()
(french format) - Displaying the whole dataframe
- Getting the type -
class(dataframe)
- Getting the structure of the dataframe (data type, number of levels) -
str(dataframe)
- Getting basic stats about te content of a dataframe -
summary(dataframe)
- Storing the content of a file allGenomeVersion.csv into a dataframe myGenome -
-
Displaying the dataframe content
- Printing the first lines -
head(dataframe)
- Printing the last lines -
last(dataframe)
- Printing a column -
dataframe[colNum|colName]
ordataframe$colName
- Printing one whole line -
dataframe[lineNum,]
- Printing one line, one column -
dataframe[lineNum,colNum]
- Printing some lines -
dataframe[LineStart:LineEnd,]
- Printing one column of some lines -
dataframe[c(line1,line2,line3),colNum]
- Printing the first lines -
-
Manipulating the content of a dataframe
- Adding a new column
- Extracting unique values of a column -
unique(dataframe$colName)
- Extracting one part of a dataframe -
subset(dataframe)
- Calculating a sum -
sum(dataframe)
with filtering on an other column - Getting the number of elements in a dataframe -
length(dataframe)
with filtering on an other column - Ordering dataframe on one column
- Getting summaries of values of a column -
summary
{% highlight bash %}
install.packages('ggplot2') {% endhighlight %}