On Jul 1, 2012, at 6:15 AM, Rui Barradas wrote:

Hello,

That error is because your datum is of a class that merge.default cannot handle, like the error message says. By the look of it, class "TillingFeatureSet" has a print method written to print it. This because it prints objects of that class with some descriptive information not part of the object itself. The underlying structure seems to be a list, which was subclassed to a "TillingFeatureSet" class object, with methods specially written for it.

Actually the error was from the coercion function `as.data.frame.default`. This rawData object appears to be a list of two S4 objects, (but that is a guess) and I suspect it was created by a BioConductor package. It's not surprising that a complex irregular object would not have an "as" method. (None of the requested information about the package being used (very possibly "oligo") or other system details were provided.)

The question should probably be reformulated with more details and sent to the BioConductor mailing list.

--
David.


Bottom line: if you merge the two components, the special behavior that comes with its class might be lost. Do you really need to merge them?

If so, use dput(rawData), its output, to post your object. But think about it first.

Hope this helps,

Rui Barradas

Em 28-06-2012 16:47, Seungyeul Yoo escreveu:
Hello,

I'm wondering how I can merge two featuresets into one.

My dataset is two sets of microarray data and it looks like followings:

rawData
$v1
TilingFeatureSet (storageMode: lockedEnvironment)
assayData: 2197815 features, 59 samples
  element names: channel1, channel2
protocolData
  rowNames: LT290677RU_D1_2011-02-16 LT286300LU_D1_2010-07-24 ...
    LT003990RU_D1_2010-11-04 (59 total)
  varLabels: filenamesChannel1 filenamesChannel2 dates1 dates2
  varMetadata: labelDescription channel
phenoData
  rowNames: LT290677RU_D1_2011-02-16 LT286300LU_D1_2010-07-24 ...
    LT003990RU_D1_2010-11-04 (59 total)
  varLabels: sampleID tissue ... Annotation (5 total)
  varMetadata: labelDescription channel
featureData: none
experimentData: use 'experimentData(object)'
Annotation: pd.feinberg.hg18.me.hx1

$v1.1
TilingFeatureSet (storageMode: lockedEnvironment)
assayData: 2197815 features, 17 samples
  element names: channel1, channel2
protocolData
  rowNames: LT282562RM_D1_2010-11-22 LT280646RU_D1_2010-11-22 ...
    LT093297LU_D1_2010-11-12 (17 total)
  varLabels: filenamesChannel1 filenamesChannel2 dates1 dates2
  varMetadata: labelDescription channel
phenoData
  rowNames: LT282562RM_D1_2010-11-22 LT280646RU_D1_2010-11-22 ...
    LT093297LU_D1_2010-11-12 (17 total)
  varLabels: sampleID tissue ... Annotation (5 total)
  varMetadata: labelDescription channel
featureData: none
experimentData: use 'experimentData(object)'
Annotation: pd.feinberg.hg18.me.hx1

I want to merge rawData$v1 and rawData$v1.1 since they are consistent each other.

I was trying to use "merge" function as merge(rawData$v1, rawData $v1.1) but it failed with error as

Error in as.data.frame.default(x) :
cannot coerce class 'structure("TilingFeatureSet", package = "oligoClasses")' into a data.frame Calls: merge ... merge.default -> merge -> as.data.frame -> as.data.frame.default

Can you please help with some advices?

Thanks,

Best regards,

Seungyeul Yoo

Postdoc Fellow,
Institute of Genomics and Multiscale Biology



David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to