[R] Problem with package development

2011-05-31 Thread Nipesh Bajaj
Dear all, I am having a strage problem while I was trying to build a package. Here is my package skeleton: fn1 <- Vectorize(function(x,y,z) { return(x + y +z) }, vectorize.args = c("x"), SIMPLIFY = TRUE) package.skeleton("trial3",namespace = TRUE) However

Re: [R] Problem with package development

2011-05-31 Thread Nipesh Bajaj
with this job, I could create package effectively. After updating R to the current version my problem starts. Those are not sufficient? Thanks, On Wed, Jun 1, 2011 at 1:09 AM, Duncan Murdoch wrote: > On 11-05-31 3:36 PM, Nipesh Bajaj wrote: >> >> Dear all, I am having a strage pro

Re: [R] Problem with package development

2011-05-31 Thread Nipesh Bajaj
Rcheck', reason . Error in printLog(Log, "", text, "\n"): object 'Log' not found Execution haulted Why I am getting this error? what is that "Log". I will really appreciate if somebody please help me to figure out. Thanks, On Wed, Jun 1, 2011 a

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
d_package(‘trial1′,….)” Execution halted ERROR: loading failed What I have missed in this process? Can you please help me how to solve this issue? Thanks, PS: I am sorry I missplet 'Program Files'. Thanks Prof. Ripley for this pointer. On Wed, Jun 1, 2011 at 11:41 AM, Prof Brian Ripley

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
e point me? Thanks, On Thu, Jun 2, 2011 at 11:40 PM, Duncan Murdoch wrote: > On 02/06/2011 2:03 PM, Nipesh Bajaj wrote: >> >> Thanks Prof. Ripley and Duncan for your pointers. Noting down your >> points I have modified my way of building package and have done >> followi

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
FALSE, : pdflatex is not available Error in running tools:: texi2dvi Does this information hwlp you to suggest something? Please let me know what else I can provide. Thanks, On Fri, Jun 3, 2011 at 12:00 AM, Nipesh Bajaj wrote: > What else I need to do? In the Read-and-delete-me file followi

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
, 2011 at 2:55 AM, steven mosher wrote: > I hope you're successful because I'm having issues as well building a simple > package on > windows.  maybe when you're finished  you can share back a step by step > guide. > > On Thu, Jun 2, 2011 at 12:21 PM, Nipesh Bajaj wr

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
html#The-Windows-toolset > > In addition, googling for "building R packages on Windows" turns up > very many detailed guides for going through the process, including > discussions of what additional software you need and how to install > it. > > Sarah > > On Thu,

[R] package.skeleton() does not create 'data' folder

2011-06-08 Thread Nipesh Bajaj
Hi again, I was using package.skeleton() function to create the skeleton of my package in windows. Here is my attempt: rm(list = ls()) setwd("F:/R_PackageBuild") package.skeleton("trial1", namespace = TRUE, code_files = "F:/R_PackageBuild/trial.r") In the trial.r file, there are 2 objects, one is

[R] package.sk​eleton() does not create 'data' folder

