Displaying 20 results from an estimated 1100 matches similar to: "Passing arguments from a function within another function"
2006 Jun 29
1
Problems Creating an R package
Hi all,
When I check my package using "Rcmd check ..\myPackage\R.mykg" on Windows in
Command Prompt, this is what get:-
* using log directory 'C:/R/bin/R.getdata.Rcheck'
* using Version 2.3.1 (2006-06-01)
* checking for file 'R.getdata/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'R.getdata' version '1.0'
* checking
2006 Jun 29
1
Passing argument in nested function calls
Please, do not ask why you would do this. I have simplified my complicated
code to just the basic problem occuring to be able to make it easier to
understand the actual problem.
I have two function getArgs() and extractArgs() - code and test results
provided below.
I test them using getArgs(id = 's1002') from the command line.
getArgs() prints the name of the argument as id and the
2011 Mar 18
1
help please: put output into dataframe
Dear R community members
I have been struggling on this simple question, but never get appropriate
solution. So please help.
# my data, though I have a large number of variables
var1 <- rnorm(500, 10,4)
var2 <- rnorm(500, 20, 8)
var3 <- rnorm(500, 30, 18)
var4 <- rnorm(500, 40, 20)
datafr1 <- data.frame(var1, var2, var3, var4)
# my unsuccessful codes
nvar <- ncol(datafr1)
2006 Jan 26
7
Print Migrator help needed...
Hi,
I am trying to migrate print queues from a windows server to a samba
share.
1. I ran printmig.exe on the windows server.
2. Backed up the printers on the windows servers to a cab file.
3. Tries to restore the printers to the sambashare by specifying the
target as //sambaShare.
But I get the following error:
2006:01:25 15:35:38 Access Granted to: \\sambaShare
2006:01:25 15:35:38
2004 Mar 24
2
debugging a code
Hello
just learned HowTo but R, reminded me with the way
Perl does it but with much less on-line commands, R
"AFAIK" has n, c, Q and where and cann't debug outside
the {}.
1) is there a more versatile/flexable debugging method
for R?
I have saved 2 functions in an ASCII file "digfun".
"getdata" function calls "squash" function and both
use loops. In
2006 Jan 23
3
guest account security = domain doesn't work...
Hi,
my security is domain, i would like to map users who fail authentication
to be
mapped to a guest account so they can access printers.
My conf file looks like this:
[global]
workgroup = LAB2000DOMAIN2
security = DOMAIN
client schannel = No
map to guest = Bad Password
password server = 10.86.32.27
log level = 4 passdb:5 auth:10 winbind:4
2013 Sep 24
2
how to mount /dev/shm on system container
i have create a system container test1 and trying to mount /dev/shm inside
a container
<domain type='lxc'>
<name>test1</name>
<memory>102400</memory>
<os>
<type>exe</type>
<init>/sbin/init</init>
</os>
<vcpu>1</vcpu>
<devices>
<console type='pty'/>
2003 Jan 30
2
Weird options(digits=n) behaviour
I noticed some very weird behaviour of the function: options(digits=n),
where n is the number of digits you would expect to get in R calculations.
Let's take a example:
> options(digits=4)
> getdata(caso.pool.k3.r3.e2)
[1] 6.053 2.641 -3.639 14.259 6.082
Which works fine... now, trying again, with different data:
> options(digits=4)
> getdata(controle.pool.k3.r3.e2)
2004 Feb 28
1
when .Call can safely modify its arguments
Hi,
"Writing R Extensions Guide" clearly states that a C-function interfaced
via .Call() should not modify any of its arguments. However I wonder if
there are exceptions to this rule, i.e. when .Call can safely modify the
arguments. For example when a function creates a list that is then
populated by a call to a C function:
getData <- function() {
data <- list(a=double(2),
2012 Mar 28
2
Making Knitr work
Might not be the best place to ask, but i could get lucky..
I have setup an eclipse environment to write sweave files lately and wanted to switch to knitr. I could get it to work on easy files, but my earlier written sweave file fails to be knit properly.
Here is the error message:
Quitting from lines 273-276: Error in setwd(base.dir) : kann Arbeitsverzeichnis nicht wechseln (it says: cannot
2012 Jan 27
1
Overimposing one map in ssplot onto another
Hello!
I have 2 maps - both created in ssplot and both identical in terms of
outline. Is there any way to superimpose Map1 (which has black borders
between Canadian provinces) onto Map2 (which is also a map of Canada)?
Thanks a lot for your hints!
Dimitri
### A. Reading in Canada data at the province and then at the county level:
library(raster)
getData('ISO3') # Canada's code is
2012 Nov 06
1
how Can make function for selecting the products
HI.
I make this code:
getdata<-function('a','b','c' ,'d','e','f'){
drv <- dbDriver("SQLite")
con<-dbConnect(drv, "sqlite.db")
lt<-dbListTables(con)
myf<-data.frame(NULL)
for (i in 1:length(lt))
{
myfile<-dbReadTable(con,lt[i])
myfile1<-myfile[-c(14:44)]
myfile1$MODEL<-gsub(" ",
2007 Jun 14
2
connecting to DB2 database
Hi,
i am trying to connect to a DB2 server using the DBI library.
getData <- function()
{
driver <- dbDriver("DB2")
conn <- dbConnect(driver,"server","uname","pword")
data <- dbSendquery(conn, "select etc.")
}
When I run the function, i get the error
> data <- getData()
Error in
2017 Sep 21
1
Improve ScopedPrinter::printNumber? (was: [llvm] r313816 - [llvm-readobj] Fix 'Teach readobj to dump .res files'.)
Seeing the below commit, I wondered whether that's a genuine fix or
rather a workaround for a shortcoming in llvm::ScopedPrinter::printNumber.
The latter has overloads for [u]int{8,16,32,64}_t, presumably so that it
can take arguments of arbitrary integer types. However, at least on
recent macOS uint64_t is 'unsigned long long' (and uint32_t is 'unsigned
int') while
2006 Nov 17
1
Manipulating R lists in C
Hi,
I have been studying the R manual on lists but cannot seem to create a
simple R list in C - I keep on getting "'dimnames' applied to non-array"
whenever I attempt to assign names to the list elements:
Wanted output a list structure something like
[ type="Bid", price=2.0, volume=1000 ]
I can get up to a list of
[ "Bid2, 2.0, 1000 ]
But for the life of
2016 Aug 29
2
Publication
Hi,
Can you add the following two publications from our group to the LLVM
publications page.
-
*Alive-FP: Automated Verification of Floating Point Based Peephole
Optimizations in LLVM [pdf]
<http://www.cs.rutgers.edu/~santosh.nagarakatte/papers/alive-fp-sas16.pdf>
*David
Menendez, Santosh Nagarakatte, and Aarti Gupta
*To Appear in the Proceedings of the 23rd Static Analysis
2008 Nov 30
2
Snow and multi-processing
Dear R gurus,
I have a very embarrassingly parallelizable job that I am trying to speed up with snow on our local cluster. Basically, I am doing ~50,000 t.test for a series of micro-array experiments, one gene at a time. Thus, I can easily spread the load across multiple processors and nodes.
So, I have a master list object that tells me what rows to pick up for each genes to do the t.test from
2004 Mar 27
1
building a list in loop
Hello
getdata <- function(p){
fname <- NULL; dl <- list()#build the sturcture
builddl <- function(q,s){
fname <<- c(fname,s) #where "s" is a string
dl <<- list( dl, dt2)
}
list(names = fname, data = dl)
}
data <- getdata("c:\somepath")
> data
$names
[1] "fname"
$data
$data[[1]] <--- since there is no [[1]] how can I
stop
2009 Oct 01
5
How to use Subpopulation data?
Dear Helpers
I have a sample frame and i have sampled from it using three methods and now i want to calculate the statistics but i only get the population parameters.
H <- matrix(rnorm(100, mean=50000, sd=5000))
sampleframe=data.frame(type=c(rep("H",100)),value=c(H))
sampleframe
str=strata(sampleframe,c("type"),size=c(20,), method="srswor")
2013 Nov 14
1
UTS namespace
Hello,
I am trying to set up UTS name space on centos 6.4 LXC container.
one method is that we set the host name in /etc/sysconfig/network.
hostname=test1
Is there any way so that i can set the hostname in libvirt xml while
creating a container?
I know using lxc-tools we can set hostname while creating by 2 ways
- first while creating container using lxc-create -u test1
- Second by specifying