Displaying 20 results from an estimated 30000 matches similar to: "How to see source code for na.omit?"
2008 Jan 02
2
Subsetting data frame problem....
Dear R users,
I'm new but already fascinated R user so please forgive for my
ignorance. I have the problem, I read most of help pages but couldn't
find the solution. The problem follows....
I have large data set 10,000 rows and more than 100 columns... Say
something like
var1,var2,var2,var4.......var120
-------------------------------------------
12,12,345,657,67,8.....
2008 Jan 14
2
Loading only particular columns from csv file...
Dear all,
I'm trying to process HUGE datasets with R. It's very fast, but I would like
to optimize it a bit more, by focusing one one column at time..... say file
is 1GB big and has 100 columns..... In order to prevent "out of memory"
problems.... I need to load one column at the time.... the only problem is
that read.table doesn't support this feature....
Is there some
2011 Sep 19
4
Results of applying na.omit on zoo object
I read in ?na.omit that it returns the object with incomplete cases
removed. I interpret this to mean that any zoo object row where any column
shows 'NA' will be removed from the data set.
That's not what I need, since the 'NA' represents information in my
context. However, what I would like to do is eliminate the rows where every
column is 'NA'. When I aggregate
2005 Jan 26
2
Source code for "extractAIC"?
Dear R users:
I am looking for the source code for the R function extractAIC. Type the
function name doesn't help:
> extractAIC
function (fit, scale, k = 2, ...)
UseMethod("extractAIC")
<environment: namespace:stats>
And when I search it in the R source code, the best I can find is in (R
source root)/library/stats/R/add.R:
extractAIC <- function(fit, scale, k = 2,
2009 Feb 05
4
See source code for survplot function in Design package
Dear R users,
I know one way to see the code for a hidden function, say function_x,
is using default.function_x (e.g. summary.default). But how can I see
the code for imported packages that have no namespace (in this case
Design)?
Many Thanks
Eleni
2008 May 13
2
Max consecutive increase in sequence
Hi all R helpers,
I'm trying to comeup with nice and elegant way of "detecting" consecutive
increases/decreases in the sequence of numbers. I'm trying with combination
of which() and diff() functions but unsuccesifuly.
For example:
sq <- c(1, 2, 3, 4, 4, 4, 5, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1);
I'd like to find way to calculate
a) maximum consecutive increase = 3 (from 1
2010 Jun 15
3
How to see how a function is written
Hello,
If I want to see how, say, apply function is written, how would I be
able to do that?
Just typing "apply" at the prompt does not work.
Thank you for help!
Sergey
2000 Jul 17
3
na.omit
Why is it that when a vector contains no NAs, na.omit returns an empty
vector rather than the object/vector that was passed to it?
>na.omit(c(1,2,3,4))
numeric(0)
in contrast ...
>na.omit(c(1,2,3,NA))
[1] 1 2 3
attr(,"na.action")
[1] 4
attr(,"na.action")attr(,"class")
[1] "omit"
Thanks, Alex
---------------------------
platform
2004 May 04
2
Seeing the definition of a function
Dear all,
I was trying to see how the function 'confint' is defined. Doing
> confint
function (object, parm, level = 0.95, ...)
UseMethod("confint")
<environment: namespace:stats>
does not really enlighten me. How can I get to see the implementation (I guess it should be possible according to the general philosophy of the R project)?
Thanks in advance
S??ren
2008 Jan 25
3
function code
R-help,
Sorry for this question (I guess it has been addressed before but
I could not find it in the archives)
but how can I see a function code
when the following comes up:
> svymean
function (x, design, na.rm = FALSE, ...)
{
.svycheck(design)
UseMethod("svymean", design)
}
<environment: namespace:survey>
Thanks in advance
2009 Sep 09
2
The code behind the function
Hi R users,
I have a question. How can I see the code behind the function. For example,
> boxplot
function (x, ...)
UseMethod("boxplot")
<environment: namespace:graphics>
I really would like to see how people code this. Could someone please show
me how to see the code behind the function?
Many Thanks
Tu
--
View this message in context:
2008 Jul 18
2
source code functions
>na.contiguous
function (object, ...)
UseMethod("na.contiguous")
<environment: namespace:stats>
this is what I get when I look for the source code for some functions- Is
there a way to look at the source code?
--
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like
2009 Apr 18
2
source code for prompt()
Dear R community,
pardon my ignorance but how would you get the source code for"non-visible
functions" ?
For example, I would like to see and modify the source code for the prompt()
function.
Thanks!
Markus
[[alternative HTML version deleted]]
2010 Mar 31
2
Printing the function t.test() in R
Dear R Users,
I have a question, how does one print an r function like t.test in R (to get
the whole function and not just a summary of the environment)? For example
if I type the following:
> t.test
function (x, ...)
UseMethod("t.test")
<environment: namespace:stats>
> print(t.test)
function (x, ...)
UseMethod("t.test")
<environment: namespace:stats>
I
2008 Sep 09
1
probably easy methods question
Dear R Gurus:
I want to look at the code for the t.test function. I did the following:
> t.test
function (x, ...)
UseMethod("t.test")
<environment: namespace:stats>
> getAnywhere("t.test")
A single object matching 't.test' was found
It was found in the following places
package:stats
registered S3 method for t from namespace stats
namespace:stats
with
2009 Sep 15
2
Viewing Function Code
Hi All,
I'd like to see the function code behind the barplots2() function in the
gplots package, however i come across a bit of a stumbling block of a hidden
function, can anyone help?
> library(gplots)
> methods(barplot2)
[1] barplot2.default*
Non-visible functions are asterisked
> barplot2
function (height, ...)
UseMethod("barplot2")
<environment:
2008 Oct 10
3
Atheros AR5212/AR5213 wifi not working
Hello everyone,
I'm new to the CentOS list, so forgive me if this has been answered before (someone please point me to an efficient way of searching through the list archives).
I have a wifi card from the subject line, and have the driver installed. Using NetworkManager under Gnome everything works perfectly. However, I prefer to use network service instead of NetworkManager since
a) I use
2004 Sep 27
2
Getting code for functions
Hello
Pardon for the elementary question, I did try searching the archives
with various terms, but to no avail. I am using R1.9.1 on a windows
machine
One of the great advantages of R (to me, anyway) is being able to see
the code for a function , e.g. by typing sd one sees the code for
getting a standard deviation.
However, for many functions this only provides info. including
UseMethod, eg.
2006 Nov 20
1
how to forecast the GARCH volatility?
Dear All,
I have loaded package(tseries), but when I run
predict.garch(...) R tells me could not find function
"predict.garch", however ?predict.garch shows me
something. I am confused about this. How can I
forecast garch volatility?
I have tried:
predict(...,n.ahead=...),give me fitted value
predict(...,n),give me NA,NA
2004 Mar 05
2
Internal NA removal out of Time Series with na.omit.ts()
Hi R specialists,
The na.omit.ts() method fails when the time series contains internal
NA's. How can these automatically be removed?
> spectrum(ts.mNDII, na.action=na.omit)
Error in na.omit.ts(as.ts(x)) : time series contains internal NAs
How can the na.action be activated correctly?
> acf(ts.Lin, type=c("correlation"), na.action=na.omit)
Error in na.omit.ts(as.ts(x)) :