Displaying 3 results from an estimated 3 matches for "isnumer".
Did you mean:
isnumber
2006 May 16
2
Using REGEX function
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Arial">Greetings,<br>
<br>
I'm running
2006 Aug 17
2
getting sapply to skip columns with non-numeric data?
getting s-apply to skip columns with non-numeric data?
I have a dataframe ?x? of w columns.
Some columns are numeric, some are not.
I wish to create a function to calculate the mean and
standard deviation of each numeric column, and then
?bind? the column mean and standard deviation to the
bottom of the dataframe.
e.g.
tempmean <- apply(data.frame(x), 2, mean, na.rm = T)
xnew <-
2003 Feb 20
2
is.numeric
Hi,
I have a vector, which contains both strings and numbers, e.g.
> foo <- c("str1",1234,"str2",0.9876)
I want to know if a distinct element of the vector is a string or a number and
took "is.numeric", but
> is.numeric(foo[2])
[1] FALSE
because R treats the numbers in a mixed vectors as strings:
> foo
[1] "str1" "1234"