Last data update: 2014.03.03

R: lvisAFCM: this function calculates disjonctive table, blurt...
lvisAFCMR Documentation

lvisAFCM: this function calculates disjonctive table, blurt table and contributions for AFCM and plots the corresponding graphs.

Description

Combines "laterAFCM" and "visAFCM" functions. It calculates disjunctive table, Burt table and contributions for MCA and then plots multiple correspondence analysis graphs.

Usage

  lvisAFCM(data, scannf=FALSE, nf=2, xax = 1, yax = 2, clab.row = FALSE, clab.col = 1,
  permute = FALSE, posieig = "top", sub = NULL, 
  graphstyle = "unique", graphrow = 1, graphcol = 3, cpoint = 1, 
  clabel = 2, csub = 2, saveDatadisj = FALSE, 
  fileDatadisj = "Datadisj.csv", saveSumcolDatadisj = FALSE, 
  fileSumcolDatadisj = "SumcolDatadisj.csv", saveDataburt = FALSE, 
  fileDataburt = "Databurt.csv", saveContributions = FALSE, 
  fileContributions = "Contributions.csv")

Arguments

data

A data.frame with the qualitative variables which should be taken in account in the multiple correspondence analysis.

scannf

A logical value indicating whether the eigenvalues bar plot should be displayed; see ade4 package (by default scannf = FALSE).

nf

If scannf=FALSE, an integer indicating the number of kept axes; see ade4 package (by default nf = 2).

xax

A numeric giving the number of the first axis to plot (by default xax = 1).

yax

A numeric giving the number of the second axis to plot (by default yax = 2).

clab.row

A character size for the rows (by default clab.row = FALSE).

clab.col

A character size for the columns (by default clab.col = 1).

permute

If FALSE, the rows are plotted by points and the columns by arrows. If TRUE it is the opposite (by default permute = FALSE).

posieig

If "top" the eigenvalues bar plot is upside, if "bottom" it is downside, if "none" no plot. "topleft" and "bottomleft" are also possible (by default posieig = "top").

sub

A string of characters to be inserted as legend (by default sub = NULL).

graphstyle

Three kinds of graph can be selected. If graphstyle = "unique", all variables will be plotted on the same graph. If graphstyle = "multiple a" each variable will be plotted in different graphs (cf. graphrow and graphcol) with inertia ellipse. If graphstyle = "multiple b" each variable will be plotted in different graphs (cf. graphrow and graphcol) with convex hulls.

graphrow

The number of row for multiple graph. If one deal with 6 variables it is recommended to write graphrow = 2 and graphcol = 3.

graphcol

The number of column for multiple graph. If one deal with 6 variables it is recommended to write graphrow = 2 and graphcol = 3.

cpoint

A numeric for the size of the points.

clabel

A numeric for the size of the labels.

csub

A numeric for the size of the name of the variable written at the bottom of each chart.

saveDatadisj

This arguments permits to save directly the results of the disjunctive table in a .csv file in the workspace of R. If savetable = "csv" there will be "." for the decimal point and a "," for the separator. If savetable = "csv2" there will be "," for the decimal point and a ";" for the separator. (by default savetable = FALSE)

fileDatadisj

This argument will work if savetable = "csv" or "csv2". It gives the name of the csv file saved (by default file = "Datadisj.csv")

saveSumcolDatadisj

This arguments permits to save directly the results of the sum of the column of the disjunctive table in a .csv file in the workspace of R. If savetable = "csv" there will be "." for the decimal point and a "," for the separator. If savetable = "csv2" there will be "," for the decimal point and a ";" for the separator. (by default savetable = FALSE)

fileSumcolDatadisj

This argument will work if savetable = "csv" or "csv2". It gives the name of the csv file saved (by default file = "SumcolDatadisj.csv")

saveDataburt

This arguments permits to save directly the results of the Burt table in a .csv file in the workspace of R. If savetable = "csv" there will be "." for the decimal point and a "," for the separator. If savetable = "csv2" there will be "," for the decimal point and a ";" for the separator. (by default savetable = FALSE)

fileDataburt

This argument will work if savetable = "csv" or "csv2". It gives the name of the csv file saved (by default file = "Databurt.csv")

saveContributions

