Hello, everyone,
Do you have any idea to get a set of random points within a regular
pentagon? Thanks in advance!
Yuanzhi
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
Try:
oof1 <- list()
oof1[foo$name] <- foo$num
A.K.
On Friday, March 7, 2014 10:43 PM, Keith S Weintraub wrote:
Folks,
I have a data frame as follows:
> foo<-structure(list(name = c("A", "B", "C"), num = c(3L, 2L, 1L)), .Names =
> c("name",
"num"), row.names = c(NA, -3L), class = "data.fra
> oof <- as.list(foo$num)
> names(oof) <- foo$name
> oof
On Fri, Mar 7, 2014 at 10:41 PM, Keith S Weintraub wrote:
> Folks,
>
> I have a data frame as follows:
>
>> foo<-structure(list(name = c("A", "B", "C"), num = c(3L, 2L, 1L)), .Names =
>> c("name",
> "num"), row.names = c(NA, -3L), class =
Folks,
I have a data frame as follows:
> foo<-structure(list(name = c("A", "B", "C"), num = c(3L, 2L, 1L)), .Names =
> c("name",
"num"), row.names = c(NA, -3L), class = "data.frame")
> str(foo)
'data.frame': 3 obs. of 2 variables:
$ name: chr "A" "B" "C"
$ num : int 3 2 1
> foo
name
Dear Agony you did not place a "subject" on your message. That prevents
people to help you. So I have corrected.
About your problem. This seems to be related to memory allocated to Java
Virtual Machine on rJava and has been comment online many times (eg:
http://stackoverflow.com/questions/7963393/
Try adding the echo=TRUE argument to your source() comand,
or perhaps just print.eval=TRUE.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of Milton O Faison
> Sent: Friday, March
Don MacQueen's answer was probably correct.
Please see FAQ 7.16 for details.
On Fri, Mar 7, 2014 at 9:51 PM, Milton O Faison wrote:
> My apologies. The crux of my question is why doesn't a script function the
> same when called from the source command as it does when cut and paste into
> R;
My apologies. The crux of my question is why doesn't a script function the
same when called from the source command as it does when cut and paste into R;
however, I will provide the script, the correct output from cutting and
pasting, and the faulty output from the source command within the nex
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Kristi Glover
> Sent: Friday, March 07, 2014 11:56 AM
> To: R-help
> Subject: [R] stratified sampling
>
> Hi R users,
> I have been struggling to select the equal number of sample
Does setting OutDec work for you?
options(OutDec=",")
x <- rnorm(50, mean=2, sd=0.1)
y <- rnorm(50, mean=2, sd=0.2)
plot(x, y)
# options(OutDec=".") to change it back if you want
-
David L Carlson
Department of Anthropology
Texas A&M University
College Station,
try:
toJSON(doc, digits = 20)
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Fri, Mar 7, 2014 at 4:07 AM, wrote:
> Dear all,
>
> I encounter a conversion problem with integers to JSON format. Are ther
Hi,
take a look at this old conversation. I do not know about an other workaround,
but maybe somebody else will know something. As we also use commas in Hungary,
I am also affected by this.
https://stat.ethz.ch/pipermail/r-help/2002-January/018030.html
HTH
daniel
__
Hi - I would like to post to the R-help mailing list. Here is my post:
-This is more of a general question about how the predict function treats
categorical variables and how to interpret the output from predict.
I have a zeroinfl model to predict the number of animals encountered:
b9<-zeroi
Hi,
I am preparing plots for a german publication. Therefore, I would like
to use a comma as decimal mark instead of a point. How do I change
this default in R?
I could not find anything in the help pages, maybe you can help me out.
Thanks,
Lothar
__
Hi,
Apologies if this is a silly question -- I am just now learning how to use
some of the basic functions in
the rms library.
I have been using
foo.dist <- datadist(foo.frame)
options(datadist='foo.dist')
lrm.model <- lrm(binary.outcome ~ rcs(contin.var,5)+categ.var, data =
foo.f
my data with *.txt is :
T0 T1 I1 E1 E2 E3 V1 V2 V3
0.0 0.03634 1 1 0 0 1 0 0
0.03634 0.98215 1 1 0
0 1 0 0
0.0 0.66344 2 1 0 0 0
Dear all,
I encounter a conversion problem with integers to JSON format. Are there any
options in RJSONIO to make a proper conversion from int to int instead of int
to float with the consequence of losing accuracy?
Regards,
Maarten
> doc <- 8667053102
> names(doc) <- "largeint"
> toJSON(doc)
Dear all ,
I plotted a heat map of 20*20 matrix (lets say x axis and y axis comprises
of alphabets A,D.G and so on) which contain multiple values for each
entry in the dataset. I need to rearrange x axis and y axis on the basis of
similar properties on x axis and y axis such as A E,H and appe
Hi,
I am preparing plots for a german publication. Therefore, I would like
to use a comma as decimal mark instead of a point. How do I change
this default in R?
I could not find anything in the help pages, maybe you can help me out.
Thanks,
Lothar
__
Why?
Presumably you want to bootstrap the distribution of the mean -- but
why? Anyway, if this is correct, the boot package can do this for you.
-- Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certa
Hi R users,
I have been struggling to select the equal number of samples from each strata.
I have the data collected in different years in different regions with
different sample size. Basically, I have two two conditions (year and region).
I wanted to make smaple sample size for both year and
Oops, my answer was for when replace=TRUE, when replace=FALSE it uses
a different method, but that method is described on the help page for
sample. Essentially it chooses the first number, then removes that
value from x and prob, then chooses the next (rescaling prob again),
etc.
On Fri, Mar 7, 2
Dear All,
I would like to ask for your help on the following when testing uniformity by
the KS test:
1. We know that the Kolmogorov test is based on the supremum D of the
difference between the empirical distribution and the uniform distribution
2. We also know that sqrt(n)D has a limiting
For how to find the source code, see the help desk article in the
October 2006 R news newsletter
(http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf) which was the
predacessor of the R journal.
Have you looked at the variance of your jitters as well? that is what
would make me more nervous (wid
See ?spec.pgram and look for "bandwidth".
Best,
Uwe Ligges
On 07.03.2014 15:53, Baro wrote:
Hi experts
if I run the code:
k<-c(1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10)
x.spec<-spectrum(k,log=c("no"))
at the bottom of dagram I have a bandwidth, what does it mean?
[[alternative HT
A fun discussion, but to get back to Thomas's too clever by half comment that started
this, I went through some of these same thoughts a few years ago. I ended up asking the
deeper question
"Why DO I want to fix this? It was a bad idea from the start."
I once had a similar self-conversati
Essentially what the sample function is doing (though it does it in a
much more efficient way I expect) is the equivalent of this code:
i <- c(1:10)
myProbs <- c(0.1, 0.1, 0.1, 0.1, 0.1, 0.9, 0.9, 0.9, 0.9, 0.9)
myProbs <- myProbs/sum(myProbs)
cp <- c(0,cumsum(myProbs))
i[findInterval( runif(5),
On 07/03/2014 10:16 AM, Benjamin Tyner wrote:
Hello,
I realize that a function in (for example, function
"head1" below) is unable to see (without resorting to "::", anyway)
objects in utils (for example, "head" below), since package:base is
after package:utils on the search path.
However, I
With those kinds of numbers, I would think a database would be appropriate
(instead of spreadsheets).
You can begin to assess performance of R with 90,000 observations with
experiments like this:
mydat <- list()
for (i in 1:30) mydat[[i]] <- sample(letters, size=9, replace=TRUE)
mydat2 <- as.
> It's not possible to be perfect in this scenario, but you could use
> some heuristics:
>
> survfit <- function(x, ...) {
> xq <- substitute(x)
> if (!is.call(xq)) {
> stop("First argument to survfit must be a function call")
> }
It would be good to add another logical argument, say su
I'm going to assume that the binseg.mean.cumsum() function is from the
changepoint package. I don't know any details about this function or
package, so I'm going to make a suggestion based in basic R principles.
I'd suggest that for the time being you ignore whatever it is that the
changepoint doc
Thank you for the suggestion. Is there a function for doing that in R?
David
On 3/7/2014 9:50 AM, Therneau, Terry M., Ph.D. wrote:
With respect to question 2, I use the wild bootstrap for tau.
Wu, C.F.J. (1986). Jackknife, bootstrap and other
resampling methods in regression analysis (wi
Dear UseRs,
I am going to be involved in the analysis of a cohort of about 90,000
people. I still didn't have the data at hand, but I know that right now
they are archived into spreadsheet files. So far I only analysed data
sets of very small size. I probably will be able to work on a
relatively f
On Fri, Mar 7, 2014 at 6:46 AM, Therneau, Terry M., Ph.D.
wrote:
>>> The help page for the survfit function says it expects a formula as its
>>> first argument so try:
>>>
>>> > sleepfit <- survfit(Surv(timeb, death)~1, data = sleep)
>>>
>>> David
>>> Sent from my iPhone ... so unable to test.
>>>
Thank you for your response. The first part of my question was meant to
ask "how do I actually find the source code?" I tried to find that,
without success.
As for my comfort with a method that gives variable answers, I've
experimented by running 100 cases and take the average. When I've do
> -Original Message-
> From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk]
> Sent: Freitag, 7. März 2014 16:00
> To: Duncan Murdoch; Hiller Rebecca; r-help@r-project.org
> Subject: Re: [R] pdf: plotting very small points
>
> On 05/03/2014 17:24, Duncan Murdoch wrote:
> > On 05/03/2014
I just used R and C# only once. I follow the tutorial from:
http://vvella.blogspot.com/2010/08/integrate-c-net-and-r-taking-best-of.html
http://www.codeproject.com/Articles/25819/The-R-Statistical-Language-and-C-NET-Foundations
I hope it helps.
Best,
Qiang
On Fri, Mar 7, 2014 at 10:01 AM, A
You could run the cor function on a small dataset where you know the
values of tau-a and/or tau-b (either because you hand computed them,
or found an example on the internet showing the difference), that
would give some good evidence as to which is used.
Or you could look at the source code, R is
Hello,
I realize that a function in (for example, function
"head1" below) is unable to see (without resorting to "::", anyway)
objects in utils (for example, "head" below), since package:base is
after package:utils on the search path.
However, I'm wondering what is the machinery that allows a fu
Hi experts
if I run the code:
k<-c(1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10)
x.spec<-spectrum(k,log=c("no"))
at the bottom of dagram I have a bandwidth, what does it mean?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing
With respect to question 2, I use the wild bootstrap for tau.
Wu, C.F.J. (1986). Jackknife, bootstrap and other
resampling methods in regression analysis (with discussions).
Annals of Statistics, 14, 1261-1350.
-- begin included message --
I want to bootstrap Kendall's tau corr
Hi all I want to add R with C# and want to call the R
functions in C# and do computation .
I had used the package Rdotnet package in C# , but cannot call a
fuction of R in C# , if any one could help me with this .
Thank You,
ASHIS DEB
On 05/03/2014 17:24, Duncan Murdoch wrote:
On 05/03/2014 8:34 AM, rebecca.hil...@meteoswiss.ch wrote:
Dear all,
Ghostscript (version 9.05) cannot open pdfs produced with R (version
3.0.2) that contain very small points in plots. Other pdf readers
(evince, AcrobatReader) are able to open the fil
The help page for the survfit function says it expects a formula as its
first argument so try:
> sleepfit <- survfit(Surv(timeb, death)~1, data = sleep)
David
Sent from my iPhone ... so unable to test.
This was a recent (well, 2007) change in behaviour. Previously the function
did some tricks
Hello,
Inline.
Em 07-03-2014 11:17, David Croll escreveu:
Dear R users and friends,
I would like to ask you about the weird behaviour of a function I just
wrote. This little function should take a vector, find NAs and
substitute them for the mean of the vector, and return the normalized
valu
Hi
Another option can be to use e.g. ImageJ and compute fractal dimensions of the
outline.
Petr
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Jim Lemon
> Sent: Friday, March 07, 2014 12:04 PM
> To: Violette BERTRAND
> Cc:
Hello,
Your message is incomplete. And please don't post in HTML.
Regards.
On Fri, Mar 7, 2014 at 5:16 AM, Alicia Ellis wrote:
> I am analyzing some data that came from demographic health surveys. The
> data contain information for individuals within households, that are
> located within clust
Hello
The function does exactly what you tell it to do; first you substitute
all NA with the mean; then you subtract the mean; for the NA this
meand: mean-mean=0; and this is what you get.
the problem is not the function but the z-score of means.
lg fabian
On 07-03-2014 12:17, David Croll
Dear R users and friends,
I would like to ask you about the weird behaviour of a function I just
wrote. This little function should take a vector, find NAs and
substitute them for the mean of the vector, and return the normalized
value of that vector.
I've tried both <- and <<- for changin
On 03/07/2014 08:51 AM, Violette BERTRAND wrote:
Hi,
I have pictures (.png) of the shape of many entrances of woodpeckers’ cavities,
coloured in black. I want that R takes these pictures and stacks (superimposes)
all the shapes to determine the tendency of the shape of cavities for each
speci
I'm trying to figure out exactly what the prob parameter in the sample
function does.
With the following code, does sample look randomly for the first
possible sample--let's say it choses the second element--and then
assess whether it can be chosen according to it's probability which is
0
Dear Violette,
Search for elliptical Fourier analysis. RSiteSearch("elliptical fourier
analysis")
Best regards,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Hello everybody.
I've a problem with stepAIC inside a boot function (i'm trying to do
bootstrap backward elimination, with a "statistic" function that allow one
to specify the formula of a coxph model)
For the moment the function would be aimed storing selected vars
However I've a problem in the
Looking back at my post (Mar 26, 2013; 7:28am Re: [R] Use pcls in "mgcv"
package to achieve constrained cubic spline), it seems to me that you
could use the same trick, but omit the `-1' from the model formula. i.e.
you set up a bunch of smooths constrained to pass through zero at zero,
but lea
Please read the Posting Guide, which warns you that posting HTML email to this
mailing list is not okay. On the off chance that the HTML reaches us at all, it
rarely appears to us the way you see it. Please communicate using plain text on
this list.
--
What I would do:
# read in your sample data
mbr <- read.table( "clipboard", header = TRUE, stringsAsFactors = FALSE )
# create a vector with the codes you want to consider
code.list <- c("A","B","C","D","E")
# reduce the data accordingly
mbr <- mbr[ mbr$code %in% code.list, ]
# get your model m
Hi
this is an ESS related question, and should be asked at their mailing
list [1].
But I guess, it has to do with the fact that View() opens a (tclk?)
window and, as the R session is on the server, tries to do it on the
server, which does not work. Look into rdired [2] in ESS which is a very
nice
57 matches
Mail list logo