On 25/06/2013 20:35, Ned Harding wrote:
Just to clarify: The encoding didn't come through in the email.
print("éíôåëëåãåâáè") is meant to be a bunch of random greek characters.
In that case the message is likely correct. You failed to give us the
'at a minimum information' required by the p
On Jun 25, 2013, at 6:05 PM, Dan Murphy wrote:
> My problem is to evaluate a function/model whose definition and
> parameters (I'll put x into the arguments) and other data are saved by
> someone else in an Rdata file, but I don't know the function name,
> definition or data. Nevertheless, I need
Thanks for you response. The issue is that I need to run a thousand simulations
for each pipe (2) and then get an average of the values that are below the
condition I have set. When I ran the code, I only get just a thousand values
meaning it gives me values for a single pipe. How can I rect
Hi,
I've used `lm` to create a linear model of a continuous variable
against a factor variable with four levels using an example R data set
(see below). By default, it uses a treatment contrast matrix that
compares each level of the factor variable with the first reference
level (three comparisons
My problem is to evaluate a function/model whose definition and
parameters (I'll put x into the arguments) and other data are saved by
someone else in an Rdata file, but I don't know the function name,
definition or data. Nevertheless, I need to save whatever functional
values/model solutions are s
Hi,
Thank you very much for your replies.
Regards,
Dr. T. Imam
On Sun, Jun 23, 2013 at 10:24 PM, Prof Brian Ripley
wrote:
> On 23/06/2013 12:59, Uwe Ligges wrote:
>
>>
>>
>> On 23.06.2013 01:50, Dr. T. Imam wrote:
>>
>>> Hi,
>>>
>>> I am new to this forum, and hopefully am sending the post to th
Not sure what you're trying to do, but it looks like most of what you're
attempting to do in the code can be done just using vectors rather than loops,
at least the inner loop. For example:
k <- 1.15
l <- exp((1 / k) * (7.16 - 0.44 + 0.12 - 0.016))
z <- (log(1 / p) * l)^k
See ifelse for how to
Hello: I'm trying to construct a biplot from the psych package. The underlying
data frame looks just like sample.data, below. I turned it into a polychoric
correlation matrix sample.cor, below, as it is derived from a series of Likert
(ordinal) items. All are positive, I just used negative numbe
On Jun 25, 2013, at 12:40 PM, Ivanov Ruporvrich wrote:
> Hi,
> I want to format my axis in my persp3d plot.
>
> With my data, which I attached
You may have attached it ... but you probably didn't read the information about
what would be accepted by the mail server. Read the listinfo page linke
My apologies for cross-posting and for failing to reply to r-help. I'll get
the hang of it.
This code seems to be getting me quite close, but I've encountered the
following error.
Error in compute(dat, depths, fish, zoop) : attempt to apply non-function
--
View this message in context:
http:
Dear All,
I have spent most of my time trying to figure out how to simulate the number
of breaks in a pipe using Monte Carlo simulation.
i have 20,000 individual pipes that i have to run, and for each pipe i have to
run 1000 times while checking some conditions and therefore, i have to use a
Hi,
I want to format my axis in my persp3d plot.
With my data, which I attached I created a persp3d plot with the following
code, which I summarized from different code snippets I found:
library(rugarch)library(rgl)library(fGarch)fd <-as.data.frame(modelfit,which
='density')color <-rgb(85,141,8
them all at once if
that change can be made.
Chris
#
# CODE
# create data
set.seed(20130625)
n <- 100 # sample size
x <- rbinom(n, 1, 0.5) # covariate
z <- rep(0, n) # start time
y <- rexp(n, exp(x)) # event time
e <- y < 2 # cen
Hello,
Your data has commas as decimal points, R uses the period. So the data
is read in as strings, not numbers. You can change this by using
argument 'dec' of read.table:
?read.table
read.table(...etc..., dec = ",")
Or you can replace the commas with periods:
data[] <- sapply(data, func
On 25/06/2013 2:34 PM, kathleen askland wrote:
Hello,
Can anyone tell me how I can stop execution of a running program in R. I am
using Revolution R Enterprise v. 6.2. There is no STOP button and both ESC
and Ctrl+C do not work.
Thank you for your suggestions.
You will need to ask Revolution th
Just to clarify: The encoding didn't come through in the email.
print("éíôåëëåãåâáè") is meant to be a bunch of random greek characters.
Ned.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Ned Harding
Sent: Tuesday, June 25, 201
Hi
I am trying to do a heatmap, but I can't see what I am doing wrong. I get the
error message: `x' must be a numeric matrix, but as far as I know I have
changed my data into a matrix.
The dataset I have in my example of my run is only a small part. I have around
1000 rows in total. I have che
Hello,
Can anyone tell me how I can stop execution of a running program in R. I am
using Revolution R Enterprise v. 6.2. There is no STOP button and both ESC
and Ctrl+C do not work.
Thank you for your suggestions.
Kathleen
---
Kathleen Askland, MD
Assistant Professor
Department of Psychiatry & Hum
Hey,
I am looking for some help using Unicode with R CMD BATCH on windows. In
particular I would like my input and output files to be UTF-8 encoded. My
command line looks like this:
r CMD BATCH --encoding=UTF-8 in.txt out.txt
in.txt is utf-8 encoded and contains:
print("éíôåëëåãåâáè")
out.
By chance is any of this related to what I'll call the 'depends relay'
discussed in this SO post?
http://stackoverflow.com/a/8638902/633251 (see the 'caveat' to Josh O'Brien's
answer, which also links back to another answer by Martin Morgan).
This issue has happened to me and the symptoms are e
On 25/06/2013 7:14 AM, Søren Højsgaard wrote:
Dear Duncan,
Excellent, thanks!
Maybe this is worth a remark in a future version of "Writing R Extensions" (including that those
"local copies" are not exported again with exportPattern("^[[:alpha:]]+")).
Yes, from the followup discussion it's cl
On 25/06/2013 1:03 PM, Duncan Murdoch wrote:
On 25/06/2013 7:14 AM, Søren Højsgaard wrote:
> Dear Duncan,
>
> Excellent, thanks!
>
> Maybe this is worth a remark in a future version of "Writing R Extensions" (including that those
"local copies" are not exported again with exportPattern("^[[:alph
Hi,
I am using rpart with method="anova".Can we compute 95% confidence
intervals and prediction interval for the predicted mean at each node?
Thanks,
Puja
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.
On 25/06/2013 11:56 AM, Dan Murphy wrote:
So the trick is to put the function f into e and define its environment to be e:
Putting f into e, and defining the environment of f to be e solve
different problems. Your toy example has both problems so it's a
reasonable solution there, but most re
names(height) <- paste0(names(height),".D1")
It would be better if you supplied the data using dput()
Have a lookt at https://github.com/hadley/devtools/wiki/Reproducibility for
some suggestions on forming a good question.
John Kane
Kingston ON Canada
> -Original Message-
> From: su
Ouch. My apologies David, after reading the message I didn't bother to look at
the txt file.
John Kane
Kingston ON Canada
> -Original Message-
> From: dwinsem...@comcast.net
> Sent: Tue, 25 Jun 2013 09:09:15 -0700
> To: jrkrid...@inbox.com
> Subject: Re: [R] Fwd: Questions about working
Dear All,
I have spent most of my time trying to figure out how to simulate the number
of breaks in a pipe using monte carlo simulation.
i have 20,000 individual pipes that i have to run, and for each pipe i have to
run 1000 times while checking some conditions and therefore, i have to use a
On Jun 25, 2013, at 8:57 AM, John Kane wrote:
> Hi, welcome to R
>
> Try using the function str() on both files so str(WWA) and str(oWWA) and
> compare the structures that you get. Probably one of the varables you
> defined when creating the original WWA data set has changed from a character
Hi, welcome to R
Try using the function str() on both files so str(WWA) and str(oWWA) and
compare the structures that you get. Probably one of the varables you defined
when creating the original WWA data set has changed from a character variable
to a factor or vis versa.
It is a good idea to
Hi, all,
Recently, I met one issue when using socket between R & C++ to transmit R
object. Would you pls help give me some suggestions? Many thanks!
[Background]:
I create a socket connection between R & C++ binary first, and then, want
to use saveRDS() or save() in R to save the object into con
I got it to work, sorry my fault, there was a problem with the data.
Thanks
On Tue, Jun 25, 2013 at 4:13 PM, arun wrote:
> May be this also works:
>
> exp(mean(log(abs(x
> #[1] 0.4985282
> A.K.
>
>
>
> - Original Message -
> From: PIKAL Petr
> To: Shane Carey
> Cc: "r-help@r-pro
So the trick is to put the function f into e and define its environment to be e:
> e <- new.env()
> e$f <- function() x^2
> environment(e$f) <- e
> e$x <- 2
> do.call("f", list(), envir = e)
[1] 4
Thanks, Duncan.
On Tue, Jun 25, 2013 at 6:49 AM, Duncan Murdoch
wrote:
> On 25/06/2013 9:32 AM, Dan
Hello,
I am having trouble installing the package from CRAN. As the package compiles I
get:
* installing *source* package âRDieHarderâ ...
** package âRDieHarderâ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... a.ou
On 25/06/2013 14:50, luke-tier...@uiowa.edu wrote:
On Tue, 25 Jun 2013, Duncan Murdoch wrote:
On 13-06-25 7:14 AM, Søren Højsgaard wrote:
Dear Duncan,
Excellent, thanks!
Maybe this is worth a remark in a future version of "Writing R
Extensions" (including that those "local copies" are not ex
May be this also works:
exp(mean(log(abs(x
#[1] 0.4985282
A.K.
- Original Message -
From: PIKAL Petr
To: Shane Carey
Cc: "r-help@r-project.org"
Sent: Tuesday, June 25, 2013 8:50 AM
Subject: Re: [R] Calculate geometric mean with tapply
Hm
> -Original Message-
> From: r
Hi,
I have a data set consisting of XYZ data. the dimensions are 22427 rows by
3 columns.
I try to use rasterFromXYZ from the raster package but I get the following
error:
Error in rasterFromXYZ(DATA) : x cell sizes are not regular
Any help would be appreciated.
Thanks
--
Shane
[[a
r != R (you mis-typed the first argument to VaR). This works:
library(PerformanceAnalytics)
data(sample_matrix)
x <- Return.calculate(as.xts(sample_matrix))
VaR(R=x, p=0.99, method="historical")
Best,
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
On Tue, Jun 2
My_Vector[names(My_Vector)=="a"]
-
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77840-4352
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Christof
Hello again,
I have found that, in a vector if many elements have same names then
calling those elements with their names does not look complete. Here
is 1 example:
My_Vector <- c("a" = 'a', "a" = 'b')
then,
> My_Vector['a']
a
"a"
I was expecting both elements should be shown up.
Is there
R CMD check does complain and I had to add \alias{maxClique} in an .Rd file (I
did it this way to prevent downstream packages from failing).
Regards
Søren
-Original Message-
From: luke-tier...@uiowa.edu [mailto:luke-tier...@uiowa.edu]
Sent: 25. juni 2013 15:50
To: Duncan Murdoch
Cc: Sør
Sorry, my fault. a problem with the data I was working with. Whoopsadaisey.
Thanks all.
Cheers
On Tue, Jun 25, 2013 at 1:50 PM, PIKAL Petr wrote:
> Hm
>
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> > project.org] On Behalf Of Shane Carey
>
On 06/25/2013 01:19 PM, Duncan Murdoch wrote:
On 13-06-25 7:14 AM, Søren Højsgaard wrote:
Dear Duncan,
Excellent, thanks!
Maybe this is worth a remark in a future version of "Writing R Extensions"
(including that those "local copies" are not exported again with
exportPattern("^[[:alpha:]]+")).
On Tue, 25 Jun 2013, Duncan Murdoch wrote:
On 13-06-25 7:14 AM, Søren Højsgaard wrote:
Dear Duncan,
Excellent, thanks!
Maybe this is worth a remark in a future version of "Writing R Extensions"
(including that those "local copies" are not exported again with
exportPattern("^[[:alpha:]]+")).
On 25/06/2013 9:32 AM, Dan Murphy wrote:
I am having difficulty understanding the envir argument of do.call.
The help page says
envir an environment within which to evaluate the call.
so I thought that in the following toy example x would be found in the
environment e and f would return 4 via
The code is as follows:
monthreturns<-read.zoo('monthlyReturn date.csv',sep=",",header=T)
monthreturns<-as.xts(monthreturns,order.by
=index(monthreturns),frequency=NULL)*W0
head(monthreturns)
dim(monthreturns)
portnames<-c('acc','cipla','cmc','idbi','ifci') portfolio names (5
stocks)
Hi,
I am your member. Pl help me with the solution.
rgds
[[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://www.R-project.org/posting-gu
I am having difficulty understanding the envir argument of do.call.
The help page says
envir an environment within which to evaluate the call.
so I thought that in the following toy example x would be found in the
environment e and f would return 4 via do.call:
> e <- new.env()
> e$x <- 2
> f <
You could give 1-nearest neighbor classification a try. For example,
a <- data.frame(person=1:10, ht=rnorm(10, mean=5, sd=1),
wt=rnorm(10, mean=180, sd=30), bp=rnorm(10, mean=120, sd=10))
meas.err <- data.frame(ht=rnorm(10, sd=0.1),
wt=rnorm(10, sd=3), bp=rnorm(10, sd=1))
b <- (a[, -1]
Bree,
You should cc r-help on all correspondence so that the thread of
conversation is maintained for all readers. And you shouldn't attach any
files. If you want to share some data, used dput(). For example,
dput(head(whale))
dput(head(prey))
Give this code a try ... Note that I don't know wh
Hello,
or, simply input at the R-prompt
point.in.polygon
- without any brackets or so, but with the sp-package loaded...?
HTH,
Albin
Am 25.06.2013 09:28, schrieb Rui Barradas:
Hello,
R is open source. You can download the source code for package sp.
http://cran.r-project.org/web/packages/s
Hm
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Shane Carey
> Sent: Tuesday, June 25, 2013 1:25 PM
> To: Rui Barradas
> Cc: r-help@r-project.org
> Subject: Re: [R] Calculate geometric mean with tapply
>
> Thanks for your
HI,
Try this:
merge(data,data1["NAME"])
A.K.
- Original Message -
From: Nico Met
To: Rui Barradas
Cc: R help
Sent: Tuesday, June 25, 2013 6:00 AM
Subject: Re: [R] Fetch and merge from a merge(dat1["NAME"],dat2)
data set
Many thanks Rui,
However If I want to extract only first colum
... we used the following syntax:
b.x1a.y1<-dea.boot(x1a,y1,NREP=1000,RTS="vrs", ORIENTATION="in")
Vera
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-dea-boot-under-R-3-0-1-tp4669964p4670271.html
Sent from the R help mailing list archive at Nabble.com.
Thanks for your help, put I've tried that and it still gives me back the
mean when I use it within tapply for some reason
On Tue, Jun 25, 2013 at 12:17 PM, Rui Barradas wrote:
> Hello,
>
> You can write a function gmean and tapply it to your data.
>
>
> gmean <- function(x, na.rm = FALSE){
>
On 13-06-25 7:14 AM, Søren Højsgaard wrote:
Dear Duncan,
Excellent, thanks!
Maybe this is worth a remark in a future version of "Writing R Extensions" (including that those
"local copies" are not exported again with exportPattern("^[[:alpha:]]+")).
It is mentioned that they can be exported.
Hello,
You can write a function gmean and tapply it to your data.
gmean <- function(x, na.rm = FALSE){
if(na.rm) x <- x[!is.na(x)]
n <- length(x)
prod(x)^(1/n)
}
tapply(data$value, data$group, gmean)
Hope this helps,
Rui Barradas
Em 25-06-2013 11:58, Shane Carey esc
Dear Duncan,
Excellent, thanks!
Maybe this is worth a remark in a future version of "Writing R Extensions"
(including that those "local copies" are not exported again with
exportPattern("^[[:alpha:]]+")).
Thanks!
Søren
-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@
On 13-06-24 9:22 PM, David Kulp wrote:
Indeed, I misread / misunderstood. I think it's a difficult concept
that's hard to explain and the example wasn't great. But thanks all for
straightening me out!
It seems like a really natural definition to me, but I'm used to it.
Once you get used to it
On 13-06-25 6:50 AM, Søren Højsgaard wrote:
Dear all,
In my gRbase package I have up until now "Depend"-ed on RBGL (from Bioconductor), but
good people have convinced me that I should use "Import"-it instead because I only use
few functions from RBGL.
In DESCRIPTION I therefore now have
Import
Hi,
I am trying to calculate the geometric mean with tapply. This is the
formula I am using:
exp(tapply(log(data$value), data$group, mean))
However, it returns the arithmetic mean. Any ideas?
Thanks
--
Shane
[[alternative HTML version deleted]]
___
Dear all,
In my gRbase package I have up until now "Depend"-ed on RBGL (from
Bioconductor), but good people have convinced me that I should use "Import"-it
instead because I only use few functions from RBGL.
In DESCRIPTION I therefore now have
Imports: Matrix,RBGL
In NAMESPACE I now have
impor
Hi to all,
I need a possibility do delete the last warning to write the suitable
warning (not the last warning from minutes ago) into a file.
I found a lot of treats but no really solution.
Regards Knut
__
R-help@r-project.org mailing list
https://
Is
merge( data[1], data1 )
what you want?
On Tuesday 25 June 2013 12:00:23 Nico Met wrote:
> Many thanks Rui,
>
> However If I want to extract only first column (data1) from data file, then
> how Can I do it?
>
> Thanks again
>
> Nico
>
>
> On Tue, Jun 25, 2013 at 11:43 AM, Rui Barradas
Many thanks Rui,
However If I want to extract only first column (data1) from data file, then
how Can I do it?
Thanks again
Nico
On Tue, Jun 25, 2013 at 11:43 AM, Rui Barradas wrote:
> Hello,
>
> I'm not sure I understand, but it seems as simple as
>
> merge(data1, data)
>
>
> Hope this helps
If you want the size to depend on the data, then size needs to be inside
aes(...). For instance:
stat_bin(aes(label = sprintf("%.01f", (..count../288)*100),
size=ifelse(..count..>0, 2.5, 0)) ,color="red", vjust=-0.5, angle=0,
geom="text")
A better approach would be not to plot the unnecessary thin
Hello,
I'm not sure I understand, but it seems as simple as
merge(data1, data)
Hope this helps,
Rui Barradas
Em 25-06-2013 10:34, Nico Met escreveu:
Dear all,
I would like to fetch a list (data1) of entities from a big data file
(data) and merged together. for example: data is the file fro
Dear all,
I would like to fetch a list (data1) of entities from a big data file
(data) and merged together. for example: data is the file from where I want
to extract
dput(data)
structure(list(NAME = structure(c(6L, 6L, 7L, 6L, 6L, 7L, 6L,
7L, 3L, 5L, 3L, 3L, 3L, 3L, 4L, 3L, 3L, 4L, 3L, 3L, 3L, 3
Hello,
Use graphic parameter las = 2.
See the help for ?par.
Hope this helps,
Rui Barradas
Em 25-06-2013 07:03, alfonso.carf...@uniparthenope.it escreveu:
Hi,
I need to generate a barplot in in which the x-labels must to be
perpendiculars to the x-axis
in my data have a list of probability
I have a data which I plot using this code.
Attached is the plot
_BEGIN_
library(ggplot2)
dat.m <- read.delim("http://dpaste.com/1269939/plain/",sep="";)
colnames(dat.m) <- c("ensg","mirna_hgc","variable","value")
dat.m.y <- subset(dat.m,dat.m$variable=="y")
qplot(value,data=dat.m.y, geom="bar",
On 25-06-2013, at 10:19, Francesco Miranda wrote:
> I need something like the writeln in C. I need to make error messages
>
Does C have a writeln?
Have a look at cat:
?cat
Berend
>> Date: Mon, 24 Jun 2013 18:20:13 -0400
>> Subject: Re: [R] packages for input messages
>> From: sarah.gos...@
On Tue, 25 Jun 2013, Rguy writes:
> Is there a simple way to obtain the time of day in R? I want the time of
> day for computational purposes, not for display. I want to be able to
> create code like the following:
>
> if (time_of_day >= 22:00 & time_of_day <= 06:00) then X otherwise Y
On 25/06/2013 06:59, Rguy wrote:
Is there a simple way to obtain the time of day in R? I want the time of
day for computational purposes, not for display. I want to be able to
create code like the following:
if (time_of_day >= 22:00 & time_of_day <= 06:00) then X otherwise Y
which will not par
On Tue, 25 Jun 2013, nevil amos writes:
> I want to print a vector of strings to the console formatted as if it were
> input
>
> X<-c("a","b","c")
>> X
> [1] "a" "b" "c"
>
> what I would like to get is
>
> the.function(X)
>>"a","b","c"
>
> what is the function?
>
the.function <- function(x)
I need something like the writeln in C. I need to make error messages
> Date: Mon, 24 Jun 2013 18:20:13 -0400
> Subject: Re: [R] packages for input messages
> From: sarah.gos...@gmail.com
> To: kicco1...@hotmail.it
> CC: r-help@r-project.org
>
> It sounds like ?stop is what you're looking for.
>
Is there a simple way to obtain the time of day in R? I want the time of
day for computational purposes, not for display. I want to be able to
create code like the following:
if (time_of_day >= 22:00 & time_of_day <= 06:00) then X otherwise Y
I realize I could parse a date/time object and extract
Hi,
I need to generate a barplot in in which the x-labels must to be
perpendiculars to the x-axis
in my data have a list of probability values correspondings to a list
of Countries. In the barplot the name of each Country, under each
bar, appears parallel to the x axis. Is possibile rota
Hello,
Maybe ?cat
cat(X, "\n")
(But it doesn't put the vector elements between quotes.)
Hope this helps,
Rui Barradas
Em 25-06-2013 08:14, nevil amos escreveu:
I want to print a vector of strings to the console formatted as if it were
input
X<-c("a","b","c")
X
[1] "a" "b" "c"
what I wou
Hello,
R is open source. You can download the source code for package sp.
http://cran.r-project.org/web/packages/sp/index.html
Hope this helps,
Rui Barradas
Em 25-06-2013 08:06, Dr. Alireza Zolfaghari escreveu:
Hi list,
I would like to write the function [R_point_in_polygon_sp] in c# as I
fo
I want to print a vector of strings to the console formatted as if it were
input
X<-c("a","b","c")
> X
[1] "a" "b" "c"
what I would like to get is
the.function(X)
>"a","b","c"
what is the function?
cheers
Nevil amos
[[alternative HTML version deleted]]
__
Hi list,
I would like to write the function [R_point_in_polygon_sp] in c# as I
found it a very efficiently written code due to its high speed
calculation. I queried the function name by using
sp::point.in.polygon, but could not get source code. Would someone let
me know how to get the source code p
80 matches
Mail list logo