R
data import and export
A. Blejec
andrej.blejec@nib.si
October 27, 2013
Pdf thumbnail preview - Library control component:C# PDF Thumbnail Create SDK: Draw thumbnail images for PDF in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Support Thumbnail Generation with Various Options for Quick PDF Navigation
www.rasteredge.com
Pdf thumbnail preview - Library control component:VB.NET PDF Thumbnail Create SDK: Draw thumbnail images for PDF in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Support Thumbnail Generation with Various Options for Quick PDF Navigation
www.rasteredge.com
Read
Rcan read ...
I
plain text tables and les
I
Excel les
I
SPSS, SAS, Stata formated data
I
databases (like MySQL)
I
XML, HTML les
Library control component:How to C#: Preview Document Content Using XDoc.Word
With the SDK, you can preview the document content according to the preview thumbnail by the ways as following. C# DLLs for Word File Preview. Add references:
www.rasteredge.com
Library control component:How to C#: Preview Document Content Using XDoc.PowerPoint
With the SDK, you can preview the document content according to the preview thumbnail by the ways as following. C# DLLs: Preview PowerPoint Document.
www.rasteredge.com
Write
Rcan write ...
I
plain text tables and les
I
Excel les - use tab delimited plain text
I
SPSS, SAS, Stata formated data
I
databases (like MySQL)
I
XML, HTML les
Library control component:How to C#: Set Image Thumbnail in C#.NET
VB.NET How-to, VB.NET PDF, VB.NET Word, VB.NET Excel, VB.NET PowerPoint, VB How to C#: Set Image Thumbnail in C#.NET. To Preview Images in WinForm Application.
www.rasteredge.com
Library control component:How to C#: Preview Document Content Using XDoc.excel
document in memory. With the SDK, you can preview the document content according to the preview thumbnail by the ways as following.
www.rasteredge.com
Reading texts
read.table()
Read data formatted as a table
read.delim() ...
read.table() variants
readLines()
Read lines from a le
readline()
Reads a line from the Console
read.clipboard() Read text from clipboard
Library control component:How to C#: Generate Thumbnail for Word
Preview Document. Conversion. Convert Word to PDF. Convert Word Convert Word to ODT. Convert PDF to Word. Text Search. Insert Image. Thumbnail Create. Thumbnail Create
www.rasteredge.com
Library control component:How to C#: Generate Thumbnail for PowerPoint
Preview Document. Conversion. Convert PowerPoint to PDF. Convert PowerPoint to Pages. Annotate PowerPoint. Text Search. Insert Image. Thumbnail Create.
www.rasteredge.com
Reading text data
Main function to read text data is read.table().
Data table:
gender age weight height
F 18 68.0 1.720
M 17 68.2 1.753
M 17 68.4 1.730
F 18 65.6 1.743
M 17 65.2 1.765
File: bmi.txt
Library control component:C# Image: View & Operate Web Page Using .NET Doc Image Web Viewer
Support multiple document and image formats, like PDF and TIFF; Thumbnail images order of source document file using mouse dragging in thumbnail preview section;
www.rasteredge.com
Library control component:How to C#: Generate Thumbnail for Excel
Preview Document. Conversion. Convert Excel to PDF. Convert Excel to Insert Image. Thumbnail Create. Thumbnail Create. |. Home ›› XDoc.Excel ›› C# Excel
www.rasteredge.com
Column names: header
> data <- read.table("../data/bmi.txt",header=TRUE)
> head(data)
gender age weight height
1
F 18
68.0
1.720
2
M 17
68.2
1.753
3
M 17
68.4
1.730
4
F 18
65.6
1.743
5
M 17
65.2
1.765
6
F 18
64.6
1.690
Library control component:How to C#: Overview of Using XDoc.PowerPoint
document (ODP). Empower to navigate PowerPoint document content quickly via thumbnail. Able to you want. Create Thumbnail. See this
www.rasteredge.com
Library control component:How to C#: Overview of Using XDoc.Word
Tell C# users how to: create a new Word file and load Word from pdf; merge, append, and split Word files; insert, delete, move, rotate, copy Create Thumbnail.
www.rasteredge.com
Other arguments
> if(interactive())
+ ?read.table
read.table(file, header = FALSE, sep = "", quote = "\"
",
dec = ".", row.names, col.names,
as.is = !stringsAsFactors,
na.strings = "NA", colClasses = NA, nrows = -1,
skip = 0, check.names = TRUE, fill = !blank.lines.skip,
strip.white = FALSE, blank.lines.skip = TRUE,
comment.char = "#",
allowEscapes = FALSE, flush = FALSE,
stringsAsFactors = default.stringsAsFactors(),
fileEncoding = "", encoding = "unknown")
read.table() variants
read.csv
(file, header = TRUE, sep = ",", quote="\"",
dec=".", fill = TRUE, comment.char="", ...)
read.csv2 (file, header = TRUE, sep = ";", quote="\"",
dec=",", fill = TRUE, comment.char="", ...)
read.delim (file, header = TRUE, sep = "\t", quote="\"",
dec=".", fill = TRUE, comment.char="", ...)
read.delim2(file, header = TRUE, sep = "\t", quote="\"",
dec=",", fill = TRUE, comment.char="", ...)
What next?
If you want to use variables by names, attach your data!
> dim(data)
# dimension: n rows and columns
[1] 45
4
> names(data)
# variable names
[1] "gender" "age"
"weight" "height"
> try(mean(weight))
# variables are not available yet
> attach(data)
# make variables usable
> mean(weight)
# variables are available
[1] 61.00889
> table(gender,age)
age
gender 17 18
F
9 16
M
9 11
Reading les line by line
> txt <- readLines("../data/bmiCom.txt")
> str(txt)
chr [1:49] "# Data for BMI calculation\t\t\t\t" ...
# Data for BMI calculation
# weight in kg
# height in m
gender age weight height
F 18 1.720 # weight not known
M 17 68.2 1.753
M 17 68.4 1.730
F 18 65.6 1.743
M 17 65.2 1.765
F 18 64.6 1.690
Documents you may be interested
Documents you may be interested