Perhaps you can convert your matrices to data frames as in:
mapply(t.test,as.data.frame(myData1),as.data.frame(myData2))
to test by column and
mapply(t.test,as.data.frame(t(myData1)),as.data.frame(t(myData2)))
to test by row?
- Original Message
From: Gang Chen gangch...@gmail.com
- Original Message
From: Shang Liu [EMAIL PROTECTED]
Subject: [R] how to replace NA values in a list
I have a matrix named spec (see below), it is a 6x3 matrix, and each element
of spec is a list. For example, spec[1,wavenumber] is a list, and it contains
1876 numeric numbers and NAs.
Hi Daniel,
After using strsplit() you can call a user-written function to extend the
length of each list element to a uniform value and then use
do.call() with rbind. For instance,
txt - 1:2
+ 3:4
+ 5
+ 6:7
x- readLines(textConnection(txt))
f - function(x)
+ do.call(rbind,
+
3 matches
Mail list logo