Data

From R
(Difference between revisions)
Jump to: navigation, search
(Creation)
 
Line 2: Line 2:
 
This section addresses data related operations. That includes the [[Data/Creation|creation]] of data by defining for example the values and the data set form, the [[Data/ReadindWriting|reading]] of existing data into R, as also the [[Data/ReadindWriting|writing]] of data in an external file. Further this part is about the [[Data/Manipulation|manipulation]] of data, as for example the subsetting of data fragments and all actions which result in a change of a current data set. The [[Data/Investigation|Investigation]] subsection describes all actions, which help to characterize data by for example looking for patterns, comparing data, etc.. All about creating fits to existing data is described in the [[Data/Fitting|Fitting]] section.
 
This section addresses data related operations. That includes the [[Data/Creation|creation]] of data by defining for example the values and the data set form, the [[Data/ReadindWriting|reading]] of existing data into R, as also the [[Data/ReadindWriting|writing]] of data in an external file. Further this part is about the [[Data/Manipulation|manipulation]] of data, as for example the subsetting of data fragments and all actions which result in a change of a current data set. The [[Data/Investigation|Investigation]] subsection describes all actions, which help to characterize data by for example looking for patterns, comparing data, etc.. All about creating fits to existing data is described in the [[Data/Fitting|Fitting]] section.
  
= Creation =
+
=Data Sections=
{{private}}
+
{{TOC right}}
+
{|class="wikitable"
+
|-
+
 
+
!scope="col" style="width: 50pt;" |Function / argument name
+
!scope="col" style="width: 100pt;" |Argument(s) / options
+
!scope="col" style="width: 100pt;" |What it does:
+
!scope="col" style="width: 150pt;" |Example(s)
+
 
+
|- style="vertical-align: top;"
+
 
+
|data.frame(''u,v,w'')||individual arrays ''u,v,w'' defining first to third row of data frame||merges arrays ''u,v,w'' to a data frame
+
|'''>''' u<-gl(2,1,6)
+
 
+
'''>''' v<-gl(2,3)
+
 
+
'''>''' w<-c(10,30,20,40,50,70)
+
 
+
'''>''' x=data.frame(a,b,c)
+
 
+
'''''so x is:'''''
+
+
{|class="wikitable"
+
|-
+
! !!u !!v!!w
+
|-
+
|1 ||1||1||10
+
|-
+
| 2 || 2 || 1 || 30
+
|-
+
|3||1||1||20
+
|-
+
|4||2||2||40
+
|-
+
|5||1||2||50
+
|-
+
|6||2||2||70
+
|}
+
 
+
|- style="vertical-align: top;"
+
 
+
|gl(''n,r,l'')||level number ''n'', replications ''r'', length ''l''||generates factors according to given level
+
|'''>''' x<-gl(3,2,9)
+
 
+
'''''so x is:'''''
+
 
+
'''[1]''' 1 1 2 2 3 3 1 1 2
+
 
+
Levels: 1 2 3
+
 
+
|- style="vertical-align: top;"
+
 
+
|matrix(''v,c,r'')||data vector ''v'', row number ''r'' and column number ''c''||creates a 2D matrix of given data and dimensions
+
|'''>''' x<-matrix(1:6,2,3)
+
 
+
'''''so x is:'''''
+
 
+
{|class="wikitable"
+
|-
+
! !![,1] !![,2]!![,3]
+
|-
+
![1,]
+
|1||3||5
+
|-
+
![2,]
+
|2||4||6
+
|}
+
 
+
'''>''' x<-matrix(1:6,3,4)
+
 
+
'''''so x is:'''''
+
 
+
{|class="wikitable"
+
|-
+
! !![,1] !![,2]!![,3]!![,4]
+
|-
+
![1,]
+
|1||4||1||4
+
|-
+
![2,]
+
|2||5||2||5
+
|-
+
![3,]
+
|3||6||3||6
+
|}
+
 
+
|- style="vertical-align: top;"
+
 
+
|dim(''x'')<-c(''r,c,d'')||vector ''x'', row number ''r'', column number ''c'', layers in depth ''d''||dimensions vector ''x'' to 2D or 3D data frame
+
|'''>'''x<-1:6
+
 
+
'''''so x is:'''''
+
 
+
'''[1]''' 1 2 3 4 5 6
+
 
+
'''>'''dim(x)<-c(2,3)
+
 
+
'''''so x is:'''''
+
 
+
{|class="wikitable"
+
|-
+
! !![,1] !![,2]!![,3]
+
|-
+
![1,]
+
|1||3||5
+
|-
+
![2,]
+
|2||4||6
+
|}
+
 
+
|}
+
 
+
=Reading and Writing=
+
 
# [[Data/Creation|Creation]]
 
# [[Data/Creation|Creation]]
 
# [[Data/ReadindWriting|Reading and writing]]
 
# [[Data/ReadindWriting|Reading and writing]]

Latest revision as of 12:11, 26 November 2015

Contents

This section addresses data related operations. That includes the creation of data by defining for example the values and the data set form, the reading of existing data into R, as also the writing of data in an external file. Further this part is about the manipulation of data, as for example the subsetting of data fragments and all actions which result in a change of a current data set. The Investigation subsection describes all actions, which help to characterize data by for example looking for patterns, comparing data, etc.. All about creating fits to existing data is described in the Fitting section.

Data Sections

  1. Creation
  2. Reading and writing
  3. Manipulation
  4. Investigation
  5. Fitting


Navigation
Arrow left.gif Links Arrow up.gif Main Attributes Arrow right.gif

Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox