Dear Sir,I am using RClimDex. I get following error.
Error in `[<-.data.frame`(`*tmp*`, dd$prcp <= (-99), "prcp", value = NA) :
missing values are not allowed in subscripted assignments of data frames
I hope somebody can help me to solve this problem seen I do not know much
about programming.
Reg
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Aaditya Nanduri
> Sent: Wednesday, January 12, 2011 9:31 PM
> To: gleyne...@gmail.com
> Cc: r-help@r-project.org; spec...@stat.berkeley.edu; Uwe Ligges
> Subject: Re: [R] R not rec
I have J Chambers wonderful text ( Software for data Analysis) and I've been
trying
my hand at some very routine S4 OOP development.
One of the things I was trying to do was to create some very basic S4
classes. The first
was simply a class that had a data.frame as part of its representation.
set
On 01/13/2011 11:59 AM, dms wrote:
Hello R-help,
I'm trying to make a fairly simple plot axis that goes something like
this:
plot(-10:10,-10:10, yaxt='n')
axis(side=2, las=1, hadj=1, tck=-.01, cex.axis=.6)
...but as you can see, the labels are not close enough to the y-axis
(where I want them
Hi All,
I am trying to code an R script which gives me the time varying parameters of
the NIG and GH distributions. Further, becasue I think these these time varying
parameters should be more responsive to more recent observations, I would like
to include a weighted likelihood estimation procee
On 01/13/2011 06:19 AM, John Sorkin wrote:
I would like to plot 3-dimensional data on a two-dimensional scatter-plot.
Is there a way I can automatically modify the plot symbol (e.g. changing size
or color) to indicate the value of a third variable? E.g. How can I plot weight
vs. age and indicat
On 01/12/2011 11:15 PM, Yuan Jian wrote:
thanks Jim,
I found gap.plot seperates x axis or y axis into two boxes.
do you know any plot tool that can skip a range in x-axis or y-axis
without lines?
Hi Yu,
You could shift your positive numbers down by two, plot those adjusted
numbers without an x
On Wed, Jan 12, 2011 at 7:35 PM, Gene Leynes wrote:
> I like the zoo package, and there are several helpful examples.
> library(zoo)
>
> You can easily convert your data into a zoo object using
> I was actually just doing this using this function:
> LoadReturnData=function(x){
> ret = read.csv(
@ Daniel Nordlund : I've also tried the dir that you recommended. R is still
not recognized as a command in CMD.exe
@ Uwe Ligges : There are no blanks before or after the semicolon. I added
them after I copied it so that it would be more legible. And for some of the
dir's in the path, having a bac
On Jan 12, 2011, at 11:11 PM, tde...@cogpsyphy.hu wrote:
Dear List,
I would like to print a plot into pdf. The problem is that the
character
\U0171 is replaced by a simple 'u' (i.e. without accents) in the pdf
file.
Example:
# this works fine
plot(1,type="n")
text(1,1,"print \U0171")
#
On 11-01-12 9:33 PM, John Sorkin wrote:
> I would like to plot 3-dimensional data on a two-dimensional
scatter-plot.
> Is there a way I can automatically modify the plot symbol (e.g.
changing size or color) to indicate the value of a third variable? E.g.
How can I plot weight vs. age and indica
Hi Walter,
The paper can be found at
http://cran.r-project.org/web/packages/vars/vignettes/vars.pdf It seems
that you need the "vars" library before trying the function you mention.
What happens if you do the following?
install.packages("vars")
require(vars)
?cajorls
?ca.jo
HTH,
Jorge
On Wed
On Jan 12, 2011, at 7:59 PM, dms wrote:
Hello R-help,
I'm trying to make a fairly simple plot axis that goes something like
this:
plot(-10:10,-10:10, yaxt='n')
axis(side=2, las=1, hadj=1, tck=-.01, cex.axis=.6)
...but as you can see, the labels are not close enough to the y-axis
(where I wa
On Jan 12, 2011, at 10:54 PM, Sebastián Daza wrote:
Hi everyone,
I am new in R and programming. I have tried to remove the values out
of range in some variables using a loop:
1)
var <- names(est8vo[, 77:83]) # I got the variable names
> var
[1] "p16.1" "p16.2" "p16.3" "p16.4" "p16.5"
Hi Dennis,
SOLVED!!!
My thanks to both you, John, and others who chimed in. Took a little more
digging before finally working, but it is working!
Here's a little more of what I did and the ultimate resolutions:
I installed the reshape2 library from CRAN.
Executed
> (.packages())
[1] "reshape2"
How can achieve this in R using seq, or rep function
c(-1,0,1,0,-1,0,1,0,-1,0)
The range value is between-1 and 1, and I want it such that there could be
n number of points between -1 and 1
Anyone? Please help Thanks
Rusty
[[alternative HTML version deleted]]
_
Dear all,
I executed svm calculation using e1071 library with a microarray data
(http://www.iu.a.u-tokyo.ac.jp/~kadota/R/data_Singh_RMA_3274.txt).
Then, I shuffled the data samples and executed svm calculation again.
The results of 2 calculation were different (in SV, coefs and weights).
I attac
Dear List,
I would like to print a plot into pdf. The problem is that the character
\U0171 is replaced by a simple 'u' (i.e. without accents) in the pdf file.
Example:
# this works fine
plot(1,type="n")
text(1,1,"print \U0171")
# this fails
pdf("trial.pdf")
plot(1,type="n")
text(1,1,"print \U01
Dear all,
I have a question. How to get the standard errors of alpha and beta
when using "ca.jo" to test cointergration?
In the paper by Bernhard Pfaff and Kronberg im Taunus âVAR, SVAR and SVEC
Models: Implementation Within R Packageâ pp.24-25. The standard errors are
listed on the table
Dear R community,
I am trying to understand what the shell() function does.
An example is:
xfile <- shell(paste("dir/b ",
paste(directory.folder,"file.name",sep="")),intern=T)
I'm afraid I wasn't able to completely understand the explanation under the
Help files.
Thanks for your help!
Leanne
I like the zoo package, and there are several helpful examples.
library(zoo)
You can easily convert your data into a zoo object using
I was actually just doing this using this function:
LoadReturnData=function(x){
ret = read.csv(x)
ret = zoo(ret[ , -1], as.Date(ret[ , 1]))
colnames(ret
Hello R-help,
I'm trying to make a fairly simple plot axis that goes something like
this:
plot(-10:10,-10:10, yaxt='n')
axis(side=2, las=1, hadj=1, tck=-.01, cex.axis=.6)
...but as you can see, the labels are not close enough to the y-axis
(where I want them... to save space for publication).
Hi everyone,
I am new in R and programming. I have tried to remove the values out of
range in some variables using a loop:
1)
var <- names(est8vo[, 77:83]) # I got the variable names
> var
[1] "p16.1" "p16.2" "p16.3" "p16.4" "p16.5" "p16.6" "p16.7"
for (i in 1:7) {
var.i <- var[i]
est8
Tena koe Steve
Convert your data into a matrix:
dataMat <- matrix(c(bline_precip[10,9], bline_runoff[10,9],
cccma_precip[10,9], cccma_runoff[10,9],
csiro_precip[10,9], csiro_runoff[10,9],
ipsl_precip[10,9], ipsl_runoff[10,9],
Hello list,
Ive been trying to get OpenBUGS running on my mac using the wine emulator. I
can run Openbugs just fine by doing:
wine ~/OpenBUGS312/OpenBUGS.exe
In the terminal, so OpenBUGS works. When I try to run the schools example
using rbugs(), the OpenBUGS process starts in wine, but it ju
Hello list,
I’ve been trying to get OpenBUGS running on my mac using the wine
emulator. I can run Openbugs just fine by doing:
wine ~/OpenBUGS312/OpenBUGS.exe
In the terminal, so OpenBUGS works. When I try to run the schools
example using rbugs(), the OpenBUGS process starts in wine, but i
I would like to plot 3-dimensional data on a two-dimensional scatter-plot.
Is there a way I can automatically modify the plot symbol (e.g. changing size
or color) to indicate the value of a third variable? E.g. How can I plot weight
vs. age and indicate the value of muscle mass for each value wei
That also drives me crazy!
I don't have that problem when I use the StatEt plug-in for Eclipse.
Of course, using a new IDE is a big undertaking, but I can assure you: it's
worth it! This is just one small benefit.
On Wed, Jan 12, 2011 at 4:00 PM, Feng Li wrote:
> Dear R,
>
> How can I disable
Thanks to Brian & David! For some reason, I'd thought to use "{", but
not "(". I guess I can chalk that up to a slow brain. Interestingly (and I
didn't bother to figure out why), the "{" didn't work for me. But I tried a
few cases, and "(" always seems to work, so far.
On 1/12/11 6:12 PM, Martin Morgan wrote:
The Bioconductor project has many tools for dealing with
sequence-related data. With the data
k <- read.table(textConnection(
"chr132375463237547rs523104280+
chr132375493237550rs520975820+
chr24513326451332
I wish to estimate sparse causal networks from simulated time series data.
Although there's some discussion about this problem in the literature (at
least a few authors have used lasso and l(1,2) regularization to enforce
sparsity in multivariate autoregressive models, e.g.,
http://user.cs.tu-berli
Or, if for some reason the lists differ in length...
test=list(a=list(1,2),b=list(3,4),c=list(5,6,7))
picker <- function(x, i) {
if(length(x)>=i)
x[[i]]
else
NA
}
pick <- function(list,i) {
sapply(list, function(x) picker(x, i))
}
> pick(test, 1)
a b c
1 3 5
> pick(test, 2)
a b c
2 4 6
Dear all,
I am trying to make a barplot with clustered pairs of bars, using class=numeric
data and the following command:
barplot(c(bline_precip[10,9], bline_runoff[10,9], cccma_precip[10,9],
cccma_runoff[10,9], csiro_precip[10,9], csiro_runoff[10,9], ipsl_precip[10,9],
ipsl_runoff[10,9], m
?aggregate
I would transfer your date character sting into a date object (as.POSIXct) and
then extract month or week numbers (?format) from this vector and use them as
indices for the aggregate function. There may be more elegant ways though
HTH
Jannis
--- analys...@hotmail.com schrieb a
On Jan 12, 2011, at 5:46 PM, Mike Williamson wrote:
Hello,
A hopefully simple question. I use 'R' through emacs, but I
suspect the
following would occur with any manner of text editor:
- my editor has a normally quite handy feature where it will
automatically indent to the appropri
On 1/12/2011 2:52 PM, Duke wrote:
Hi folks,
I am working on a project that requires subsetting of a found file
based on some known file. The known file contains several lines like
below:
chr132375463237547rs523104280+
chr132375493237550rs520975820+
chr
On 1/12/2011 2:46 PM, Mike Williamson wrote:
Hello,
A hopefully simple question. I use 'R' through emacs, but I suspect the
following would occur with any manner of text editor:
- my editor has a normally quite handy feature where it will
automatically indent to the appropriate le
Hi folks,
I am working on a project that requires subsetting of a found file based
on some known file. The known file contains several lines like below:
chr132375463237547rs523104280+
chr132375493237550rs520975820+
chr245133264513327rs2976928
Hello,
A hopefully simple question. I use 'R' through emacs, but I suspect the
following would occur with any manner of text editor:
- my editor has a normally quite handy feature where it will
automatically indent to the appropriate level when I start a new line.
However, this occa
There are a number of functions in the package to inquire about the
file contents. See library(help = RNetCDF).
For example:
library(RNetCDF)
nc <- open.nc("file.nc")
var.inq.nc(nc, 0)
$id
[1] 0
$name
[1] "longitude_U"
$type
[1] "NC_DOUBLE"
$ndims
[1] 1
$dimids
[1] 1
$natts
[1] 0
You can
Hi Jannis,
although I don't know how you'd do that with RNetCDF, with the ncdf
package it's pretty easy:
ncid = open.ncdf( 'file.nc' )
nvars = ncid$nvars
for( ivar in 1:nvars )
print(paste("var number",ivar,"is named", ncid$var[[ivar]]$name, "and
has units", ncid$var[[ivar]]$units ))
Regards
Dear List,
does anybody has experience with the RNetCDF package? I manage to open a
connection and copy data from a ncdf file but would need a way to automatically
retrieve variable names (ideally all of them from one file) and units from the
file.
Any ideas?
Jannis
__
Dear R,
How can I disable using "enter" key to exit the browser() in debug mode? I
would love to have this option because it is so annoying to jump out of the
debugging mode unexpectedly when I don't want to. I guess some of us have
encouraged at least one of these situations,
1, Accidentally pre
... But I would think that month should be treated as a cyclical
quantity, not as a factor with 12 independent levels, e.g. by
transforming month to sin( 2*pi*monthNumber/12) . This assumes 1
year periodicity, which might not be right, of course. Time series
methods could obviously be relevant he
Hi:
This seems like a problem that is well suited for the cast() function in
package reshape2. Here's a toy example:
library(reshape2)
df <- data.frame(idnum = rep(101:104, c(3, 2, 4, 3)),
lab = unlist(sapply(c(3, 2, 4, 3), function(x)
sample(LETTERS[1:6], x))),
> sapply(test, '[[', 1)
a b c
1 3 5
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Jannis
> Sent: Wednesday
Google on "R Graph Gallery" to find examples with code.
You can also almost certainly RSiteSearch() on appropriate keys to
find a pre-existing function (which someone may provideyou on the
list).
Also:
?symbols
-- Bert
On Wed, Jan 12, 2011 at 11:19 AM, John Sorkin
wrote:
> I would like to plot
You could always create a new vector, something like
Xprime<- if x<-0 x else x-2 #not valid R code
Thus mapping +1 to -1, and shifting everything else down. Fixing the
x-tick labels is left as a homework problem :-)
I'm assuming from your description that there are no y-values
correspondi
Dear list members,
I am stuck with navigating in a rather complicated list object.
In general I would need a solution to access all first (or other) elements of
the different sublists in one list:
test=list(a=list(1,2),b=list(3,4),c=list(5,6))
like:
test[[1:3]][[1]]
which should result in
Hi John,
Thank you for your patience. I was away for a State certification exam
yesterday, so am just getting back to this.
Reading through you response I believe I wasn't clear enough about what I'm
trying to do. Your description seems to rearrange the matrix without grouping
the analytica
I was using ar(stats) to calculate autoregressive coefficient. It works on
vector z, but it will not work on vector rz <-rank (z, ties.method="average").
What did I miss?
Any info will be greatly appreciated. TIA
[[alternative HTML version deleted]]
__
Thanks to all who responded.
On Jan 12, 10:34 am, Peter Ehlers wrote:
> On 2011-01-12 07:16, analys...@hotmail.com wrote:
>
> > I have a dataframe with columns "ID",'date","estimate","actual" (but
> > not necessarily in that order - I do a merge somewhere and that
> > somehow messes up the order
I tried a date by date forecast of a time series and it seems to be
too wild. How can I aggregate the date into weeks or months as
required?
Thanks.
The input looks like
ID datadate("-MM-DD") value_for_day
-- ----
-- --
Look at the symbols function for some options of doing what you suggest (you
can also do a search for "bubble plot" for a couple of other implementations).
If you want to go a bit further than what symbols does for you then look at the
my.symbols function in the TeachingDemos package.
--
Greg
Sorry for the late response. I was away for vacation and was unable to
keep on working on the codes.
Anyway, I was unable to provide *str* of that specific data since they
are all in a big package with lots of inputs/outputs. Quickly gazing
through the code, I narrowed them down (and made a ba
Thanks very much both.
I´m starting playing with it, i was a little afaid because it was part of my
job, but now i've found it very funny.
Josh, I've got just data for 3 representatives months, and it's not a priori
rejectable that could be differences in the ratio of changes along the
months bet
Hi I have tryed to do the meta-regression in metafor package, but I
would like to get the standardized coefficients for each variable, however in
command:
Ø res<-rma.uni (yi, vi,
method="REML", mods=~cota+DL+uso+gadiente+idade, data= turbidez)
I just have the coefficients no standardized (
You don't give an example, but in general you can use a vector for cex with
the values proportional to the third variable.
Same goes for color: col can be a vector, not just a single value.
This has been discussed before on-list, and fairly recently.
Sarah
On Wed, Jan 12, 2011 at 2:19 PM, John
I would like to plot 3-dimensional data on a two-dimensional scatter-plot.
Is there a way I can automatically modify the plot symbol (e.g. changing size
or color) to indicate the value of a third variable? E.g. How can I plot weight
vs. age and indicate the value of muscle mass for each value wei
> Dear all,
> I have some issues with integrate in R thus I would like to request
> your help. I am trying to calculate the integral of f(x)*g(x).
> The f(x) is a step function while g(x) is a polynomial.
> If f(x) (step function) changes its value only few times (5 or 6 'steps')
> everything is ca
Hi,
That is basically correct. You can specify the link as logit (see my
example), but that is the default so you do not strictly need to in
this case. II would encourage you to keep your variables
(prevalencia, edad, sexo, mes) stored in a data frame, in which case
you would add the data = argu
On Jan 12, 2011, at 12:51 PM, gaiarrido wrote:
Hello,
I´m starting with my PhD and I have to stop because i got a little
knowledge
in R and statistics.
I´ve got a model of this kind:
binary response variable: prevalence of infection (0/1)
3 categorical independent variables: sex, month and
I read the help first, and read it again now, but I still don't see why the
warning was generated.
The help seems to state clearly that the user can suppress warnings
"most often, no errors/warnings are printed if package loading fails."
If the package doesn't exist, then it would fail to loa
Thanks Gabor and other for their input. I admit that I must have placed some
reproducible codes on what I wanted. However it was actually in my mind
however I restrained because it was not any R related query rather a general
Statistics related.
Here I am using dummy variables in ***Time series co
Although it could easily be "user error", I never got Rpy or Rpy2 working an
any sort of reliable way.
However I did learn a couple of things about the Windows PATH
First, (as others have mentioned) it's easiest to modify the PATH through
the Windows GUI that comes up when you right click "My Com
Hello,
I experimented the Metafor and Meta packages in the scope of replacing Excel
for meta-analysis. I performed the first working example provided in Michael
Borenstein's book "Introduction to Meta-Analysis" with Excel, Metafor and
Meta.
The numbers given by my spreadsheet, which I vali
Hello,
I´m starting with my PhD and I have to stop because i got a little knowledge
in R and statistics.
I´ve got a model of this kind:
binary response variable: prevalence of infection (0/1)
3 categorical independent variables: sex, month and name of the area
I was trying with a full model li
Gene Leynes writes:
> I think that the "quietly" argument in "require" isn't working
>
> > require('JumboShrimp', quietly=TRUE)
> Warning in library(package, lib.loc = lib.loc, character.only = TRUE,
> logical.return = TRUE, :
> there is no package called 'JumboShrimp'
> >
Isn't quietly mean
On 12.01.2011 18:53, Gene Leynes wrote:
I think that the "quietly" argument in "require" isn't working
require('JumboShrimp', quietly=TRUE)
Warning in library(package, lib.loc = lib.loc, character.only = TRUE,
logical.return = TRUE, :
there is no package called 'JumboShrimp'
?require
I think that the "quietly" argument in "require" isn't working
> require('JumboShrimp', quietly=TRUE)
Warning in library(package, lib.loc = lib.loc, character.only = TRUE,
logical.return = TRUE, :
there is no package called 'JumboShrimp'
>
By the way, the behavior is the same with options(warn
On 12.01.2011 18:13, Daniel Nordlund wrote:
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Aaditya Nanduri
Sent: Wednesday, January 12, 2011 8:44 AM
To: Uwe Ligges
Cc: r-help@r-project.org; spec...@stat.berkeley.edu
Subject: Re:
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Aaditya Nanduri
> Sent: Wednesday, January 12, 2011 8:44 AM
> To: Uwe Ligges
> Cc: r-help@r-project.org; spec...@stat.berkeley.edu
> Subject: Re: [R] R not recognized in command li
thx a lot Jim. sprintf solved my problem.
Ray
On Mon, Jan 3, 2011 at 3:40 PM, jim holtman wrote:
> 'sprintf' if your friend:
>
>> dummy3 = c(1.1, 2.2, 3.3)
>> dummy4 = c(4.4, 5.5, 6.6, 7.7)
>> dummy2 = c(8.8, 9.9)
>>
>> cat(sprintf("%5.1f%6.2f%7.3f\n", dummy3[1], dummy3[2], dummy3[3]))
> 1.1
Im sorry for the late reply.
The output to echo %PATH% :
C:\GTK\bin; C:\Program Files\MiKTeX 2.8\miktex\bin ;C:\Windows\system32
;C:\Windows
;C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program
Files\MATLAB\R2008a\bin; C:\Program Files\MATLAB\R2008a\bin\win32;
C:\Pr
Dear All,
I'd like to perform adonis (from the vegan package) rather than amova
(in ade4) on some haplotype data, as I have crossed factors. Is there a
simple way to tweak the source to allow weights (haplotype frequencies)
in a similar way to amova?
Best
Simon
__
On 12.01.2011 15:53, JP wrote:
Hi there Rers
I am trying a very basic stars plot:
x<-matrix(c(1,4,3,1.1,2,3,4,3,1,1,5,2), ncol = 3, byrow = TRUE,
dimnames=list(c("a","b","c","d"),c("x","y","z")))
stars(x, draw.segments = TRUE, radius=TRUE)
Can anyone explain what I am seeing there - EAC
On Jan 12, 2011, at 6:10 AM, Federico Bonofiglio wrote:
Hello Masters,
wishing you all a great 2011 I was also going to ask if anyone knows
a quick
and efficient way to plot a regression plane (z~x*y).
There are many. There are limitations to using the ?? operator in that
it only brings
Or with ddply :
library(plyr)
dat <- structure(list(ED = c(21.809467, 36.229566, 51.861284, 11.36232,
27.264634, 12.261986, 46.519313, 7.815376, 2.810428, 13.478372,
35.670182, 27.128715, 19.010294, 15.475368, 18.597983, 29.292615,
6.749846, 14.981488, 14.93511, 14.93511, 21.040785, 8.271615,
12.94
Hi
r-help-boun...@r-project.org napsal dne 12.01.2011 16:16:16:
> I have a dataframe with columns "ID",'date","estimate","actual" (but
> not necessarily in that order - I do a merge somewhere and that
> somehow messes up the order of the columns).
If you have datafreme with column order a, b, c,
On 2011-01-12 07:16, analys...@hotmail.com wrote:
I have a dataframe with columns "ID",'date","estimate","actual" (but
not necessarily in that order - I do a merge somewhere and that
somehow messes up the order of the columns).
How can I output it to a csv file with the columns in the order that
You forgot to load the required packages on the client nodes by
sfLibrary(fCalendar)
sfLibrary(fractalrock)
and you really should not tryCatch without evaluating the errors for
yourself.
Best wishes,
Uwe Ligges
On 12.01.2011 09:47, Santosh Srinivas wrote:
Hello,
Just wondering why I am u
Hi!
Let's say your data.frame is called df and that you want column 1, then
column 4, then 3 and then 2:
df <- data.frame(ID=LETTERS[1:5], date=rnorm(5), estimate=rnorm(5),
actual=rnorm(5))
write.csv(df[c(1,4,3,2)], file="df.csv")
HTH,
Ivan
Le 1/12/2011 16:16, analys...@hotmail.com a écrit :
Hi,
This question is about the package gplots and the function heatmap.2. I'm
not a programmer and I did not understand the answers I found when I googled
it. Thank you in advance.
A similar question was asked with title "heatmap color distribution" in 2005
and got the answer to use breaks. When
Hi there Rers
I am trying a very basic stars plot:
x<-matrix(c(1,4,3,1.1,2,3,4,3,1,1,5,2), ncol = 3, byrow = TRUE,
>> dimnames=list(c("a","b","c","d"),c("x","y","z")))
>
> stars(x, draw.segments = TRUE, radius=TRUE)
>
>
Can anyone explain what I am seeing there - EACH of my plots should have 3
co
Dear friends
I want to estimate an equation using two-stage least square but suspect that
the model suffers from autocorrelation. Can someone please advise how to
implement bootstrapping method in order to calculate the correct standard
errors in R? Thank you.
Kind regards
Thanaset
--
View t
David and Josh,
Thanks very much for your help, it is much appreciated.
Peter
On 12 Jan 2011, at 14:28, David Winsemius wrote:
There are two functions you need to become familiar with:
?tapply
?ave
If you wanted these summed values to be placed in another column of the same
dataframe, you w
I have no experience with writing C code, but if I have such problems in R
code, I add a line to my function which prints the values to the console:
eg:
fr <- function(x) { ## Rosenbrock Banana function
x1 <- x[1]
x2 <- x[2]
cat (paste(x1, x2, "\n"))
100 * (x2 - x1 * x1)^2 +
Thank you, Greg. The issue was in the simulation logic, where one of
the values was not changing correctly for some iterations...
On Jan 10, 3:20 pm, Greg Snow wrote:
> Not sure, but one possible candidate problem is that in your simulations one
> iteration ended up with fewer levels of a facto
I have a dataframe with columns "ID",'date","estimate","actual" (but
not necessarily in that order - I do a merge somewhere and that
somehow messes up the order of the columns).
How can I output it to a csv file with the columns in the order that I
want?
Thanks.
_
You're right Jim. I have now started to work with list of matrices.
I'm not sure that it is a clean and nice code but it works.
I was wondering if there was a synthetic but advanced tutorial on
list() and associated functions?
Stephane
-- Forwarded message --
From: jim holtman
Dear all,
I have some issues with integrate in R thus I would like to request your help.
I am trying to calculate the integral of f(x)*g(x).
The f(x) is a step function while g(x) is a polynomial.
If f(x) (step function) changes its value only few times (5 or 6 'steps')
everything is calulated ok
Dear R Users, R Core Team,
I currently wonder how to predict the probability of an event with new data
resulting from a finite mixture.
I read the documentation of the flexmix package and the examples of
applications provided on CRAN but I could not find how to predict (except
"manually" but
Hi Peter,
R has some fairly flexible ways of passing values of some variable (X)
by another (the INDEX) to different FUNctions. Here is an example
using your data:
## your email data, in convenient form
dat <- structure(list(ED = c(21.809467, 36.229566, 51.861284, 11.36232,
27.264634, 12.261986,
There are two functions you need to become familiar with:
?tapply
?ave
If you wanted these summed values to be placed in another column of
the same dataframe, you would use ave. If you wanted a new structure
(somewhat shorter) you would use tapply with sum as the function. E. g:
tapply(eco
Hi,
I used linear discriminant analysis (lda) to classify and to
cross-validate samples of two plant species based on morphometric data
and to identify the variables that best discriminate between the two
species.
Because some of the variables are not, and can not be transformed to be,
normal
Hi All,
I've put together some script which gives me the parameters of a modified
NIG distribution. Now I'd like to include a weighted vector within the
maximization function. The code below gives me parameter estimates which are
implicitly equally weighted.
nig.par.fit <- try(optim(vega,
thanks Jim,
I found gap.plot seperates x axis or y axis into two boxes.
do you know any plot tool that can skip a range in x-axis or y-axis without
lines?
regards
YU
--- On Wed, 12/1/11, Jim Lemon wrote:
From: Jim Lemon
Subject: Re: [R] plot: skip a range of axis
To: "Yuan Jian"
Cc: r-help
Dear List,
I have a question of convenience,
I am looking to sum the values of one column based on another column - a
example may help explain better!
ED ECOCODE
21.809467 AA0101
36.229566 PA1201
51.861284 PA1201
11.36232PA1201
27.264634 PA12
Caterina,
Did you get an answer to this question? I'm trying to do something similar.
Jason
--
View this message in context:
http://r.789695.n4.nabble.com/Multilevel-pseudo-maximum-likelihood-tp878413p3213583.html
Sent from the R help mailing list archive at Nabble.com.
__
Hello Masters,
wishing you all a great 2011 I was also going to ask if anyone knows a quick
and efficient way to plot a regression plane (z~x*y).
I have tried the regr2.plot{HH} function but it is only an educational tool
and has poor graphical properties.
I also tried to run the following script
1 - 100 of 113 matches
Mail list logo