Displaying 20 results from an estimated 4000 matches similar to: "How to create something between a script and a package"
2009 Feb 13
1
Write and Load functions from an external file
Hi All,
Would be grateful,if anyone can answer my queries.
I need to share code. For example, if I am working in C/C++, I would put
some function declarations in .h files that you would include. In PHP, I
would create files with the common functions in them and then "include()"
them. So far, I haven't been able to figure out what the standard practice
is in R.
The two options
2007 Oct 15
4
Get the last 3 chars of a string
I want to extract the last 3 letters of a string.
So far, I've done this:
> symbol = 'XYZ.VX"
> substr(symbol,nchar(symbol)-2,nchar(symbol))
[1] ".VX"
It works, but the code looks UGLY as hell. Am I missing something? Or
is this the way it's supposed to be?
Thanks,
Sergio
On 10/15/07, pintinho <diego at bpgomes.com> wrote:
>
> Hi everyone,
>
2006 Apr 17
4
R debugging options
Hello,
What options are available for me to debug my R scripts? For example I
normally do something like
>source("myfunctions.R")
>function1("height", "weight")
myfunctions.R is a large R source file that contains many functions. function1
is the "main" function in myfunctions.R. It calls many other user-written
functions that are also in
2000 Sep 28
2
organizing work; dump function
> Dear R-users!
>
> I am using R 1.0.0 and Windows NT 4.0
>
In the past I have used several different working directories for different
projects, and during many of these projects I have written some functions
for particular purposes. Now I thought I would be nice to have all these
"personal" functions collected in one place, and to make them available in R
no matter which
2011 Jun 30
2
error building package: packaging into .tar.gz failed
I am trying to build a package using windows xp. Here is the error I am getting:
R CMD build myfunctions
* checking for file 'myfunctions/DESCRIPTION' ... OK
* preparing 'myfunctions':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'myfunctions_1.0.tar.gz'
2011 Nov 10
2
Error with Source()
Hi everybody,
I started to receive a weird message in R that I have never seen
before...also I haven't found anything on google or on this forum about it.
Whenever I use the command source(...) to point to one of my scripts, I get
the following message:
Error in source("myfunctions.R") : myfunctions.R:884:9: unexpected symbol
883:
884: cond
^
I am
2010 Dec 09
3
Where is my file?
I have a file whose name is
f:\Ralph-Rails-Apps\myproject\public\documentation\marketing\myproject-Upgrade-and-Update-Policy.htm
on my Windows machine
I have attempted to open this file (which I know exists) in my
controller using a variety of names to no avail.
/public/documentation/marketing/myproject-Upgrade-and-Update-Policy.htm
2007 Feb 08
2
Defining functions in separate file...
Hello, is it possible to define functions in a file, say, myfunctions.R,
and import them into R -- into the top-level namespace? I've seen in the
documentation that you can create packages, but this seems very
heavy-duty, as it requires me to createa subdirectory, and various other
files.
TIA
Martin
2008 Oct 13
2
rsync error: Error in socket IO(code 10) at clientserver.c(122)
Hi,
I am using cwrsync ver 2.1.5 over SSH to connect to
myproj@sourceforge.net and facing
some problems and not sure how to go about it. Below is the full text of the
result when I run the batch file. Was wondering if anyone has seen any
similar issue. Any thoughts/help is much appreciated.
------------------------------------------------
Tunnel: ssh
Command to run: "C:\Program
2007 Nov 01
5
Can''t delete app/helpers
I would like to remove some unused helpers from the app/helpers dir, but
when I do so my specs fail.
Why is this? I don''t see where those helpers are referenced within the
tests. Is there a way to delete these unused files?
Thanks
--
Posted via http://www.ruby-forum.com/.
2006 May 05
1
RadRails and path issues
I have been using RadRails as my editor for Ruby development. Overall
I''m pretty happy with it. I''m experiencing a couple of path problems
though when using it.
Inside of my project within RadRails I will have a directory structure
that looks similar to this.
+MyProject
++src
+++src_sub_directories
++props
++output
..misc files
RadRails then treats all files within the src
2015 Dec 21
3
lldb -c corefile get segmentation fault on centos7
Hi,
I build llvm+clang+lldb 3.7 successfully on centos7, and lldb -p PID works
pretty well. However when I tried lldb -c corefile executable_bin, lldb
itself core dumpped. Attached the following core info which is debugged by
gdb:
[root at dn-cn-controller-4fbd4 data1]# lldb -c a.corefile
/usr/local/myproject/bin/cnode
*(lldb) target create "/usr/local/myproject/bin/cnode" --core
2009 Oct 21
3
Rails generator fails to generate all files
Hi
Ive lost all idea of why this can happen
I normally use rails to generate a new project
rails myproject -d mysql
inside the myproject directory normally there would be a file called
application.html.erb, with in the public directory a file called
style.css
Now I dont get anything at all, they are missing
All my previous projects have those files,
using 2.3.4 Ruby 1.9.1 Windows
Any
2011 Sep 09
4
Please explain your workflow from R code -> package -> R code -> package
Hi,
I'm asking another one of those questions that would be obvious if I
could watch your work while you do it.
I'm having trouble understanding the workflow of code and package maintenance.
Stage 1. Make some R functions in a folder. This is in a Subversion repo
R/trunk/myproject
Stage 2. Make a package:
After the package.skeleton, and R check, I have a new folder with the
project
2006 Aug 18
2
Please help with subclipse in radrails
I''ve been wrestling with this all night, I''m hoping someone can help. I
followed the exact steps in:
http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion
..but when I open a new ''Checkout project from SVN'' in RadRails, it opens up
the second level dirs as the project dirs (ie. app, log, script, etc),
leaving me with a mess of projects.
I redid
2003 Jan 06
8
PXE booting
Hi!
I have been using pxelinux with memdisk to boot our workstations with
our custom floppy, which is a MSDOS boot disk (actually it is win98)
On one of the PC's I'm testing, a Fujitsu-Siemens which has an AMDtek
based on-board network card and when PXE is activated,
it gets an IP from the DHCP, then it finds the TFTP server, downloads
pxelinux.0, executes it which causes the floppy to
2015 Apr 30
2
R CMD check and missing imports from base packages
On Wed, Apr 29, 2015 at 8:12 PM, Paul Gilbert <pgilbert902 at gmail.com> wrote:
>
> As I recall, several packages mask the simulate generic in stats, if you
> are looking for examples.
>
FWIW, here is a list of base* functions masked** by CRAN packages:
https://github.com/gaborcsardi/rfunctions/blob/master/rfunctions.md
Look at the long table in the end. simulate indeed comes up
2008 Nov 25
1
[LLVMdev] AddReadAttrs vs. TargetMachine?
Hi,
I want to invoke the AddReadAttrs pass with my software backend
(derived from TargetMachine like CBackend).
CBackend uses addPassesToEmitWholeFile-method for invoking several
passes. I tried to use the same method, but it failed on runtime.
Running llc with my backend produces (mac os x 10.5 and llvm 2.4):
dyld: lazy symbol binding failed: Symbol not found:
2006 Dec 08
5
Remove " from a string
Hi all!
I have lots of functions called in the following pattern
'NameOfFunctionNumber' where the name always stays the same and the number
varies from 1 to 98.
Another function which I run in advance returns the number of the function
which has to be called next.
Now I want to combine 'NameOfFunction' with the 'Number' returned so that i
can call the desired function.
I
2004 Jul 10
10
Syslinux 2.10 does not load initrd anymore
Hello all,
I just installed syslinux 2.10 on my usb-stick. It still boots then, but
doesn't load initrd.gz (same config file..).
Reverting back to syslinux 2.09 works fine, eg: initrd.gz is loaded.
Something changed in initrd handling code?
greetz,
Jaap Crezee
NB I am willing to share you more information or hints how to solve the
problem.
I am using kernel 2.6.7-bk20