This arguments permits to save directly the results of the contributions table in a .csv file in the workspace of R. If savetable = "csv" there will be "." for the decimal point and a "," for the separator. If savetable = "csv2" there will be "," for the decimal point and a ";" for the separator. (by default savetable = FALSE)

fileContributions

This argument will work if savetable = "csv" or "csv2". It gives the name of the csv file saved (by default file = "Contributions.csv")

Value

The function returns results of class "list".

Note

If you use this function please cite also ade4-package.

Author(s)

Borel A., Pouydebat E., Reghem E. <antony.borel@gmail.com> based on functions from Daniel Chessel, Anne-Beatrice Dufour and Stephane Dray, with contributions from Thibaut Jombart, Jean R. Lobry, Sebastien Ollier, Sandrine Pavoine and Jean Thioulouse. Package ade4: Analysis of Ecological Data : Exploratory and Euclidean methods in Environmental sciences.

References

Daniel Chessel, Anne-Beatrice Dufour and Stephane Dray, with contributions from Thibaut Jombart, Jean R. Lobry, Sebastien Ollier, Sandrine Pavoine and Jean Thioulouse. Package ade4: Analysis of Ecological Data : Exploratory and Euclidean methods in Environmental sciences.

See Also

ade4,inertia.dudi, acm.disjonctif, acm.burt, dudi.acm, scatter.dudi, s.class, s.chull

Examples

  data(laterdata)
  ## Without saving:
  ## "unique" graph:
  lvisAFCM(laterdata)
  
  ## "multiple a" graph:
  lvisAFCM(laterdata, xax = 1, yax = 2, clab.row = FALSE, 
  clab.col = 1,permute = FALSE, posieig = "top", sub = NULL, 
  graphstyle = "multiple a", graphrow = 2, graphcol = 3, 
  cpoint=3)
  
  ## "multiple b" graph:
  lvisAFCM(laterdata, xax = 1, yax = 2, clab.row = FALSE, 
  clab.col = 1,permute = FALSE, posieig = "top", sub = NULL, 
  graphstyle = "multiple b", graphrow = 2, graphcol = 3)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Laterality)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Laterality/lvisAFCM.Rd_%03d_medium.png", width=480, height=480)
> ### Name: lvisAFCM
> ### Title: lvisAFCM: this function calculates disjonctive table, blurt
> ###   table and contributions for AFCM and plots the corresponding graphs.
> ### Aliases: lvisAFCM
> ### Keywords: correspondence AFCM MCA laterality manual preference
> 
> ### ** Examples
> 
>   data(laterdata)
>   ## Without saving:
>   ## "unique" graph:
>   lvisAFCM(laterdata)
$Datadisj
    Indiv.Airly Indiv.Biwa Indiv.Doma Indiv.Dudy Indiv.Gogo Indiv.Neil
