[R] about dpik

arun smartpink111 at yahoo.com
Tue Jul 17 05:40:37 CEST 2012


Hello,

If I understand correctly, you are getting error messages when you have a lot of elements in the vector.

You can save your vector in a file.txt and use source() to call it.
For. e.g. I saved a long vector (~1787 elements) in code.txt file. 

 dat1<-source("code.txt")
dat1<-dat1$value
is.vector(dat1)
[1] TRUE
 head(dat1)
[1] "X12002" "X12027" "X12054" "X12084" "X12085" "X12115"

A.K.





----- Original Message -----
From: chester123 <chester123 at live.cn>
To: r-help at r-project.org
Cc: 
Sent: Monday, July 16, 2012 4:26 PM
Subject: [R] about dpik

Thank you for your reply.

I know the x in dpik() means the vector. But I don't know how to import into
c() with a huge metadata (>1000).

Following is my some try, and the h is: [1] 0.001180569, which seems to be
feasible.

x<-c(-0.00109349389485645,-0.00145304131152137,0.00023685387037116,0.00579094886320110,0.00032117330426379,0.00363758302533228,-0.00113344327121731,0.00104726223729409)
library(KernSmooth)
h<-dpik(x,scalest="minim",level=2L,kernel="normal",canonical=FALSE,gridsize=401L,range.x=range(x),truncate=TRUE)
h

But the point is how to import more than 1000 numbers into the c() to
vectorize them?

Thanks

Regards


--
View this message in context: http://r.789695.n4.nabble.com/about-dpik-tp4636695.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at 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.




More information about the R-help mailing list