error at R CMD check

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

error at R CMD check

carol white
Hi,
I generated an R package but at running R CMD check, I got the following error message for the first data file:

*** installing help indices
 >>> Building/Updating help pages for package 'jamda'
     Formats: text html latex example
  f1                           text    html    latex   example
  f2                            text    html    latex   example
 f3                                 text    html    latex   example
  f4                            text    html    latex   example
  f5                            text    html    latex   example
  f6                      text    html    latex   example
too many pairs of braces in file 'data1.Rd' at /usr/lib64/R/share/per
l/R/Rdconv.pm line 295, <$rdfile> line 7076.
ERROR: building help failed for package ‘my_package’

Should the data sets be in a specific format? Mine contains data in float seperated by tab with column names and row names. No description in DESCRIPTIOn file yet.

Thanks

Carol





______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: error at R CMD check

Duncan Murdoch
carol white wrote:

> Hi,
> I generated an R package but at running R CMD check, I got the following error message for the first data file:
>
> *** installing help indices
>  >>> Building/Updating help pages for package 'jamda'
>      Formats: text html latex example
>   f1                           text    html    latex   example
>   f2                            text    html    latex   example
>  f3                                 text    html    latex   example
>   f4                            text    html    latex   example
>   f5                            text    html    latex   example
>   f6                      text    html    latex   example
> too many pairs of braces in file 'data1.Rd' at /usr/lib64/R/share/per
> l/R/Rdconv.pm line 295, <$rdfile> line 7076.
> ERROR: building help failed for package ‘my_package’
>
> Should the data sets be in a specific format? Mine contains data in float seperated by tab with column names and row names. No description in DESCRIPTIOn file yet.
>  

data1.Rd shouldn't be a dataset, it should be a help file describing a
dataset.

In a more recent version of R you might get a more informative error
message, telling you where the error was in that file.

Duncan Murdoch

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

carol white
Hi,
I could finally create an R package. I was suprised to notice that when I want to update a function, even if it is updated in package_name/R/function.R and after build but it is not updated when the package is loaded. I see that the tar.gz file is updated but when I load the package, I get the old version. The only solution that I found was to update in R session and rerun package.skeleton, build etc. Why the update doesn't work directly in R folder?

Cheers,

Carol

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

Duncan Murdoch-2
On 18/04/2010 7:52 AM, carol white wrote:
> Hi,
> I could finally create an R package. I was suprised to notice that when I
want to update a function, even if it is updated in
package_name/R/function.R and after build but it is not updated when the
package is loaded. I see that the tar.gz file is updated but when I load the
package, I get the old version. The only solution that I found was to update
in R session and rerun package.skeleton, build etc. Why the update doesn't
work directly in R folder?

Generally package creation is a topic for the R-devel mailing list; if you
have further questions, please continue there.

Building a package doesn't install it.  You need to install the package
after changes.  (You probably won't be able to install it while it is in
use; it's possible to unattach a package that is in use, but it's tricky,
and I find it is generally easier to quit the session, install the new
version, then restart R.)

You should never have to run package.skeleton more than once per package,
and it could be harmful to do so, because you are expected to make changes
to the skeleton after it is created before you have a finished package.
package.skeleton() could make you lose those changes.

Duncan Murdoch

P.S. I'm having email problems at my regular [hidden email] address,
so may be slow replying to messages sent there.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

cberry
In reply to this post by carol white
On Sun, 18 Apr 2010, carol white wrote:

> Hi, I could finally create an R package. I was suprised to notice that
> when I want to update a function, even if it is updated in
> package_name/R/function.R and after build but it is not updated when the
> package is loaded. I see that the tar.gz file is updated but when I load
> the package, I get the old version. The only solution that I found was
> to update in R session and rerun package.skeleton, build etc. Why the
> update doesn't work directly in R folder?

Perhaps this is relevant?


?library

...

Details:


       ...

  (Furthermore, if the package has a name
      space and a name space of that name is already loaded, they work
      from the existing name space rather than reloading from the file
      system.  If you want to reload a package, call .detach. or
      .unloadNamespace. first.)


HTH,

Chuck

>
> Cheers,
>
> Carol
>
> ______________________________________________
> [hidden email] 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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:[hidden email]            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

Uwe Ligges-3
In reply to this post by carol white


On 18.04.2010 13:52, carol white wrote:
> Hi,
> I could finally create an R package. I was suprised to notice that when I want to update a function, even if it is updated in package_name/R/function.R and after build but it is not updated when the package is loaded. I see that the tar.gz file is updated but when I load the package, I get the old version. The only solution that I found was to update in R session and rerun package.skeleton, build etc. Why the update doesn't work directly in R folder?


Well, you need to *install* the package, just *build*ing the source
tarball is not sufficient here.

Uwe Ligges


> Cheers,
>
> Carol
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

carol white
In reply to this post by Duncan Murdoch-2
Don't you use package.skeleton to add functions or data to an existing package? Othewise, what is the safer way?




