Re: [R] trivial syntax question!

2023-05-15 Thread Bert Gunter
Why can you not use the 'labels' argument as described in ?hclust (the Help
system should always be the first place to look for answers to such
questions):

## i.e.
plot(hclust(specimens,"ward.D2"),hang=-1, labels = x[,1],
ylab="distance",main="Classification des spécimens")

... or is there something about your example that I misunderstand?

Cheers,
Bert

On Mon, May 15, 2023 at 9:17 AM Nicolas Degallier 
wrote:

> Dear R-users,
> I'm probably using R too sparsely to solve a very trivial difficulty, as I
> didn't find any clear example in the tutorials on the net.
>
> My matrix is as follows (18 rows-individuals x 4 variables-columns:
>
> L/l L/L_ely L/e L/L_car
> LT  1.21875 1.561.857142857 5.2
> PLT 1.290322581 1.568627451 1.904761905 5.3
> ND1 1.426470588 1.732142857 2.255813953 4.85
> ND2 1.301587302 1.673469388 1.952380952 3.037037037
> ND3 1.235294118 1.6 2.8 4.7
> JML 1.188405797 1.576923077 1.863636364 5.46667
> US1 1.338709677 1.693877551 1.886363636 5.045180795
> US3 1.3 1.67032967  2.08566708  4.832587575
> US5 1.328358209 1.679245283 2.08566708  5.045180795
> US7 1.279411765 1.673076923 2.175   4.93725
> Ml1 1.2 1.659574468 2.228571429 4.875
> Ml2a1.298507463 1.673076923 2.175   5.045180795
> Ml2b1.303030303 1.68627451  1.755102041 5.058823529
> Ml3 1.2343751.64583 1.975   4.98139
> cri 1.291338583 1.673469388 2.08566708  5.045180795
> nat 1.323529412 1.698113208 2.195121951 5.1075
> nat 1.307692308 1.603773585 2.36111 4.473684211
> Sallé   1.26667 1.648433128 1.9 7.6
>
> I ran an ACP and a classification with the following script:
>
> library(ade4)
> library(stats)
> library(cluster)
>
> x<-read.table(file.choose (),sep="\t",header=T) # lecture des données:
> spécimens en lignes, variable en colonnes séparées par des tabulations
>
> labels <- x[,1] # étiquettes des spécimens
>
> x <- x[,-1] # sélection des valeurs
>
> acp<- dudi.pca(x , scannf= F,scale=T,center=T,nf=4) #  analyse en
> composantes principales
>
> s.label(acp$li, xax = 1, yax = 2,  labels) # affichage des étiquettes des
> specimens
>
> s.corcircle(acp$co) # corrélation entre les variables et les axes
> principaux
>
> mat<-dist(x) # distances entre spécimens deux à deux
>
> specimens<-mat
>
> plot(hclust(specimens,"ward.D2"),hang=-1,ylab="distance",main="Classification
> des spécimens")
>
> The resulting dendrogram is nice but I would like to have on the resulting
> plot the labels of each specimen in place of the number of the rows.
>
> I really would be very happy if someone has some time to complete/fix my
> script or indicate an explicit tutorial.
>
> Cheers
> Nicolas Degallier
>
> 120 rue de Charonne
> F-75011 Paris
> 
> 
>
> Publications :
>
> https://www.documentation.ird.fr/listes/parauteur/DEGALLIER/NICOLAS/tout/annee
>
> « Je regarde la carte des vins pour éviter les bouchons » (Raymond Devos)
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R-es] Deep learning ¿Alguna recomendación?

2023-05-15 Thread Manuel Mendoza
Muy buenas, he decidido aplicar Deep learning en mi trabajo y me he
encontrado con que hay numerosos paquetes, que utilizan, además, distintos
algoritmos de optimización. Encontré ejemplos muy sencillos de aplicar con
los paquetes deepnet y neuralnet, pero pienso que quizás haya paquetes
claramente mejores ¿Alguna recomendación?
Gracias,
Manuel

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[R] trivial syntax question!

2023-05-15 Thread Nicolas Degallier
Dear R-users,
I'm probably using R too sparsely to solve a very trivial difficulty, as I 
didn't find any clear example in the tutorials on the net.

My matrix is as follows (18 rows-individuals x 4 variables-columns:

L/l L/L_ely L/e L/L_car
LT  1.21875 1.561.857142857 5.2
PLT 1.290322581 1.568627451 1.904761905 5.3
ND1 1.426470588 1.732142857 2.255813953 4.85
ND2 1.301587302 1.673469388 1.952380952 3.037037037
ND3 1.235294118 1.6 2.8 4.7
JML 1.188405797 1.576923077 1.863636364 5.46667
US1 1.338709677 1.693877551 1.886363636 5.045180795
US3 1.3 1.67032967  2.08566708  4.832587575
US5 1.328358209 1.679245283 2.08566708  5.045180795
US7 1.279411765 1.673076923 2.175   4.93725
Ml1 1.2 1.659574468 2.228571429 4.875
Ml2a1.298507463 1.673076923 2.175   5.045180795
Ml2b1.303030303 1.68627451  1.755102041 5.058823529
Ml3 1.2343751.64583 1.975   4.98139
cri 1.291338583 1.673469388 2.08566708  5.045180795
nat 1.323529412 1.698113208 2.195121951 5.1075
nat 1.307692308 1.603773585 2.36111 4.473684211
Sall�   1.26667 1.648433128 1.9 7.6

I ran an ACP and a classification with the following script:

library(ade4)
library(stats)
library(cluster)

x<-read.table(file.choose (),sep="\t",header=T) # lecture des donn�es: 
sp�cimens en lignes, variable en colonnes s�par�es par des tabulations

labels <- x[,1] # �tiquettes des sp�cimens

x <- x[,-1] # s�lection des valeurs

acp<- dudi.pca(x , scannf= F,scale=T,center=T,nf=4) #  analyse en composantes 
principales

s.label(acp$li, xax = 1, yax = 2,  labels) # affichage des �tiquettes des 
specimens

s.corcircle(acp$co) # corr�lation entre les variables et les axes principaux

mat<-dist(x) # distances entre sp�cimens deux � deux

specimens<-mat

plot(hclust(specimens,"ward.D2"),hang=-1,ylab="distance",main="Classification 
des sp�cimens")

The resulting dendrogram is nice but I would like to have on the resulting plot 
the labels of each specimen in place of the number of the rows.

I really would be very happy if someone has some time to complete/fix my script 
or indicate an explicit tutorial.

Cheers
Nicolas Degallier

120 rue de Charonne
F-75011 Paris



Publications :
https://www.documentation.ird.fr/listes/parauteur/DEGALLIER/NICOLAS/tout/annee

� Je regarde la carte des vins pour �viter les bouchons � (Raymond Devos)


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] PROP_TEST function from INFER package

2023-05-15 Thread Marc Schwartz via R-help
Hi,

You are using the prop_test() function from the infer CRAN package, with an 
argument set for an example using the prop_test() function from the rstatix 
CRAN package.

They are **not** the same function, and do not take the same arguments, even 
though they have the same name.

Read the help page for the prop_test() function in the infer package, where 'x' 
is supposed to be a data frame, not a vector, and there is no 'n' argument.

Regards,

Marc Schwartz


On May 15, 2023 at 7:26:16 AM, alfredo.rocc...@fastwebnet.it 
(alfredo.rocc...@fastwebnet.it (mailto:alfredo.rocc...@fastwebnet.it)) wrote:

> Dear all,
>
> I'm trying to replicate the same example you can find in:
> https://rpkgs.datanovia.com/rstatix/reference/prop_test.html
>
> but I get the following get this error message:
>
>
>
> > library(infer)
>
> > prop_test(x = 95, n = 160, p = 0.5, detailed = TRUE)
>
> Error: Please supply a response variable that is not `NULL`.
>
> >
>
>
>
> > strsplit(version[['version.string']], ' ')[[1]][3]
>
> [1] "4.3.0"
>
> >
>
> > packageVersion("infer")
>
> [1] '1.0.4'
>
>
>
> Anybody can give any help?
>
> Thank you a lot,
>
> Alfredo
>
>

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] PROP_TEST function from INFER package

2023-05-15 Thread alfredo.roccato
Dear all,

I'm trying to replicate the same example you can find in:
https://rpkgs.datanovia.com/rstatix/reference/prop_test.html 

but I get the following get this error message:

 

> library(infer)

> prop_test(x = 95, n = 160, p = 0.5, detailed = TRUE)

Error: Please supply a response variable that is not `NULL`.

> 

 

> strsplit(version[['version.string']], ' ')[[1]][3]

[1] "4.3.0"

> 

> packageVersion("infer")

[1] '1.0.4'

 

Anybody can give any help?

Thank you a lot,

Alfredo


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.