Hello,
I am working with s.multinom() from the ade4package. I tried to plot the
results of my %PCA (via the function dudi.pca()) followed by a MCOA
(mcoa()). But when I give my variables to s.multinom() I get the following
Error message:
Error in FUN(1:14[[1L]], ...) : number 1 profile without da
What is a smart way to change an entry inside a column of a dataframe or
matrix which is of type "factor"?
Here is my script incl. input data:
> #set working directory:
> setwd("K:/R")
>
> #read in data:
> input<-read.table("Exampleinput.txt", sep="\t", header=TRUE)
>
> #check data:
> input
I
all problems solved. thank you for your help!
for the sake of completeness, here my solution:
#1) read in data:
daten<-read.table('K:/Analysen/STRUCTURE/test.txt', header=TRUE, sep="\t")
daten<-as.data.frame(daten)
#2) create empty matrix:
indxind<-matrix(0,nrow=617, ncol=617)
#indxind[1:20,1:19]
SORRY it should be:
Fridolin wrote
>
> for (s in 3:6) { #walks though the matrix colum by colum, starting at
> colum 3
> for (z1 in 1:5) { #for each current colum, take one row (z1)...
> for (z2 in 1:5) { #...and compare it to another row (z2) of the
> current
thank you for your help.
my input data looks like this (tab separated):
Ind.nr. Pop.nr. scm266 rms1280 scm247 rms1107
1 101 305 318 222 135
1 101 305 318 231 135
2 101 305 313 999 96
2 101 305 321 999 130
3
hello, this is my script:
#1) read in data:
daten<-read.table('K:/Analysen/STRUCTURE/input_STRUCTURE_tab_excl_5_282_559.txt',
header=TRUE, sep="\t")
daten<-as.matrix(daten)
#2) create empty matrix:
indxind<-matrix(nrow=617, ncol=617)
indxind[1:20,1:19]
#3) compare cells to each other, score:
fo
6 matches
Mail list logo