Displaying 20 results from an estimated 800 matches similar to: "function"
2005 Dec 14
2
Append tables
R Help:
I have read a number of tables into R with identical headings and I
would now like to make a single table that has all the data appended
under this single heading line.
for example:
t1 <- read.csv("f1",header=TRUE)
t2 <- read.csv("f2",header=TRUE)
all <- c(t1,t2)
#all is now twice as wide as t1 or t2 with the same number of row!!!!
#I need to know how
2005 Dec 16
2
multiple plots per page
R-help,
I would like to place nine (3X3) plots per page. I am not properly
implement mfrow(3,3) in the script below:
jpeg("xyplot.jpg") #names output file
my_args <- commandArgs() #sets up to take args from dos batch command
mfcol(3,3) #set page for 3X3
TEMPS <- c(-15,25,85)#list of temps
VBATS <- c(3,3.6,4.7)#list of Bats
BOARDS <-
2005 Oct 26
1
(no subject)
R-Help,
I am trying to do simple plots of the characteristics of cellular
phones. I am values that fit along an axis that has many data points
around 800 and 1800. I am not interested in the "dead space' between
the two clusters of data.
I am not interested in a linear axis. I would like to "cut out" the
white space between the two pockets of data when plotting. I
2005 Oct 27
1
sorting of data
R-Help,
I am trying to reduce at data set to rows where a specified value occurs
in a specified value. Below is a screen capture of Rgui:
> nsmalldata <-read.csv("c:\\DATA\\UNITY\\\PASS0_DOWNFADE\\nsmall.csv")
> nsmalldata
BOARDNUMBER SESSIONID MATRIXID ARRAYPOINT Temperature PS1 PS2
PS13 PS14 PS15
1 LB0DC 3043 7757513 1 -9999 -9999
2007 Jun 19
1
Multiple plot jpeg file
R-Help,
I am executing a R script and would like to put multiple plots into a
single file. For some reason the contents of plotfile.jpg always seem to
contain the last plot and not all plots.
If I do same thing with pdf, a multiple plot file is created.
Can you help me?
Regards,
Bill
Bill Hunsicker
RF Micro Devices
7625 Thorndike Road
Greensboro, NC 27409-9421
bhunsicker at rfmd.com
2010 May 12
2
ff for 64 bit R for windows gui?
Hi, folks:
I am running 64-bit R on a 64 bit machine under 64 bit Windows 7. I'd
like to try the package ff, but it is not clear to me whether the
current version of ff will work in a 64 bit environment. The windows
version is "compiled," which suggests that there is more than just R
p-code. Do any of you know whether the current compiled version of ff
will work in my
2012 May 28
3
Factanal fits
Greetings, all:
I am using factanal in R.
When I enter a matrix or a formula, the print method winds up with something like this:
Test of the hypothesis that 6 factors are sufficient.
The chi square statistic is 28.1 on 22 degrees of freedom.
The p-value is 0.172
But when I enter a covmat, the print method winds up with something like this:
The degrees of freedom for the model is 22 and the
2010 Mar 31
2
Simplifying particular piece of code
Hello, everyone
I have a piece of code that looks like this:
mrets <- merge(mrets, BMM.SR=apply(mrets, 1, MyFunc, ret="BMM.AV120",
stdev="BMM.SD120"))
mrets <- merge(mrets, GM1.SR=apply(mrets, 1, MyFunc, ret="GM1.AV120",
stdev="GM1.SD120"))
mrets <- merge(mrets, IYC.SR=apply(mrets, 1, MyFunc, ret="IYC.AV120",
2012 Jul 20
3
Execute a function
Hi,
I would like to evaluate a function, with 3 arguments, for instance,
myfunc<-function(a,b,c) { sqrt(a)-exp(b)+4*c
}
How to execute myfunc(x,y,z), for all x, all y and all z, where x,y,z are
vectors?
Thank you very much in advance
--
View this message in context: http://r.789695.n4.nabble.com/Execute-a-function-tp4637182.html
Sent from
2004 Sep 09
4
scoping rules
Can someone help me with this simple example?
sq <- function() {
y <- x^2
y
}
myfunc <- function() {
x <- 10
sq()
}
myfunc()
executing the above in R yields:
> myfunc()
Error in sq() : Object "x" not found
I understand that R's scoping rules cause it to look for "x" in the
environment in which "sq" was defined (the global environment in
2012 Aug 29
5
Extracting the name of a function (inverse of match.fun("myFun"))
Hi all,
is there a way to extract the name of a function, i.e. do the reverse
of match.fun applied to a character string? I would like to print out
the name of a function supplied to another function as an argument.
For example:
myFunc = function(x) { x+1 }
applyFunc = function(fnc, x)
{
fnc = match.fun(fnc)
fnc(x)
}
Is there a way to obtain "myFunc" from the argument fnc in
2011 Jan 10
2
Integration in R
Dear all,
It has been ages since I studied integration in college. Right now I
try to recover all this kind of knowledge and then try to understand how
integration works.
Thus I am doing some first 'experiments' and I would like to request your help and comments.
I have the function:
p2<-function(x){0.5*(3*x^2-1)}
# I found the square of p2 by using some pencil and
2002 May 06
3
Using Object's Name in Function
Hi,
Suppose I have a function:
myfunc <- function(x, y) {
...
}
And within the function I want to print out the name of the x, y
vectors. For example, if I do:
> myfunc(foo, goo)
[1] "foo" "goo"
It shall return "foo", "goo" (with or without quotes is fine), where foo
and goo are two vectors with numbers.
I know this sounds strange, but I'd
2003 Sep 16
7
Retrieve ... argument values
Dear R users,
I want to retrieve "..." argument values within a function. Here is a small
exmaple:
myfunc <- function(x, ...)
{
if (hasArg(ylim)) a <- ylim
plot(x, ...)
}
x <- rnorm(100)
myfunc(x, ylim=c(-0.5, 0.5))
Error in myfunc(x, ylim = c(-0.5, 0.5)) : Object "ylim" not found
>
I need to retrieve values of "ylim" (if it is defined
2013 Apr 29
3
Function for Data Frame
Dear R Helpers,
I have about 20 data frames that I need to do a series of data scrubbing
steps to. I have the list of data frames in a list so that I can use
lapply. I am trying to build a function that will do the data scrubbing
that I need. However, I am new to functions and there is something
fundamental that I am not understanding. I use the return function at the
end of the function and
2011 Feb 18
1
debugger() fails if "..." in function arguments
Dear all,
I'm having a problem with debugger() in both R 2.8.0 and R 2.12.0.
Probably also versions in-between.
I don't see it logged in the bug database, but it's hard for me to
imagine that no-one else has encountered it. So my question is whether
it's a known problem with a workaround, or do I log it as a new problem?
The situation is that if I use
2016 May 17
3
External function resolution: MCJIT vs ORC JIT
When using ORC JIT, I'm having trouble with external function resolution (that is, of a function defined in the app, with C linkage).
I add a declaration for the function to my IR, and when I use MCJIT, it finds it and all is well, But when I use ORC JIT (I *think* correctly, at least it closely matches what I see in the tutorial), I get an LLVM error, "Program used external function
2006 Jun 15
4
Yahoo!-like Event object emulation/abstraction in Prototype?
Hi,
I was reading about the Yahoo! library recently and was really
excited by the idea that I wouldn''t have to branch for IE in my
event handlers. Is there any chance that such abstraction will come
to Prototype?
Thanks,
Sam
2002 Aug 03
2
variable scope
Dear R-guRus:
I would like to pass variables to a function in R in "by reference",
e.g Fortran style.
For example, suppose I have the following code
x<-c(1:10)
y<-1
MyFunc<-function(x,y) {y<-sum(x); return(NULL)}
MyFunc(x,y)
print(y)
in this case print(y) will produce "1" instead of 55 (which is sum(x)) -
how do I make sure that afte the function is run, y
2002 Aug 03
2
variable scope
Dear R-guRus:
I would like to pass variables to a function in R in "by reference",
e.g Fortran style.
For example, suppose I have the following code
x<-c(1:10)
y<-1
MyFunc<-function(x,y) {y<-sum(x); return(NULL)}
MyFunc(x,y)
print(y)
in this case print(y) will produce "1" instead of 55 (which is sum(x)) -
how do I make sure that afte the function is run, y