2011-06-09 Thread Nipesh Bajaj
Hi again, yesterday I mailed this query however I could not see this on the mail list. Therefore, I am reposting it again. I was using package.skeleton() function to create the skeleton of my package in windows. Here is my attempt: rm(list = ls()) setwd("F:/R_PackageBuild") package.skeleton("tria

[R] Fwd: package.sk​eleton() does not create 'data' folder

2011-06-10 Thread Nipesh Bajaj
Dear all, somebody please look into my problem here? Does it not contain sufficient information? Please let me know how can I post my question more complete. Thanks, -- Forwarded message -- From: Nipesh Bajaj Date: Fri, Jun 10, 2011 at 12:57 AM Subject: package.sk​eleton() does

[R] A question on Duplicating

2011-02-09 Thread Nipesh Bajaj
Hello I am struggling to accomplice an idea which is as follows: I have a vector say: a <- c("a", "b", "c", "a") and another: b <- c("m", "n", "o", "m"). Length of those 2 vectors are essentially be same. Here task is to check the duplicates in the vector 'a' and then to check whether any duplicat

[R] Finding length of unique numbers in a vector

2011-02-10 Thread Nipesh Bajaj
Hello there, would you please look into my codes? Here I have following: > set.seed(100) > samp <- sample(c(1,-1,0), 20, replace=T); samp [1] 1 1 -1 1 -1 -1 0 -1 -1 1 -1 0 1 -1 0 0 1 -1 -1 0 Here I want to calculate the length of each unique number for above vector. How can I do that?

[R] Seeking help in Package development

2011-02-19 Thread Nipesh Bajaj
Dear all, I am a new user of R and currently trying hard to develop my own package. Here I am following this tutorial 'http://www.mathfinance.cn/how-to-create-an-R-package-in-windows/' Here it says that (step 8): "open a “command prompt” window, change the directory to where your package is, type

Re: [R] Seeking help in Package development

2011-02-19 Thread Nipesh Bajaj
well. However I could not understand how I can use that. Any help will be highly appreciated. Thanks, On Sun, Feb 20, 2011 at 3:22 AM, Gabor Grothendieck wrote: > On Sat, Feb 19, 2011 at 4:39 PM, Nipesh Bajaj wrote: >> Dear all, I am a new user of R and currently trying hard to develo

Re: [R] Seeking help in Package development

2011-02-19 Thread Nipesh Bajaj
therefore find really hard on understanding different terminology given in different documentation. Thanks, On Sun, Feb 20, 2011 at 4:35 AM, Gabor Grothendieck wrote: > On Sat, Feb 19, 2011 at 5:31 PM, Nipesh Bajaj wrote: >> Thanks Gabor for your input. Here what I have done is

[R] Writing Rd files

2011-03-06 Thread Nipesh Bajaj
Hi all, I have created a package and now into writing it's help files. However I am having problem on, how to put a 'new line' in any statement of the help file? For example please consider following: \title{ This is a new function and this function will calculate the mean. } However I want to wr

[R] Seeking guidance in package creation when it contains s4 class

2011-03-06 Thread Nipesh Bajaj
Dear all, I am having problem to create a package when this package is supposed to have some newly created s4 class. Here is my workout: > #rm(list = ls()) > setClass("aClass", sealed=T, representation(slot1 = "vector", slot2 = > "character")) [1] "aClass" > fn1 <- function(x, y, z) { + x <- x[1

[R] Fwd: Seeking guidance in package creation when it contains s4 class

2011-03-08 Thread Nipesh Bajaj
Any suggestion please how I can do this? Dear all, I am having problem to create a package when this package is supposed to have some newly created s4 class. Here is my workout: > #rm(list = ls()) > setClass("aClass", sealed=T,  representation(slot1 = "vector", slot2 = > "character")) [1] "aCla

Re: [R] tryCatch - Continuing for/next loop after error

2011-03-10 Thread Nipesh Bajaj
Hi Jonathan, I was also trying to understand this tryCatch function on my own problem. Here is mine: fn1 <- function(x) { if(as.integer(x) == 5) { stop("stop") } return(x+5) } res <- matrix(

[R] Selecting subset of a given vector

2011-07-08 Thread Nipesh Bajaj
Hi there, given a numeric vector, I can select numbers within a specific range. However presently, I have something related but different problem. Suppose I have a numeric vector. Now take an arbitrary number. Goal to to chose a specific subset with a given length, from that given vector, so that t

Re: [R] gsub() with unicode and escape character

2011-07-17 Thread Nipesh Bajaj
I really sorry if I understood your statement correctly :( You said: " To put a backslash in the replacement expression of sub or gsub (when fixed=FALSE) use 4 backslashes" I understood it is okay if I want to replace something with 2 backslashes. what if I want to replace that with just 1 backsl

[R] Understanding R's "Environment" concept

2011-07-18 Thread Nipesh Bajaj
Hi all, I am trying to understand the R's "environment" concept however the underlying help files look quite technical to me. Can experts here provide me some more intuitive ideas behind this concept like, why it is there, what exactly it is doing in R's architecture etc.? I mainly need some non-t