what is the proper way to save the distance matrix?

20 views
Skip to first unread message

Jingpeng Wu

unread,
Oct 15, 2018, 10:28:44 AM10/15/18
to nat-user
Dear Greg, 

I tried to save the distance matrix with csv format, but the output have some extra columns. I can just ignore them?

here is my code to reproduce:

```{r}
library(nat)
library(nat.nblast)

# plot some test data (?kcs20 for details)
# Drosophila Kenyon cells processed from raw data at http://flycircuit.tw
head(kcs20)

mydotprops = dotprops(kcs20)
aba=nblast_allbyall(mydotprops)
hc=nhclust(scoremat=aba)
plot(hc)

write.csv2(aba, "aba.csv")
```

Thanks,
Jingpeng

Gregory Jefferis

unread,
Oct 15, 2018, 11:24:05 AM10/15/18
to Jingpeng Wu, nat-user
I would suggest write.csv and use the row.names=F argument. See ?write.csv help. 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/nat-user.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nat-user/030cdc86-dc77-4b06-b4c7-92d5daf11c57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jingpeng Wu

unread,
Oct 15, 2018, 1:33:21 PM10/15/18
to nat-user
thanks a lot, that works perfectly!
Reply all
Reply to author
Forward
0 new messages