hi
I used a two nested cycle by if and for by such code
for(ity in 1:4)
{
if (ity==1£©
{
print(ity)
}
}
when I run the code it failed and R tell me that
error: unrespected '}' in }
and when I reduce a }
for(ity in 1:4)
{
if (ity==2£©
{
print(ity)
}
R will print 4 but not 2 as what I repect
I get this error below, there seems to be hidden character in your
input instead of a parenthesis:
for(ity in 1:4)
+ {
+ if (ity==1)
Error: unexpected input in:
{
if (ity==1Ô
{
+ print(ity)
+ }
Error in print(ity) : object 'ity' not found
}
Error: unexpected '}' in }
hth, Ingmar
On Thu,
Hi,
It seems the right prenthesis ) in the if statement is in
different encoding.
From your script:
charToRaw('if (ity==1)')[11:13]
[1] ef bc 89
charToRaw(')')
[1] 29
By changing the right parenthesis, it works fine.
HTH,
Pascal
On 19 December 2013 18:07, Jie Tang totang...@gmail.com
Diana Virkki d.virkki at griffith.edu.au writes:
I apologize if this is a simple question.
I am running GLMM's using glmmML and model averaging with
MuMIn. One of the
parameter estimates for a parameter (firefreq) in the
best model is giving
a positive number, where in reality I know
Hi Luigi
A quick guess with lattice
library(lattice)
structure(list(time = c(18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
Check out the wireframe() function in the R package lattice ...
library(lattice)
?wireframe
Jean
On Wed, Dec 18, 2013 at 9:30 AM, Simon Delay-Fortier
simon.delay-fort...@mail.mcgill.ca wrote:
Hi everyone,I am a very new user of r. I am now mandated to draw a 3-d
surface (and possibly
Dear all, is there an R function to simulate random observations from a cure
fraction model (random observations with long-term survivos).
Some references how can I do this will be welcome.
Best Regards
ML
[[alternative HTML version deleted]]
Dear Francesco,
I wanted to mention that I have just published on CRAN, a package for R,
for the plotting of ternary diagrams.
It is based off ggplot2, which is highly regarded, and, my website can be
viewed at www.ggtern.com, including many examples, specifically including a
case study at
Nice job Nicholas!thanks for the e-mail.
Regards,
Francesco
---
Francesco Nutini
CNR-IREA
Institute for Electromagnetic Sensing of the Environment
Via Bassini 15, 20133 Milano (Italy)
Tel: +39-02 23699 297
www.irea.cnr.it
Dear Walmes,
I wanted to mention that I have just published on CRAN, a package for R,
for the plotting of ternary diagrams.
It is based off ggplot2, which is highly regarded, and, my website can be
viewed at www.ggtern.com, including many examples, specifically including a
case study at the
hello,
i make here my suggeestion of a Ternary Plot as a RSM.
cleber
trimage - function(f){
[[elided Yahoo spam]]
t1 = length(x)
im = aux = numeric(0)
for( i in seq( 1, t1, by = 2 ) ){
#idx = seq( t1**2, i*t1, by = -t1 ) - ((t1 - i):0)
On Dec 16, 2013, at 3:10 PM, Santosh wrote:
Dear Rxperts..
I recently received a data file with the extension .slk. If I save the
file as MS Excel file, I am able to read in R without issues. Is it
possible to read this .slk file without converting into another
R-readable data format?
On Dec 19, 2013, at 5:32 AM, L... L... wrote:
Dear all, is there an R function to simulate random observations from a cure
fraction model (random observations with long-term survivos).
Some references how can I do this will be welcome.
Shouldn't be too hard to set up a mixture of weibull
Dear R-users,
Can someone suggest a good way to keep a list of variables description in R?
Something to provide more detailed information on the variables that I have.
Kind of like this list:
http://www.thearda.com/pals/researchers/VARIABLE_DESCRIPT_LIST%20-%20public.pdfI'd
like to be able to
Greg Snow 538280 at gmail.com writes:
The take home message that you should be learning from your struggles
is to Not Use The 'assign' Function! and Do Not Use Global
Variables Like This.
R has lists (and environments) that make working with objects that are
associated with each other
Sorry the link should be this
one:http://www.thearda.com/pals/researchers/VARIABLE_DESCRIPT_LIST%20-%20public.pdf
From: bac...@hotmail.com
To: r-help@r-project.org
Date: Thu, 19 Dec 2013 13:20:54 -0500
Subject: [R] creating list of variables description
Dear R-users,
Can someone
Dear R experts,
I computed the same integral in two different ways, and find different
values in R.
The difference is due to the max function that is part of the integrand. In
the first case, I keep it as such, in the second case, I split it in two
depending on the values of the variable of
Hello Bill, that is fantastic and it's quite a bit above what I could write. Is
there a way to make the model type an argument to the function so that you can
specify whether one is running glm, lm and such?
I tried to modify it by inserting an argument modelType below, but that doesn't
work.
On Dec 19, 2013, at 10:20 AM, C Lin wrote:
Dear R-users,
Can someone suggest a good way to keep a list of variables description in R?
Something to provide more detailed information on the variables that I have.
Kind of like this list:
Dear R Users
I have a list of functions. Each function in the list is a function of single
variable. I would like to create a function (of one variable) which represents
the sum of all the functions in the list. So, if the functions in my list are
f1(x),..,f5(x) then I would like a new
I think you want to use pmax(x-50, 0), which returns a vector
the length of x, instead of max(x-50,0), which returns a scalar.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf
call[[1]] - quote(modelType) # '
makes call[[1]] the same as as.name(modelType). You want
as.name(modelType).
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-Original Message-
From: Simon Kiss [mailto:sjk...@gmail.com]
Sent: Thursday, December 19, 2013
On Dec 19, 2013, at 11:10 AM, William Dunlap wrote:
call[[1]] - quote(modelType) # '
makes call[[1]] the same as as.name(modelType). You want
as.name(modelType).
Just so I can see if I understand ... that is because `as.name` will evaluate
`modelType` whereas
On Dec 19, 2013, at 11:05 AM, Onur Uncu wrote:
Dear R Users
I have a list of functions. Each function in the list is a function of single
variable. I would like to create a function (of one variable) which
represents the sum of all the functions in the list. So, if the functions in
List - list(abs, function(x)x*10, function(x)x*100)
f - function(x)Reduce(`+`, lapply(List, function(func)func(x)))
f(-1:2)
[1] -1090 111 222
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-Original Message-
From: r-help-boun...@r-project.org
On Dec 19, 2013, at 11:30 AM, David Winsemius wrote:
On Dec 19, 2013, at 11:10 AM, William Dunlap wrote:
call[[1]] - quote(modelType) # '
makes call[[1]] the same as as.name(modelType). You want
as.name(modelType).
Just so I can see if I understand ... that is because
Just so I can see if I understand ... that is because `as.name` will evaluate
`modelType`
whereas as.name(modelType) would look for the function `modelType` and not
find
such a name in the namespace?
Almost. as.name(modelType) will evaluate modelType so modelType could be a
character
List - list(abs, function(x)x*10, function(x)x*100)
f - function(x)Reduce(`+`, lapply(List, function(func)func(x)))
f(-1:2)
[1] -1090 111 222
In that formulation lapply() applies each function in List to x, returning a
list of vectors
containing the results (run it outside of
On Dec 19, 2013, at 11:45 AM, William Dunlap wrote:
Just so I can see if I understand ... that is because `as.name` will
evaluate `modelType`
whereas as.name(modelType) would look for the function `modelType` and not
find
such a name in the namespace?
Almost. as.name(modelType) will
Hi,
Say I have 1000 rasters, or a raster stack composed of 1000 rasters.
I am interested in knowing the percentile for each pixel among these 1000
rasters.
The result would be 1000 rasters, each depicting the percentile value of each
pixel among the 1000 original rasters.
Can anyone please
On Wed, 18-Dec-2013 at 09:28AM +0100, Juan Antonio Balbuena wrote:
|
|Hello
|I am using package multicore for parallel computing in a Altix
UltraViolet
|1000 server with 64 CPUs and 960 GB of RAM memory. Access is
managed by
|means of a SGE queue system. This is the first time
I have played around with it and found that the only color could be changed.
But I really would like to change the width...
Thanks a lot :)
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Hi there: Just to tie this altogether.
Here is the final function
f- function (modelType, responseName, predictorNames, data, ..., envir =
parent.frame())
{
call - match.call()
call$formula - formula(envir = envir, paste(responseName, sep = ~ ,
I do get this error:
Error in glm.control(modelType = glm) :
unused argument(s) (modelType = glm)
Add the line
call$modelType - NULL # omit modelType argument
to your function. Otherwise
f(glm, ...)
makes the call
glm(modelType=glm, ...)
where you want it to make the call
Dear Rxperts..
Thanks for your response... Will keep you posted.
Santosh
On Thu, Dec 19, 2013 at 10:06 AM, David Winsemius dwinsem...@comcast.netwrote:
On Dec 16, 2013, at 3:10 PM, Santosh wrote:
Dear Rxperts..
I recently received a data file with the extension .slk. If I save the
My code seems to be spending most of its time in assignment statements,
in some cases simple assignment of a model frame or model matrix.
Can anyone provide any insights into what's going on, or how to speed
things up?
For starters, is it possible that the reports are not accurate, or that
I am
I'm using Mac OS 10.8.5, Chrome 31 and Safari 6.1.
Recently, when entering anything into the search box here:
http://tolstoy.newcastle.edu.au/R/
I get this response when searching using either Chrome or Safari:
404. That’s an error.
The requested URL /u/newcastlemaths?q=rprofilesa=Google+Search
I use ggplot2 a lot and am wondering why I can't just color with a
function? For example, if value 0 then use red else use green.
How would you guys suggest to color these bar graphs so that positive is
green and negative is red?
ggplot(melt(df,measure.vars=c(data1, data2, data3, data4)),
There is no the help archives... there are numerous archives, some of which
are not of the same quality as others. You might have better luck following the
link included in the footer of every email from this list:
https://stat.ethz.ch/mailman/listinfo/r-help
On 13-12-19 6:37 PM, Ross Boylan wrote:
My code seems to be spending most of its time in assignment statements,
in some cases simple assignment of a model frame or model matrix.
Can anyone provide any insights into what's going on, or how to speed
things up?
You are seeing a lot of time being
Design questions (why...) should go to the package maintainer.
You need to learn to ask complete questions [1] and post in plain text
rather than HTML on this list.
I think that normal practice is to add a factor column that reflects the
coloring you want, and then reference it. E.g.:
Hi all,
How do you fit a sieve analysis data to a statistical function?
I have many sieve analysis data of crushed rocks and I'd like to find out
which statistical distributions describe the particular particle size
distributions (PSD) the best. So basically I need to find fitted parameters
to
On 12/20/2013 08:19 AM, capricy gao wrote:
I have played around with it and found that the only color could be changed.
But I really would like to change the width...
Hi Capricy,
Try this on the first example for hist:
hist(islands)
par(lwd=3)
hist(islands)
Jim
On 12/20/2013 10:38 AM, bradford wrote:
I use ggplot2 a lot and am wondering why I can't just color with a
function? For example, if value 0 then use red else use green.
How would you guys suggest to color these bar graphs so that positive is
green and negative is red?
Hi, Can anyone explain what is going on...!? For a vector
x=seq(min,max,0.01), when generating sub-vector a based on a starting
value st, things go as expected as long as st is not too close to the
beginning of x. For example, if x starts at -5 and increments by 0.01,
whenever I try to generate
Sigh. Google couldn't help you?
Try FAQ 7.31 and then use non-fractions to generate sequences... scale as
desired. This is not unique to R.
---
Jeff NewmillerThe . . Go Live...
46 matches
Mail list logo