Hi Jim,
xyz_function<-function(arguments)
> {
> some code
pair_raw_data<-changeMissingValuestoNA(pair_raw_data$matrix,pair_raw_data$dim,missing_values)
>
> return(list(matrix=pair_raw_data))
> }
Type of my dataset was a "list".I tried checking that ,changing my dataset
to some other types.
Thanks
Moumita
On Fri, May 22, 2009 at 7:11 PM, Moumita Das
<[email protected]>wrote:
>
> Hi friends,
> I have a query regarding na.omit function.Please ,someone help me.
>
> I have a function
> xyz_function<-function(arguments)
> {
> some code
> return(list(matrix=dataset))
> }
>
> xyz_function_returnvalue<-xyz_function(passed argumentss)
>
> *Case-I*
>
> xyz_function_returnvalue_deletingNArows<-na.omit((xyz_function_returnvalue))
> *Case-II*
>
>
> xyz_function_returnvalue_dataframe_deletingNArows<-na.omit(as.data.frame((pair_raw_data$matrix)))
>
> Both case I and II don't work.My dataset has rows with NA values,that's for
> sure.
>
>
>
> Whereas this simple code,works fine.I mean from the data frame the rows
> containing NA values could be easily deleted.
>
> DF <- data.frame(x = c(1, 2, 3), y = c(0, 10, NA))
> DF<-na.omit(DF)
> print(DF)
>
> --
> Thanks
> Moumita
>
--
Thanks
Moumita
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.