Julian -
I've written a document you might find helpful.
http://www.stat.berkeley.edu/classes/s243/calling.pdf
It also includes the C/matlab interface.
- Phil Spector
Statistical Computing Facility
Hi Julian,
There was also a great thread on this topic just recently here:
http://stackoverflow.com/questions/4106174/where-can-i-learn-to-how-to-write-c-code-to-speed-up-slow-r-functions
You might find it useful.
Cheers,
Tal
Contact
Details:-
Hi,
On Sat, Dec 18, 2010 at 11:29 PM, Julian TszKin Chan wrote:
> Hi all,
>
> Is there any tutorial for learning C/R interface ? Thanks
You'll find some info here:
http://cran.r-project.org/doc/manuals/R-exts.pdf
Also, take a good look at the Rcpp package:
http://dirk.eddelbuettel.com/code/rcpp
Hi all,
Is there any tutorial for learning C/R interface ? Thanks
Regards,
Julian
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://w
> -Original Message-
> From: David Winsemius [mailto:dwinsem...@comcast.net]
> Sent: Saturday, December 18, 2010 5:54 PM
> To: Joel Schwartz
> Cc: r-help@r-project.org
> Subject: Re: [R] package survey
>
>
> On Dec 18, 2010, at 8:11 PM, Joel Schwartz wrote:
>
> >> and does anyone kno
Carl Witthoft wrote:
There are a couple Venn Diagram functions out there.
But I would strongly recommend against making charts like this. There
are too many colors, and even non-colorblind people will find them to be
a pain to discriminate, let alone remember what the coding means.
Assuming you
On Dec 18, 2010, at 8:11 PM, Joel Schwartz wrote:
and does anyone know if it is possible to find the codes for
functions in survey package?
Yes, you can find the code by doing the following:
1) Go to the CRAN R package list (http://cran.r-project.org/web/packages/
),
scroll down to the "su
> and does anyone know if it is possible to find the codes for
> functions in survey package?
Yes, you can find the code by doing the following:
1) Go to the CRAN R package list (http://cran.r-project.org/web/packages/),
scroll down to the "survey" package link and click on it.
2) Scroll down t
On 18/12/2010 5:46 PM, Joel Schwartz wrote:
I think that should have been
help.start()
Yes, thanks. What I need is a Thunderbird plug-in that understands R code.
Duncan Murdoch
Joel
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On B
Hi R users,
could someone help me to find out which formulas, for standard error
calculation, are used in following example:
a=data.frame(weights=rep(c(10,1),c(4,1)),fpc=rep(41,5),uk=rep(1,5))
srs<-svydesign(id=~1, weights=~weights, data=a)
srs1<-svydesign(id=~1, weights=~weights,fpc=~fpc, dat
Hi, Joel:
Thanks. That doubtless was what Duncan meant. "help.start()" ->
Reference: Packages provides access to HTML versions of all the help
pages from all the packages.
However, it does NOT provide access to the PDF version of the
help pages for a package. For that, you
Hi,
if your question is : how to get help in a pdf file
So do this :
options(help_type="pdf")
your next ?function will be in a pdf file with the name of the function.
2010/12/18 Joel Schwartz
> I think that should have been
>
> help.start()
>
>
> Joel
>
> > -Original Message-
> > From
I think that should have been
help.start()
Joel
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Spencer Graves
> Sent: Saturday, December 18, 2010 1:35 PM
> To: Duncan Murdoch
> Cc: r-help@r-project.org; eric
> Subject: Re
Hi, Duncan:
I'm confused:
help_start()
Error: could not find function "help_start"
Thanks,
Spencer
sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
On 18/12/2010 2:20 PM, eric wrote:
Newbie here...just learning
Do most packages come with pdf versions of the help files ? If yes, how to I
access the entire pdf file to be able to print it ? Is there a standard
command for that ?
No, the pdf version is not normally installed. If you want to
On 18/12/2010 2:34 PM, casperyc wrote:
Hi all,
#
integ=function(f,n){
# computes vector y = f(x)
x=runif(1)
y=f
hatI=mean(y)
hatI
}
# example of use
integ(x^2+x+100,100)
#
it retu
The best way to get a pdf version of any CRAN package is to your
favorite CRAN mirror, click "Packages", then find the package of
interest. "Reference manual" is a pdf version of the package
documentation. This also includes other information such as Vignettes,
which can be extremely va
On 2010-12-18 10:27, e-letter wrote:
On 18/12/2010, Peter Ehlers wrote:
On 2010-12-18 07:50, e-letter wrote:
Ben Bolker
Sat, 18 Dec 2010 07:07:24 -0800
[... snip ...]
I am trying to create a chart like this
(http://www.b-eye-network.com/images/content/Fig4_3.jpg); so this is
not possible u
On Dec 18, 2010, at 2:20 PM, eric wrote:
Newbie here...just learning
Do most packages come with pdf versions of the help files ? If yes,
how to I
access the entire pdf file to be able to print it ? Is there a
standard
command for that ?
There may be one but I don't know it if there is.
Hi all,
#
integ=function(f,n){
# computes vector y = f(x)
x=runif(1)
y=f
hatI=mean(y)
hatI
}
# example of use
integ(x^2+x+100,100)
#
it returns an error says no obj 'x'
how do I '
Newbie here...just learning
Do most packages come with pdf versions of the help files ? If yes, how to I
access the entire pdf file to be able to print it ? Is there a standard
command for that ?
--
View this message in context:
http://r.789695.n4.nabble.com/pdf-package-help-files-tp3093926p30
On Dec 18, 2010, at 1:27 PM, e-letter wrote:
On 18/12/2010, Peter Ehlers wrote:
On 2010-12-18 07:50, e-letter wrote:
Ben Bolker
Sat, 18 Dec 2010 07:07:24 -0800
[... snip ...]
I am trying to create a chart like this
(http://www.b-eye-network.com/images/content/Fig4_3.jpg); so this is
not
On Sat, Dec 18, 2010 at 11:49 AM, casperyc wrote:
>
> Hi all,
>
> ##
> dof=c(1,2,4,8,16,32)
> Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof))
> par(mfrow=c(2,6))
> apply(Q5,2,hist)
> myf=function(x){ qqnorm(x);qqline(x) }
> apply(Q5,2,myf)
> #
Hi,
Your mistake is related with "read.table(n)". I haven`t got what you want
but I put an example below (where I used loop to read many files). Hope it
helps. Anyway, I thougth should have sent your question to
.
Bye
Nilza
=example
nomesout <- dir(dat.dir,pattern="^[
HI Sarah,
I will just use a loop then.
I think my colnames are fine.
Thanks!
casper
--
View this message in context:
http://r.789695.n4.nabble.com/use-of-apply-for-hist-tp3093811p3093937.html
Sent from the R help mailing list archive at Nabble.com.
_
Thanks Dieter.
Casper
--
View this message in context:
http://r.789695.n4.nabble.com/use-of-apply-for-hist-tp3093811p3093938.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailm
On 18/12/2010, Peter Ehlers wrote:
> On 2010-12-18 07:50, e-letter wrote:
>>> Ben Bolker
>>> Sat, 18 Dec 2010 07:07:24 -0800
>
> [... snip ...]
>
>> I am trying to create a chart like this
>> (http://www.b-eye-network.com/images/content/Fig4_3.jpg); so this is
>> not possible using R?
>
> That loo
Thanks a lot, Duncan.
Duncan Murdoch schrieb:
On 18/12/2010 12:21 PM, Jannis wrote:
Dear list members,
I am seeking a function that returns me the length of a continous
sequence of identical elements in a vector. Something like (or
similar to):
example = c(1,1,1,2,2,3,3,3,3)
result = c
On Dec 18, 2010, at 11:58 AM, e-letter wrote:
On 18/12/2010, Peter Ehlers wrote:
On 2010-12-18 07:50, e-letter wrote:
Ben Bolker
Sat, 18 Dec 2010 07:07:24 -0800
[... snip ...]
I am trying to create a chart like this
(http://www.b-eye-network.com/images/content/Fig4_3.jpg); so this is
not
On 18/12/2010 12:21 PM, Jannis wrote:
Dear list members,
I am seeking a function that returns me the length of a continous
sequence of identical elements in a vector. Something like (or similar to):
example = c(1,1,1,2,2,3,3,3,3)
result = c(3,3,3,2,2,4,4,4,4)
I am quite sure there already
casperyc wrote:
>
> Hi all,
>
> ##
> dof=c(1,2,4,8,16,32)
> Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof))
> par(mfrow=c(2,6))
> apply(Q5,2,hist)
> myf=function(x){ qqnorm(x);qqline(x) }
> apply(Q5,2,myf)
>
Dear list members,
I am seeking a function that returns me the length of a continous
sequence of identical elements in a vector. Something like (or similar to):
example = c(1,1,1,2,2,3,3,3,3)
result = c(3,3,3,2,2,4,4,4,4)
I am quite sure there already exists a function to do this, I just
Hi,
You can't access the column names from within apply, I'm afraid.
This has been covered previously:
http://www.mail-archive.com/r-help@stat.math.ethz.ch/msg51014.html
That's one of the cases where you actually need to use a for() loop,
though I suppose you could also write something vectorized
casperyc wrote:
>
> ... Expression in lattice example
>
> hist(Q5[,i],main=expression(paste("t[",dof2,"]",sep="")))does not work
>
dof=c(1,2,4,8,16,32)
Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof))
par(mfcol=c(2,6))
for (i in 1:6){
dof2=dof[i]
hist(Q5[,i],main=bq
Hi all,
##
dof=c(1,2,4,8,16,32)
Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof))
par(mfcol=c(2,6))
for (i in 1:6){
dof2=dof[i]
hist(Q5[,i],main=paste("t[",dof2,"]",sep=""))
qqnorm(Q5[,i])
qqline(Q5[,i])
}
###
On 18/12/2010, Peter Ehlers wrote:
> On 2010-12-18 07:50, e-letter wrote:
>>> Ben Bolker
>>> Sat, 18 Dec 2010 07:07:24 -0800
>
> [... snip ...]
>
>> I am trying to create a chart like this
>> (http://www.b-eye-network.com/images/content/Fig4_3.jpg); so this is
>> not possible using R?
>
> That loo
Try this:
ls.str(mode = 'function')
On Sat, Dec 18, 2010 at 2:39 PM, Carl Witthoft wrote:
> Oddly enough, I posted my little cutie recently:
>
>
> lstype<-function(type='closure'){
> #
>
>inlist<-ls(.GlobalEnv)
>if (type=='function') type <-'closure'
>typelist<-sapply(sa
Hi all,
##
dof=c(1,2,4,8,16,32)
Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof))
par(mfrow=c(2,6))
apply(Q5,2,hist)
myf=function(x){ qqnorm(x);qqline(x) }
apply(Q5,2,myf)
##
These looks ok.
However, I would lik
There are a couple Venn Diagram functions out there.
But I would strongly recommend against making charts like this. There
are too many colors, and even non-colorblind people will find them to be
a pain to discriminate, let alone remember what the coding means.
Assuming you want to show the
Oddly enough, I posted my little cutie recently:
lstype<-function(type='closure'){
#
inlist<-ls(.GlobalEnv)
if (type=='function') type <-'closure'
typelist<-sapply(sapply(inlist,get),typeof)
return(names(typelist[typelist==type]))
}
And, not usef
On 2010-12-18 07:50, e-letter wrote:
Ben Bolker
Sat, 18 Dec 2010 07:07:24 -0800
[... snip ...]
I am trying to create a chart like this
(http://www.b-eye-network.com/images/content/Fig4_3.jpg); so this is
not possible using R?
That looks an awful lot like what lattice's dotplot would
produce
Hi,
I am using the package snpMatrix to do a genetic association analysis, but my
problem is I think a simple R trick (sorry...I am an R newbie so I apologize in
advance if I am not using the correct terms...)
I am trying to figure out a way to loop through different dependent variables
without
Hi Christian, Chuck (and lists)
It seems that the problem may be the strange behaviour of 'unstack' inside a
function.
See this thread in the R mailing list:
http://tolstoy.newcastle.edu.au/R/help/04/03/1160.html
Anyway, I got round the problem by using 'aggregate' instead of converting to a
>Ben Bolker
>Sat, 18 Dec 2010 07:07:24 -0800
>David Winsemius comcast.net> writes:
>
>>
>>
>> On Dec 18, 2010, at 7:01 AM, e-letter wrote:
>>
>> > Readers,
>> >
>> > I am trying to use the function dotchart. The data is:
>> >
>> >> testdot
>> > category values1 values2 values3 values4
>> > 1
Hi,
I am using the package snpMatrix to do a genetic association analysis, but my
problem is I think a simple R trick (sorry...I am an R newbie so I apologize in
advance if I am not using the correct terms...)
I am trying to figure out a way to loop through different dependent variables
without
On 18/12/2010, David Winsemius wrote:
>
> On Dec 18, 2010, at 7:01 AM, e-letter wrote:
>
>> Readers,
>>
>> I am trying to use the function dotchart. The data is:
>>
>>> testdot
>> category values1 values2 values3 values4
>> 1a 10 27 56 709
>> 2b 4 46
When moderating this message just now I forwarded it to
r-help-owner, for discussion.
In reply to Roy's question, there is indeed nothing obvious
which should "match a filter rule". However, the ETHZ spam
filter is somewhat sensitive about gmail, regardless of true
content, and there are 4 occurre
David Winsemius comcast.net> writes:
>
>
> On Dec 18, 2010, at 7:01 AM, e-letter wrote:
>
> > Readers,
> >
> > I am trying to use the function dotchart. The data is:
> >
> >> testdot
> > category values1 values2 values3 values4
> > 1a 10 27 56 709
> > 2b
Are there any R functions for creating palettes for three-way data?
For example, election maps for three parties where pure red, blue, and
green show 100% for the Red, Blue, and Green parties respectively,
magenta shows a 50-50 Red-Blue split with 0 for the Greens, cyan a
50-50 Blue/Green split wit
On Fri, Dec 17, 2010 at 8:58 AM, Michael Friendly wrote:
> Use aperm() to make time the first dimension
> Reshape to a matrix (all other dimensions combined)
> Do your selection on X[1,]
> aperm() to Permute back
To Michael, thanks!
I copy my implementation of Michael's idea at the end of this p
On Dec 18, 2010, at 7:01 AM, e-letter wrote:
Readers,
I am trying to use the function dotchart. The data is:
testdot
category values1 values2 values3 values4
1a 10 27 56 709
2b 4 46 47 208
3c 5 17 18 109
4
On Sat, Dec 18, 2010 at 8:07 AM, Duncan Murdoch
wrote:
> Gabor Grothendieck wrote:
>>
>> On Fri, Dec 17, 2010 at 4:36 PM, Jeff Breiwick
>> wrote:
>>>
>>> All,
>>>
>>> I had a simple function call I used to open up a dos shell running R
>>> under
>>> Win XP:
>>> system("cmd.exe", wait=FALSE, invis
On Dec 17, 2010, at 11:08 AM, Luca Meyer wrote:
x= factor(c("2009-03-30 00:00:00", "2009-04-06 00:00:00", "2009-04-13
00:00:00", "2009-04-20 00:00:00", "2009-04-27 00:00:00", "2009-05-04
00:00:00" ,"2009-05-11 00:00:00", "2009-05-18 00:00:00"))
require(lubridate)
xd=as.POSIXct(x)
week(xd)
#
Gabor Grothendieck wrote:
On Fri, Dec 17, 2010 at 4:36 PM, Jeff Breiwick wrote:
All,
I had a simple function call I used to open up a dos shell running R under
Win XP:
system("cmd.exe", wait=FALSE, invisible=FALSE).
This does not work with R 2.12.1 - I get a window that briefly flashes open
b
Readers,
I am trying to use the function dotchart. The data is:
> testdot
category values1 values2 values3 values4
1a 10 27 56 709
2b 4 46 47 208
3c 5 17 18 109
4d 6 50 49 308
The fol
Ok - used browser to step through the function. Thanks for the nod towards that
Chuck.
> tf2 <- cumulMetric(tf1, deMirs$up)
Called from: cumulMetric(tf1, deMirs$up)
Browse[1]> fcVector <- as.numeric(with (deMirs, FC[match(deMirPresGenes[,4],
Probe)] ) )
Browse[1]> metric <- fcVector * as.nu
Hi Mark:
> However, if the dataframe contains non-unique rows (two rows with
> exactly the same values in each column) then the unique function will
> delete one of them and that may not be desirable.
In order to get information about equal rows between two dataframes
without removing duplicated
Dear R-users,
I have a factor variable within my data frame which I derive week after week
from a POSIXct variable using the cut(var,"weeks") command I have found in the
chron package. The levels() command gives me:
[1] "2009-03-30 00:00:00" "2009-04-06 00:00:00" "2009-04-13 00:00:00"
"2009-04
58 matches
Mail list logo