संक्षिप्त उत्तर यह है कि आप xts:::align.time.xts
फ़ंक्शन की तलाश में हैं।
लंबा उत्तर आप पा सकते हैं कि जो तरीकों methods
फोन करके align.time
के लिए मौजूद है:
> methods(align.time)
[1] align.time.POSIXct* align.time.POSIXlt* align.time.xts*
Non-visible functions are asterisked
यह आपको बताता है एक विधि align.time.xts
कि नाम स्थान से निर्यात नहीं कर रहा है नहीं है। इस बिंदु पर आप शायद अनुमान लगा सकते हैं कि यह पैकेज xts
में पाया जा सकता है, लेकिन आप इस बात की पुष्टि कर सकते हैं कि getAnywhere
साथ:
> getAnywhere("align.time.xts")
A single object matching 'align.time.xts' was found
It was found in the following places
registered S3 method for align.time from namespace xts
namespace:xts
with value
function (x, n = 60, ...)
{
if (n <= 0)
stop("'n' must be positive")
.xts(x, .index(x) + (n - .index(x)%%n), tzone = indexTZ(x),
tclass = indexClass(x))
}
<environment: namespace:xts>
आप, ज़ाहिर है, स्रोत सीधे पढ़ सकते हैं, लेकिन समारोह के बाद से : // www निर्यात नहीं किया है, तो आप package:::function
(यानी तीन कोलन) का उपयोग करने की जरूरत है:
> xts:::align.time.xts
function (x, n = 60, ...)
{
if (n <= 0)
stop("'n' must be positive")
.xts(x, .index(x) + (n - .index(x)%%n), tzone = indexTZ(x),
tclass = indexClass(x))
}
<environment: namespace:xts>
भी देखें यह बहुत ही इसी तरह के प्रश्न: http://stackoverflow.com/q/5835312/602276 http की – Andrie
सर्किल 7। burns-stat.com/pages/Tutor/R_inferno.pdf आपको प्राप्त करने में मदद कर सकता है जेनेरिक कार्यों और विधियों के बारे में एक भावना है। –
@ पैट्रिकबर्न धन्यवाद, यह एक उपयोगी पढ़ने की तरह दिखता है। –