1             0          0          0          0          0          0
2             0          0          0          0          0          0
3             0          0          0          0          0          1
4             0          0          0          0          0          0
5             0          0          1          0          0          0
6             0          0          0          0          0          0
7             0          0          0          0          0          0
8             0          0          0          0          0          1
9             0          0          0          0          0          0
10            0          0          0          0          0          0
11            1          0          0          0          0          0
12            0          0          0          0          0          0
13            1          0          0          0          0          0
14            0          0          0          0          0          0
15            0          0          0          0          0          0
16            0          0          0          0          0          1
17            0          0          0          0          0          1
18            0          0          0          0          0          0
19            0          0          0          0          0          1
20            0          0          0          1          0          0
21            0          1          0          0          0          0
22            0          0          0          1          0          0
23            0          0          0          1          0          0
24            0          0          0          0          0          0
25            0          0          0          1          0          0
26            0          0          0          0          0          0
27            0          0          0          0          0          0
28            1          0          0          0          0          0
29            1          0          0          0          0          0
30            0          0          0          0          0          0
31            1          0          0          0          0          0
32            0          0          0          0          0          0
33            0          0          0          1          0          0
34            1          0          0          0          0          0
35            0          0          0          0          0          0
36            0          0          0          0          0          0
37            0          0          0          0          0          0
38            0          0          0          0          0          0
39            0          0          0          0          0          0
40            0          0          0          0          0          1
41            0          0          0          0          0          1
42            0          0          0          1          0          0
43            0          1          0          0          0          0
44            0          0          0          0          0          1
45            0          0          1          0          0          0
46            0          0          1          0          0          0
47            0          0          1          0          0          0
48            0          0          0          0          0          0
49            1          0          0          0          0          0
50            0          0          0          0          0          0
51            0          0          0          0          0          0
52            0          0          0          0          0          0
53            0          0          1          0          0          0
54            0          1          0          0          0          0
55            0          0          0          0          0          0
56            0          0          0          0          0          1
57            0          0          0          0          0          1
58            0          0          0          0          0          1
59            0          0          0          0          0          0
60            0          1          0          0          0          0
61            0          1          0          0          0          0
62            0          0          0          0          0          0
63            0          0          0          0          0          0
64            0          0          0          0          0          0
65            0          0          0          0          0          0
66            0          0          0          0          0          0
67            0          0          0          0          1          0
68            0          0          0          0          0          0
69            0          0          0          0          0          1
70            0          0          0          0          0          1
71            0          0          0          0          0          1
72            0          1          0          0          0          0
73            0          1          0          0          0          0
74            0          0          0          0          0          1
75            0          0          0          0          0          1
76            0          0          0          0          0          1
77            0          0          0          0          0          0
78            0          0          0          0          0          0
79            0          0          0          0          0          0
80            0          0          0          0          0          0
81            0          0          0          0          0          0
82            0          0          0          0          0          0
83            0          0          0          0          0          0
84            0          0          1          0          0          0
85            0          0          1          0          0          0
86            0          0          0          0          0          0
87            0          0          0          0          1          0
88            0          0          0          0          0          0
89            0          0          0          0          0          1
90            0          0          1          0          0          0
91            1          0          0          0          0          0
92            0          0          0          0          0          0
93            0          0          0          0          0          0
94            0          0          0          0          0          1
95            0          0          1          0          0          0
96            0          0          0          0          0          0
97            0          0          1          0          0          0
98            0          0          0          0          0          1
99            0          0          0          0          0          0
100           0          0          0          0          0          0
101           0          0          1          0          0          0
102           0          0          1          0          0          0
103           0          0          0          0          0          0
104           0          0          1          0          0          0
105           0          0          1          0          0          0
106           0          0          0          0          0          0
107           0          0          0          0          0          0
108           0          0          0          0          0          0
109           0          0          0          0          1          0
110           0          0          0          0          1          0
111           1          0          0          0          0          0
112           0          0          0          0          0          1
113           0          0          1          0          0          0
114           0          0          1          0          0          0
115           0          0          0          0          0          0
116           0          0          1          0          0          0
117           0          0          0          0          1          0
118           0          0          1          0          0          0
119           0          0          0          0          0          0
120           0          0          0          0          0          0
121           0          0          1          0          0          0
122           0          0          0          0          0          0
123           0          0          1          0          0          0
124           0          0          0          0          0          0
125           0          0          0          0          0          1
126           0          0          1          0          0          0
127           0          0          1          0          0          0
128           0          0          0          0          0          0
129           0          0          1          0          0          0
130           0          0          1          0          0          0
131           0          0          0          0          0          0
132           1          0          0          0          0          0
133           0          0          0          0          0          0
134           1          0          0          0          0          0
135           0          0          1          0          0          0
136           0          0          1          0          0          0
137           0          0          1          0          0          0
138           0          0          1          0          0          0
139           0          0          0          0          0          0
140           0          0          0          0          0          0
141           0          0          0          0          0          0
142           0          0          0          0          0          0
143           0          0          0          0          0          0
144           0          0          1          0          0          0
145           0          0          0          0          1          0
146           0          0          0          0          0          0
147           0          1          0          0          0          0
148           0          1          0          0          0          0
149           0          0          1          0          0          0
150           0          1          0          0          0          0
151           0          0          0          0          0          0
152           0          0          0          0          0          0
153           0          0          0          0          0          0
154           0          0          0          0          0          0
155           0          0          0          0          0          0
156           0          0          0          0          0          0
157           0          0          0          0          0          0
158           0          0          0          0          0          0
159           0          0          0          0          0          0
160           0          1          0          0          0          0
161           0          0          1          0          0          0
162           0          0          0          0          0          0
163           0          0          0          0          0          0
164           0          0          0          0          0          0
165           0          0          1          0          0          0
166           0          0          0          0          0          1
167           0          0          0          0          0          0
168           0          0          1          0          0          0
169           0          0          1          0          0          0
170           0          0          1          0          0          0
171           0          0          1          0          0          0
172           0          0          1          0          0          0
173           0          0          0          0          0          0
174           0          0          0          0          0          0
175           1          0          0          0          0          0
176           0          0          0          0          0          0
177           0          0          1          0          0          0
178           0          0          0          0          0          0
179           0          0          0          0          0          0
180           0          0          0          0          0          0
181           0          0          0          0          0          0
182           0          0          0          0          0          0
183           0          0          0          0          0          0
184           0          0          0          0          0          1
185           0          0          0          0          0          0
186           0          0          0          0          0          0
187           0          0          0          0          0          1
188           0          0          0          0          0          1
189           0          0          1          0          0          0
190           0          0          1          0          0          0
191           0          0          0          0          0          0
192           0          0          0          0          0          0
193           0          0          1          0          0          0
194           0          0          0          0          0          0
195           0          0          1          0          0          0
196           0          0          0          0          0          0
197           0          0          0          0          0          0
198           0          0          0          0          0          0
199           0          0          0          0          0          0
200           0          0          0          0          0          0
201           0          0          1          0          0          0
202           0          0          1          0          0          0
203           0          0          0          0          0          0
204           0          0          1          0          0          0
205           0          0          0          0          0          0
206           0          0          0          0          0          0
207           0          0          1          0          0          0
208           0          0          0          0          0          0
209           0          0          0          0          0          0
210           0          0          0          0          0          0
211           0          0          0          0          0          0
212           0          0          1          0          0          0
213           0          0          0          0          0          0
214           0          0          0          0          0          0
215           1          0          0          0          0          0
216           1          0          0          0          0          0
217           0          1          0          0          0          0
218           0          0          0          0          0          0
219           1          0          0          0          0          0
220           1          0          0          0          0          0
221           0          0          1          0          0          0
222           0          0          0          0          0          0
223           0          0          0          0          0          0
224           0          0          0          0          0          0
225           1          0          0          0          0          0
226           1          0          0          0          0          0
227           1          0          0          0          0          0
228           0          0          0          0          0          0
229           0          0          0          0          0          0
230           0          0          0          0          0          0
231           0          0          0          0          0          0
232           0          0          1          0          0          0
233           0          0          0          0          0          0
234           0          0          1          0          0          0
235           1          0          0          0          0          0
236           0          0          0          0          0          0
237           0          0          0          0          0          0
238           0          0          0          0          0          0
239           0          0          0          0          0          0
240           0          0          0          0          0          0
241           0          0          0          0          0          0
242           0          0          0          0          0          0
243           0          0          1          0          0          0
244           1          0          0          0          0          0
245           0          0          0          0          0          0
246           0          0          1          0          0          0
247           0          0          0          0          0          0
248           0          0          0          0          0          0
249           0          0          0          0          0          0
250           0          0          1          0          0          0
251           0          0          1          0          0          0
252           0          0          0          0          0          0
253           0          0          1          0          0          0
254           0          0          1          0          0          0
255           0          0          1          0          0          0
256           0          0          0          0          0          0
257           0          0          1          0          0          0
258           0          0          0          0          0          1
259           0          0          1          0          0          0
260           0          0          0          0          0          1
261           0          0          1          0          0          0
262           0          0          0          0          0          0
263           0          0          0          0          0          0
264           0          0          0          0          0          0
265           0          0          0          0          0          0
266           0          0          0          0          0          1
267           0          0          0          0          0          0
268           0          0          0          0          0          0
269           0          0          0          0          0          0
270           0          0          0          0          0          0
271           0          0          0          0          1          0
272           0          0          0          0          0          0
273           1          0          0          0          0          0
274           0          0          0          0          0          0
275           0          0          0          0          0          0
276           0          0          0          0          0          0
277           1          0          0          0          0          0
278           0          0          0          0          0          0
279           1          0          0          0          0          0
280           0          0          0          0          0          0
281           0          0          0          0          0          0
282           1          0          0          0          0          0
283           0          0          0          1          0          0
284           0          0          0          1          0          0
285           1          0          0          0          0          0
286           0          1          0          0          0          0
287           0          0          0          1          0          0
288           0          0          0          0          0          1
289           1          0          0          0          0          0
290           0          0          0          0          0          0
291           0          0          0          0          0          0
292           0          0          0          1          0          0
293           0          0          0          0          0          0
294           0          0          0          0          0          1
295           0          0          0          0          0          0
296           0          0          0          0          0          0
297           0          0          0          0          0          0
298           0          0          0          0          0          0
299           0          0          0          0          0          0
300           0          0          0          0          0          1
301           0          0          0          0          0          0
302           0          0          0          0          0          0
303           0          0          0          0          0          0
304           0          0          0          0          0          0
305           0          0          0          0          0          0
306           0          0          0          0          0          1
307           0          0          0          1          0          0
308           0          0          0          0          0          0
309           0          0          0          0          0          0
310           0          0          0          0          0          0
311           0          0          0          0          0          0
312           0          0          0          0          0          0
313           0          0          0          0          0          0
314           1          0          0          0          0          0
315           0          0          0          0          0          0
316           0          0          0          0          0          0
317           0          0          0          0          0          0
318           0          0          0          0          0          0
319           0          0          0          0          0          0
320           1          0          0          0          0          0
321           1          0          0          0          0          0
322           0          0          0          0          0          0
323           1          0          0          0          0          0
324           0          0          0          0          0          1
325           1          0          0          0          0          0
326           1          0          0          0          0          0
327           1          0          0          0          0          0
328           0          0          0          0          0          1
329           0          0          0          0          0          0
330           0          0          0          0          0          1
331           1          0          0          0          0          0
332           0          0          0          0          0          1
333           1          0          0          0          0          0
334           0          0          0          0          0          0
335           0          0          0          0          0          0
336           0          0          0          0          0          0
337           0          0          1          0          0          0
338           0          0          1          0          0          0
339           0          0          0          1          0          0
340           0          0          1          0          0          0
341           0          0          0          0          0          0
342           0          0          0          0          0          0
343           0          0          0          0          0          0
344           0          0          0          0          0          0
345           0          0          1          0          0          0
346           0          0          0          0          0          0
347           1          0          0          0          0          0
348           1          0          0          0          0          0
349           0          0          1          0          0          0
350           1          0          0          0          0          0
351           1          0          0          0          0          0
352           0          0          1          0          0          0
353           1          0          0          0          0          0
354           1          0          0          0          0          0
355           0          0          0          0          0          0
356           0          0          1          0          0          0
357           0          0          1          0          0          0
358           0          0          0          0          0          0
359           0          0          0          0          0          0
360           0          0          0          0          0          0
361           0          0          0          0          0          0
362           0          0          1          0          0          0
363           0          0          0          0          0          0
364           0          0          0          0          0          0
365           0          0          0          0          0          0
366           0          0          0          0          0          0
367           0          0          0          0          0          0
368           1          0          0          0          0          0
369           0          0          0          0          0          0
370           0          0          0          0          0          0
371           0          0          0          0          0          0
372           0          0          1          0          0          0
373           0          0          0          0          0          0
374           0          1          0          0          0          0
375           0          0          0          0          0          1
376           0          0          0          0          0          0
377           0          0          0          0          0          1
378           0          1          0          0          0          0
379           0          0          1          0          0          0
380           0          0          0          0          0          0
381           0          0          0          0          0          0
382           0          0          0          0          0          0
383           0          0          0          0          0          0
384           0          0          1          0          0          0
385           0          1          0          0          0          0
386           0          0          1          0          0          0
387           0          0          0          0          0          0
388           0          0          1          0          0          0
389           0          0          0          0          0          0
390           0          0          0          0          0          0
391           0          0          0          0          0          0
392           0          0          0          0          0          0
393           0          0          0          0          0          0
394           0          0          0          0          0          0
395           1          0          0          0          0          0
396           0          0          0          0          0          0
397           0          0          0          0          0          0
398           1          0          0          0          0          0
399           0          0          0          0          0          0
400           0          0          0          0          0          0
401           0          0          0          0          0          0
402           0          0          0          0          0          0
403           0          0          0          0          0          0
404           0          0          0          0          0          0
405           0          0          0          0          0          0
406           0