Hi,
I tried the following one:
z - outer(1:14,1:14,function(i,j)
eval(parse(text=paste(cor(D2_,i,,D2_,j,),sep=
but this doen not work (why?).
Two alternatives which work are either
x - matrix(0,length(D2_1,14)
for (i in 1:14) x[,i] -
eval(parse(text=paste(D2_,i,sep=)))
z - cor(x)
or
z -
Dear everyone,
I'm encountering an unknown error message when using gamm function:
fitoutput -
gamm(cvd~as.factor(dow)+pm10+s(time,bs=cr,k=15,fx=TRUE)+s(tmean,bs=cr,k=7,fx=TRUE)
+
,correlation=corAR1(form=~1|city),family=poisson,random=list(city=~pm10),data=mimp)
Maximum number of
Dear Sir/Madam,
I have tried to upload data in R but it showing some error
in command window. It's should be noted that I am using Mac version of
R. I am using Mac-text for writing my data. I am getting following
message on the command window.
Try:
dat - read.table(/Users/kamleshkumar/Desktop/DS1.txt, header=TRUE)
Please also read the F documentation. The use of read.table is in An
Introduction to R for example.
Simon.
On Wed, 2008-05-21 at 08:13 +0200, Kamlesh Kumar wrote:
Dear Sir/Madam,
I have tried to upload data
EW == Edward Wijaya [EMAIL PROTECTED]
on Wed, 21 May 2008 11:52:17 +0900 writes:
EW Hi Peter,
EW Thanks.
EW as.matrix() does the trick.
and ... again my perennial remark to the above trick :
Do use data.matrix(dd) instead of
as.matrix(dd)
if dd is a data
Dear Sir/Madam,
I have only started using a R-written script for modeling the distribution of
disease vector species. Part of the script is to make a large GIS grid for use
with GIS software, but it seems I have a memory problem. I get the following
message:
Reached total allocation of
Hi,
I just started using R for about one week and I have few problems.
i)I have a problem in finding right function to convert a table of natural
numbers to bitwise. For a simple example;
I have the below table:-
Column Col1 Col2 Col3
Sample1 57 10
Sample2 02 1
What version of mgcv are you using, please?
On Wednesday 21 May 2008 06:16, Lung-Chang Chien wrote:
Dear everyone,
I'm encountering an unknown error message when using gamm function:
fitoutput -
gamm(cvd~as.factor(dow)+pm10+s(time,bs=cr,k=15,fx=TRUE)+s(tmean,bs=cr,k
=7,fx=TRUE) +
Hallo
[EMAIL PROTECTED] napsal dne 21.05.2008 09:42:40:
Hi,
I just started using R for about one week and I have few problems.
i)I have a problem in finding right function to convert a table of
natural
numbers to bitwise. For a simple example;
I have the below table:-
Column Col1
Hi!
If I'm plotting 2 variables with the same units
(i.e. wing length of 2 species), how can I force that X
and Y axes have the same size for length unit? For example, if
X ranges from 0 to 10 and Y ranges from 10 to 30, I want
Y axis to be twice as long as X axis. I know I can just
put xlim and
fdf dataframe contains
the data as follows
bin rate overlay x
1 90 Assign First/cc _from_SN_53 RNC_20_to_SN_50
RNC_21_Success Rate (04/01/08 16:02:30)
2 93 Assign First/cc _from_SN_53 RNC_20_to_SN_50
RNC_21_Success Rate (04/01/08 16:07:30)
1 90
Presumably you are using Windows without telling us. Please study the
appropriate section of the rw-FAQ (and also the posting guide).
On Wed, 21 May 2008, Roy Williams wrote:
Dear Sir/Madam,
I have only started using a R-written script for modeling the
distribution of disease vector
Hello.
Try the to set asp=1 (aspect ratio between y- and x-axis):
plot(runif(10, 0, 10), runif(10, 10, 30), asp=1)
Best
Ivar Herfindal
Agustin Lobo skrev:
Hi!
If I'm plotting 2 variables with the same units
(i.e. wing length of 2 species), how can I force that X
and Y axes have the same
Thanks, I looked
into the man pages of par() and
did not into the ones of plot()
Sorry about it,
Agus
Richard Rowe escribió:
plot(runif(10,0,10),runif(10,10,30),xlim=c(0,10),ylim=c(10,30), asp=1)
asp is the aspect parameter and ensures x y metrics are the same (try
the plot without it).
To
Hi there,
I use R and I would like to be able to modify a file .txt init_file like this
one :
# #
# Parameters A
# #
# Parameter 1
PA1 = 15
Hi, I work on the date format: mmdd. I would like to calculate the number
of (working or trading) days between two of such specified dates in specific
year at US stock exchange OR at least with respect to 252-days year.
What I did so far was the conversion (example):
x-20060213; y-20060402 #
On Wed, May 21, 2008 at 04:44:32AM -0700, threshold wrote:
Hi, I work on the date format: mmdd. I would like to calculate the number
of (working or trading) days between two of such specified dates in specific
year at US stock exchange OR at least with respect to 252-days year.
What I
Anne-Marie Ternes [EMAIL PROTECTED] writes:
What I would like to do, is to be able to get 2 types of output with
the same code (I'm lazy ;-) ):
...
2. a PDF and HTML file *per chapter*, for displaying on our website
and allowing people to download individual chapters
...
BTW, I'm
Thanks for the help provided to fit the model. I still have two questions:
1) What is the syntax for nested fixed and random factors. I have tried
using the %in% operator but it does not work. The model I want to fit would
be as follow:
lmer 1 - lmer(Growing ~ Seed + Species%in%Seed +
Our final year students rank 5 classes (1st, 2nd, ..., 5th), and are
allocated 3, based on their choices and a minimum class size.
We want to maximise satisfaction (students getting their higher
preferences), but have a minimum viable class size.
Is there an algorithm out there to help, in R
Hi!
Does anyone know hot to save (to png, pdf, ...) only plot area. That is
without box around, titles, axis, ...
I tried: par(mar=c(0,0,0,0)) and it works for internal viewer (linux and
windows).
But when I save the image in png it adds that annoying margin around
plot area.
Any ideas?
by,
on 05/21/2008 08:02 AM Tine wrote:
Hi!
Does anyone know hot to save (to png, pdf, ...) only plot area. That is
without box around, titles, axis, ...
I tried: par(mar=c(0,0,0,0)) and it works for internal viewer (linux and
windows).
But when I save the image in png it adds that annoying margin
On 5/21/2008 9:02 AM, Tine wrote:
Hi!
Does anyone know hot to save (to png, pdf, ...) only plot area. That is
without box around, titles, axis, ...
I tried: par(mar=c(0,0,0,0)) and it works for internal viewer (linux and
windows).
But when I save the image in png it adds that annoying margin
On 05/19/08 13:46, Jens Oldeland wrote:
Dear All,
a short and maybe simple question:
I have to rank all values in a matrix from 0 to X,
[1] [2] [3] [4]
[1] 0.1 2 03
[2] 50 3 31
[3] 100 1 10
[4] 100 2 20
0-0
0.1-1
2-2
3-3
50-4
100-5 (X=5)
Does
Instead of trying to modify the file, why not generate it from the data that
you have. Is the array in your mail an example of one of many that have the
configuration data? If so, why don't you just create the output file from
that data. You can just loop through and do 'writeLines' to create
Le mer. 21 mai à 04:38, Petr PIKAL a écrit :
Hallo
[EMAIL PROTECTED] napsal dne 21.05.2008 09:42:40:
Hi,
I just started using R for about one week and I have few problems.
i)I have a problem in finding right function to convert a table of
natural
numbers to bitwise. For a simple
Here is an example of how to create the init files:
x - read.table(textConnection( PA1 PA2 PA3 PB1
j=1 122 15
j=2 103 24
j=3 114 36), header=TRUE)
closeAllConnections()
Dear Anne-Marie,
we had a similar problem to handle the LaTeX book that ships with the
seqinr package (http://pbil.univ-lyon1.fr/software/seqinr/seqinr_1_1-5.pdf).
Here is basically the approach we have used:
o Each book chapter is written first as a LaTeX article produced by Sweaving
its
I have a function that creates a list based on some clustered data:
mix - function(Y, pid) {
hc = gethc(Y,pid)
maxheight = max(hc$height)
noingrp = processhc(hc)
one = noingrp$one
two = noingrp$two
twoisone = one
if (two != 1)
twoisone = more
out = list(pid = pid,one = noingrp$one, two =
The version is mgcv 1.3-27. Last night, I dropped out many arguments from my
program to test which part
might be the source of causing this error message, and found that the
program works when just using corAR1().
This program has no this kind of problem in the beginning, but doesn't work
after I
Hello,
I've got a matrix consisting of one column with n rows. Each field in
the matrix is filled with a character vector.
I would like to convert this matrix into a character vector containing
the B03_MAH-type entries from the beginning of each row and a data.frame
that contains the
x - B03_MAH 0.2115 0.2087 0.2087 0.2147 0.2115 0.2176
strsplit(x, +)
[[1]]
[1] B03_MAH 0.2115 0.2087 0.2087 0.2147 0.2115 0.2176
-Christos
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kim Milferstedt
Sent: Wednesday, May 21,
Try this:
t(rowsum(t(Mat), substr(colnames(Mat), 1, 1)))
On Wed, May 21, 2008 at 2:22 PM, Gregory Gentlemen
[EMAIL PROTECTED] wrote:
I am looking for an efficient way to solve the following problem. I have a
large matrix of continuous values with a small proportion of missing values.
Hello,
I really enjoy using R for my plotting. I have a modest plot, containing
24 data points, across 2 lines,12 points each. Ideally, the x-axis would
be labeled with a series of strings, oriented vertically. Here is the R
container holding the Search strings:
Search
[1] Route To: NCENGR
Here is one example:
y - rnorm(12)
x - 1:12
par(mar=c(10, 4, 4, 1)+0.1)
plot(x,y, xlab='', xaxt='n')
axis(1, at=x, labels=month.name, las=2)
See help on par and axis for details.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801)
On 5/21/2008 2:56 PM, John wrote:
Hello,
I really enjoy using R for my plotting. I have a modest plot, containing
24 data points, across 2 lines,12 points each. Ideally, the x-axis would
be labeled with a series of strings, oriented vertically. Here is the R
container holding the Search
hi,
Anyone here know well of the fac.design of S-plus? I need to rewrite the
following code in R
code in S-plus
*pt.design = fac.design( c(2,2,3,2),factor.names = list(Hs=c(I,II),lef =
c(0,1),lep = c(0,1,2),Type=c(gt,sy)))
c.design=fac.design(
Hello!
I´m Ana Carolina from UNICAMP (Campinas - SP - Brazil) and wonders, if there
is someone interested and qualified, to give a course of R during one week
in UNICAMP for the Department of Social and Preventive Medicine.
We need to be some lessons on use of mgcv, gam and VGAM packages.
If
hi,
Anyone here know well of the fac.design of S-plus? I need to rewrite the
following code in R
code in S-plus
*pt.design = fac.design( c(2,2,3,2),factor.names = list(Hs=c(I,II),lef =
c(0,1),lep = c(0,1,2),Type=c(gt,sy)))
c.design=fac.design(
I want to find the DOY (Day of Year) of some dates. I think to substract the
date 1. January from the data to achive this. Something like:
d - as.Date(2006-03-13) - as.Date(2006-01-01) +1
d
Time difference of 72 days
So far so good. But d is a 'difftime' object. How do I get an Integer value
Try :
as.numeric(d)
or also:
unclass(d)
On Wed, May 21, 2008 at 5:04 PM, Martin Hvidberg [EMAIL PROTECTED]
wrote:
I want to find the DOY (Day of Year) of some dates. I think to substract
the date 1. January from the data to achive this. Something like:
d - as.Date(2006-03-13) -
Or, convert your object of class Date to POSIXlt, and then use the yday
element of the resulting list. Example:
today - Sys.Date()
as.POSIXlt(today)$yday
Erik
Martin Hvidberg wrote:
I want to find the DOY (Day of Year) of some dates. I think to substract the
date 1. January from the data
Martin Hvidberg wrote:
I want to find the DOY (Day of Year) of some dates. I think to substract the
date 1. January from the data to achive this. Something like:
d - as.Date(2006-03-13) - as.Date(2006-01-01) +1
d
Time difference of 72 days
So far so good. But d is a 'difftime'
Hi R People!
Is there a quick way to generate help files for functions, please?
I know that if you use package.skeleton, that will work. However,
I'm not using that for a new package.
(Hope this make sense)
this is for SUSE10.1, please.
thanks,
Erin
--
Erin Hodgess
Associate Professor
Hi,
try prompt(yourFunction)
hope thus helps,
baptiste
On 21 May 2008, at 21:40, Erin Hodgess wrote:
Hi R People!
Is there a quick way to generate help files for functions, please?
I know that if you use package.skeleton, that will work. However,
I'm not using that for a new package.
Now that this part is working there are two more aspects of the plot I
would like to remove: (in order of importance)
* The row/column facetting labels.
You should be able to find that using grid.ls()
* the whitespace that surrounds the plot. I'd like the ggsave output to
resemble the
On 5/21/08, Michael Kubovy [EMAIL PROTECTED] wrote:
Dear R-helpers,
(1) How do I add a 'top' label symmetric with the 'bottom' label' in:
axis.td -
function(side, ...)
{
ylim - current.panel.limits()$ylim
switch(side,
bottom = {
I am using R in a Windows environment.
I store my data in a Microsoft SQL database that gets updated automatically
nightly. Once my SQL db is updated, I wish to automatically run an R script
Any tips on good ways to approach this task?
Is there an easy way to launch an R script using the
You might try cron job under Windows.
http://drupal.org/node/31506
HTH.
- Edward
On Thu, May 22, 2008 at 8:51 AM, Thomas Pujol [EMAIL PROTECTED] wrote:
I am using R in a Windows environment.
I store my data in a Microsoft SQL database that gets updated automatically
nightly. Once my SQL
Hi,
I tried to compute maximum likelihood under gamma distribution,
using nlm function. The code is this:
__BEGIN__
vsamples- c(103.9, 88.5, 242.9, 206.6, 175.7, 164.4)
mlogl - function(alpha, x) {
if (length(alpha) 1) stop(alpha must be scalar)
if (alpha = 0) stop(alpha must be
Thank you! Your interpretation was correct.
I'll remember to be more specific next time. Thank you for being
patient and understanding.
Jacques
On 5/21/08, jim holtman [EMAIL PROTECTED] wrote:
Not sure exactly what you want since you did not provide any data or an
example of the expected
Jacques,
you should be able to construct a solution from cumsum().
Cheers
Andrew
On Wed, May 21, 2008 at 08:48:29PM -0500, Jacques Wagnor wrote:
Dear List,
Does there exist a function that calculates a cumulative average?
Neither running() from library(gregmisc) nor running.mean() from
Try:
mlogl_out - nlm(mlogl, mean(vsamples), vsamples)
or
mlogl_out - nlm(mlogl, mean(vsamples), x=vsamples)
The argument vsamples=vsamples is passed to mlogl, since nlm does not
recognize it. But mlogl doesn't have a vsamples argument, only alpha
and x arguments. So you have to either
Thanks so much.
- Edward
On Thu, May 22, 2008 at 11:17 AM, Charilaos Skiadas [EMAIL PROTECTED] wrote:
Try:
mlogl_out - nlm(mlogl, mean(vsamples), vsamples)
or
mlogl_out - nlm(mlogl, mean(vsamples), x=vsamples)
The argument vsamples=vsamples is passed to mlogl, since nlm does not
54 matches
Mail list logo