You should never have to run package.skeleton more than once per package, and it could be harmful to do so, because you are expected to make changes to the skeleton after it is created before you have a finished package.  package.skeleton() could make you lose those changes.


Duncan Murdoch

P.S. I'm having email problems at my regular [hidden email] address, so may be slow replying to messages sent there.




     
        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

Duncan Murdoch-2
On Sun, Apr 18, 2010 at 2:53 PM, carol white <[hidden email]> wrote:
>
> Don't you use package.skeleton to add functions or data to an existing package? Othewise, what is the safer way?

You can use prompt() to create the outline of the documentation page.
I would just copy the file containing a function's source into the R
directory of the package.

Data is a little more complicated, because there are lots of different
possible formats for it.  What format is your data originally?

Duncan Murdoch

>
>
>
> You should never have to run package.skeleton more than once per package, and it could be harmful to do so, because you are expected to make changes to the skeleton after it is created before you have a finished package.  package.skeleton() could make you lose those changes.
>
> Duncan Murdoch
>
> P.S. I'm having email problems at my regular [hidden email] address, so may be slow replying to messages sent there.
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

carol white
text format only.

--- On Sun, 4/18/10, Duncan Murdoch <[hidden email]> wrote:

> From: Duncan Murdoch <[hidden email]>
> Subject: Re: [R] update of a function
> To: "carol white" <[hidden email]>
> Cc: [hidden email], [hidden email]
> Date: Sunday, April 18, 2010, 12:22 PM
> On Sun, Apr 18, 2010 at 2:53 PM,
> carol white <[hidden email]>
> wrote:
> >
> > Don't you use package.skeleton to add functions or
> data to an existing package? Othewise, what is the safer
> way?
>
> You can use prompt() to create the outline of the
> documentation page.
> I would just copy the file containing a function's source
> into the R
> directory of the package.
>
> Data is a little more complicated, because there are lots
> of different
> possible formats for it.  What format is your data
> originally?
>
> Duncan Murdoch
>





______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

Duncan Murdoch-2
On Sun, Apr 18, 2010 at 3:40 PM, carol white <[hidden email]> wrote:
> text format only.

You just copy those into the data subdirectory, assuming you're using
one of the formats listed in the "Data in packages" section of Writing
R Extensions, and have named it as described there.

Duncan Murdoch

>
> --- On Sun, 4/18/10, Duncan Murdoch <[hidden email]> wrote:
>
>> From: Duncan Murdoch <[hidden email]>
>> Subject: Re: [R] update of a function
>> To: "carol white" <[hidden email]>
>> Cc: [hidden email], [hidden email]
>> Date: Sunday, April 18, 2010, 12:22 PM
>> On Sun, Apr 18, 2010 at 2:53 PM,
>> carol white <[hidden email]>
>> wrote:
>> >
>> > Don't you use package.skeleton to add functions or
>> data to an existing package? Othewise, what is the safer
>> way?
>>
>> You can use prompt() to create the outline of the
>> documentation page.
>> I would just copy the file containing a function's source
>> into the R
>> directory of the package.
>>
>> Data is a little more complicated, because there are lots
>> of different
>> possible formats for it.  What format is your data
>> originally?
>>
>> Duncan Murdoch
>>
>
>
>
>
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

carol white
But shouldn't they be with rda extension like other data sets in data folder?

--- On Sun, 4/18/10, Duncan Murdoch <[hidden email]> wrote:

> From: Duncan Murdoch <[hidden email]>
> Subject: Re: [R] update of a function
> To: "carol white" <[hidden email]>
> Cc: [hidden email], [hidden email]
> Date: Sunday, April 18, 2010, 12:48 PM
> On Sun, Apr 18, 2010 at 3:40 PM,
> carol white <[hidden email]>
> wrote:
> > text format only.
>
> You just copy those into the data subdirectory, assuming
> you're using
> one of the formats listed in the "Data in packages" section
> of Writing
> R Extensions, and have named it as described there.
>
> Duncan Murdoch

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: update of a function

Duncan Murdoch-2
On Sun, Apr 18, 2010 at 4:05 PM, carol white <[hidden email]> wrote:
> But shouldn't they be with rda extension like other data sets in data folder?

You can use text format or rda format.  Read the manual.

Duncan Murdoch

>
> --- On Sun, 4/18/10, Duncan Murdoch <[hidden email]> wrote:
>
>> From: Duncan Murdoch <[hidden email]>
>> Subject: Re: [R] update of a function
>> To: "carol white" <[hidden email]>
>> Cc: [hidden email], [hidden email]
>> Date: Sunday, April 18, 2010, 12:48 PM
>> On Sun, Apr 18, 2010 at 3:40 PM,
>> carol white <[hidden email]>
>> wrote:
>> > text format only.
>>
>> You just copy those into the data subdirectory, assuming
>> you're using
>> one of the formats listed in the "Data in packages" section
>> of Writing
>> R Extensions, and have named it as described there.
>>
>> Duncan Murdoch
>
>
>
>
>

______________________________________________
[hidden email] 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.