Dear Sir,
Thanks for your message. My problem is in writing codes. I did ANOVA for 75000
response variables (let's say Y) with 243 predictors (let's say X-matrix) one
by one with for loop in R. I stored the p-values of all predictors, however,
i have very huge file because i have pvalues of
You could add an extra sequence on the dataframe you wish to sort on.
Merge together, sort by the sequence, delete the sequence.
It's a bit more work, but it will give you what you want.
Bart
--
View this message in context:
Hi everybody,
I'm trying to set the number of decimals (i.e. the number of digits
after the .). I looked into options but I can only set the total
number of digits, with options(digits=6). But since I have different
variables with different order of magnitude, I would like that they're
all
Hi,
I want to estimate parameters of weibull distribution. For this, I am using
fitdistr() function in MASS package.But when I give fitdistr(c,weibull) I
get a Error as follows:-
Error in optim(x = c(4L, 41L, 20L, 6L, 12L, 6L, 7L, 13L, 2L, 8L, 22L,
:
non-finite value supplied by
close,
So I have a vector, lets say
[1] 1.5 1.2
And a matrix
[,1] [,2]
[1,] 1.9 1.3
[2,]-.2 2
I want to somehow use the first number in my vector(1.5) and compare this
number to my whole first column. So I want to see how many times the numbers
in column 11.5 which should be 1 in
Thank you Dennis--this is perfect!!
AC
On Thu, Jan 28, 2010 at 12:24 AM, Dennis Murphy djmu...@gmail.com wrote:
Hi:
There are several ways to do this, but these are the most commonly used:
aggregate() and the ddply() function in package plyr.
(1) plyr solution (using x as the name of your
Hi
I agree with Bert that what you want to do is, how to say it politely, OK,
not reasonable.
If p value is significant depends on number of observations. Let assume
that they are same for each p value.
Then you need your p values in suitable object which you did not reveal to
us. Again I
Hi all,
I need to replace missing values in a matrix by 10 % of the lowest available
value in the matrix. I've got a function I've used earlier to replace negative
values by the lowest value, in a data frame, but I'm not sure how to modify
it...
nonNeg = as.data.frame(apply(orig.df, 2,
How it represents data internally is very important, depending on the real
goal :
http://en.wikipedia.org/wiki/Column-oriented_DBMS
Gabor Grothendieck ggrothendi...@gmail.com wrote in message
news:971536df1001271710o4ea62333l7f1230b860114...@mail.gmail.com...
How it represents data internally
Joel Fürstenberg-Hägg wrote:
Hi all,
I need to replace missing values in a matrix by 10 % of the lowest available
value in the matrix. I've got a function I've used earlier to replace negative
values by the lowest value, in a data frame, but I'm not sure how to modify
it...
nonNeg =
Hi,
Using the package lpSolve API, I need to build a 2000*10 constraint matrix.
I wonder which method is faster:
(a)
model = make.lp(0,0)
add.constraint(model, ...)
or
(b)
model = make.lp(2000,10)
set.constraint(model,...)
Thanks
KC
Thanks a lot Paul!!
Best,
Joel
Date: Thu, 28 Jan 2010 10:48:37 +0100
From: p.hiems...@geo.uu.nl
To: joel_furstenberg_h...@hotmail.com
CC: r-help@r-project.org
Subject: Re: [R] NA Replacement by lowest value?
Joel Fürstenberg-Hägg wrote:
Hi all,
I need to replace
On 01/28/2010 08:35 PM, Joel Fürstenberg-Hägg wrote:
Hi all,
I need to replace missing values in a matrix by 10 % of the lowest available
value in the matrix. I've got a function I've used earlier to replace negative
values by the lowest value, in a data frame, but I'm not sure how to
Hi Jim,
That's what Pauls suggested too, works great!
Best,
Joel
Date: Thu, 28 Jan 2010 20:57:57 +1100
From: j...@bitwrit.com.au
To: joel_furstenberg_h...@hotmail.com
CC: r-help@r-project.org
Subject: Re: [R] NA Replacement by lowest value?
On 01/28/2010 08:35 PM, Joel
Hi Duncan,
On Tue, Jan 26, 2010 at 9:09 PM, Duncan Murdoch murd...@stats.uwo.ca wrote:
On 26/01/2010 3:25 PM, Blanford, Glenn wrote:
Has there been any update on R's handling large integers greater than 10^9
(between 10^9 and 4x10^9) ?
as.integer() in R 2.9.2 lists this as a restriction but
Try to pass a start value to help optim (see ?fitdistr)
Ciao!
mario
vikrant wrote:
Hi,
I want to estimate parameters of weibull distribution. For this, I am using
fitdistr() function in MASS package.But when I give fitdistr(c,weibull) I
get a Error as follows:-
Error in
On 28/01/2010 5:30 AM, Benilton Carvalho wrote:
Hi Duncan,
On Tue, Jan 26, 2010 at 9:09 PM, Duncan Murdoch murd...@stats.uwo.ca wrote:
On 26/01/2010 3:25 PM, Blanford, Glenn wrote:
Has there been any update on R's handling large integers greater than 10^9
(between 10^9 and 4x10^9) ?
This has been seen on two ubuntu systems, but cannot be reproduced elsewhere
- this is a first report for gentoo. The fix (found by Barry Rowlingson) is
to install with R CMD INSTALL --no-latex maptools-blah.tar.gz rather than
install.packages(), with the comment that perl was taking all
On Jan 27, 2010, at 9:41 PM, Steven Kang wrote:
Hi all,
I have imported xlsx file (Excel 2007) into R using the following
scripts.
*library(RODBC)
*
*setwd(...) *
*query - odbcConnectExcel2007(xls.file = GI 2010.xlsx, readOnly =
TRUE)
dat - sqlQuery(query, select * from
Dear R users,
I have a dataframe (main.table) with ~30,000 rows and 6 columns, of
which here are a few rows:
id chr window gene xp.normxp.top
129 1_32 1 32 TAS1R1 1.28882115 FALSE
130 1_32 1 32 ZBTB48 1.28882115 FALSE
131 1_32 1 32
series objects.
Any help would be greatly appreciated.
Thanks in advance,
Costas
__ Information from ESET Smart Security, version of virus signature
database 4813 (20100128) __
The message was checked by ESET Smart Security.
http://www.eset.com
in advance,
Costas
__ Information from ESET Smart Security, version of virus signature
database 4813 (20100128) __
The message was checked by ESET Smart Security.
http://www.eset.com
__
R-help@r-project.org mailing list
https
Its only important internally. Externally its undesirable that the
user have to get involved in it. The idea of making software easy to
write and use is to hide the implementation and focus on the problem.
That is why we use high level languages, object orientation, etc.
On Thu, Jan 28, 2010 at
Smart Security, version of virus signature
database 4813 (20100128) __
The message was checked by ESET Smart Security.
http://www.eset.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Dear R Users,
I am trying to use the function boot of the boot package to sample from a
dataframe of two character variables (N=1127). Each character variable can take
five different values. Here is an example of the data:
1 b95-99.9 d25%
2 b95-99.9 a1%
3 b95-99.9
On 27.01.2010 17:50, Viechtbauer Wolfgang (STAT) wrote:
Just as an aside, the scatterplot3d package does things like this very cleverly.
Essentially, when you create a plot with scatterplot3d, the function actually returns
functions with values set so that points3d(), for example, knows the
On Jan 28, 2010, at 7:05 AM, Irene Gallego Romero wrote:
Dear R users,
I have a dataframe (main.table) with ~30,000 rows and 6 columns, of
which here are a few rows:
id chr window gene xp.normxp.top
129 1_32 1 32 TAS1R1 1.28882115 FALSE
130 1_32 1
Dear Prof. Broström,
Dear R-mailinglist,
first of all thanks a lot for your great effort to incorporate
time-varying covariates into aftreg. It works like a charm so far
and I'll update you with detailled benchmarks as soon as I have them.
I have one more questions regarding Accelerated
If DF is your data frame then:
DF$xp.bg - ave(DF$xp.norm, DF$gene, FUN = min)
will create a new column such that the entry in each row has the
minimum xp.norm of all rows with the same gene. ave does use split
internally but I think it would be worth trying anyways since its only
one short
Do you have any zeros in your data?
fitdistr() will need start values (see the code),
but even with start values, optim() will have problems.
x - rweibull(100, 2, 10)
fitdistr(x, weibull) ## no problem
fitdistr(c(0,x), weibull) ## your error message
fitdistr(c(0,x),
Andrew Rominger ajrominger at gmail.com writes:
I'm trying to permute a vector of positive integers 0 with the constraint
Hi Andy
I'm not sure if you are explicitly wanting to use a sampling approach, but the
gtools library has a permutations function (found by ??permutation then ?
Are you claiming that SQL is that utopia? SQL is a row store. It cannot
give the user the benefits of column store.
For example, why does SQL take 113 seconds in the example in this thread :
http://tolstoy.newcastle.edu.au/R/e9/help/10/01/1872.html
but data.table takes 5 seconds to get the
?formatC
?sprintf
Ivan Calandra wrote:
Hi everybody,
I'm trying to set the number of decimals (i.e. the number of digits
after the .). I looked into options but I can only set the total
number of digits, with options(digits=6). But since I have different
variables with different order of
I just realized I read through your email too quickly and my script does
not actually address the constraint on each permutation, sorry about that.
You should be able to use the permutations function to generate the vector
permutations however.
Jason
I have beautiful box and whisker charts formatted with lattice, which is
obviously calculating summary statistics internally in order to draw the
charts. Is there a way to dump the associated summary tables that are being
used to generate the charts? Realize I could use tapply or such to get
Hi,
I have a list of dates like this:
date
2009-12-03
2009-12-11
2009-10-07
2010-01-25
2010-01-05
2009-09-09
2010-01-19
2010-01-25
2009-02-05
2010-01-25
2010-01-27
2010-01-27
...
and am creating a histogram like this
t - read.table(test.dat,header=TRUE)
Hello,
say I have a dataframe x
and it contains rows like ch_01, ch_02 and so on.
How can I select those channels iundirectly, by name?
I tried to select the data with get() but get() seems only to work
on simple variables?
Or how to do it?
I need something like that:
name1 - ch_01
name2
OK, now it works... just using [ and ] or [[ and ]] works.
I thought have tried it before... why does it workj now and not before?
hmhh
sorry for the traffic
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
On Jan 28, 2010, at 10:04 AM, Oliver wrote:
OK, now it works... just using [ and ] or [[ and ]] works.
I thought have tried it before... why does it workj now and not
before?
Provide your console session and someone can tell you. Failing that,
you are asking us to read your mind.
It looks to me that it does more or less the same as format().
Maybe I didn't explain myself correctly then. I would like to set the
number of decimal by default, for the whole R session, like I do with
options(digits=6). Except that digits sets up the number of digits
(including what is
On Thu, Jan 28, 2010 at 6:25 AM, GL pfl...@shands.ufl.edu wrote:
I have beautiful box and whisker charts formatted with lattice, which is
obviously calculating summary statistics internally in order to draw the
charts. Is there a way to dump the associated summary tables that are being
used
hi,
i have a longitude vector (x) a latitude vector (y) and a matrix of bathymetry
(z) with the dimensions (x,y). I have already succeeded in plotting it with the
image.plot (package 'field') and the contour functions.
But now, I want to make a grid in order to extract easily the bathymetry
That works great. Thanks!
--
View this message in context:
http://n4.nabble.com/Print-lattice-output-to-table-tp1375040p1380862.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
On Fri, Jan 22, 2010 at 2:08 AM, Dieter Menne
dieter.me...@menne-biomed.de wrote:
Deepayan Sarkar wrote:
With a restructuring of the data:
df1 = data.frame(x=0:n, y1=((0:n)/n)^2, y2=1-((0:n)/n)^2, age=young)
df2 = data.frame(x=0:n, y1=((0:n)/n)^3, y2=1-((0:n)/n)^3, age=old)
df =
I'm looking for a scheme to generate a default color palette for
plotting points, lines and text (on a white or transparent background)
with from 2 to say 9 colors with the following constraints:
- red is reserved for another purpose
- colors should be highly distinct
- avoid light colors (like
While I am very happy with and awed by the grid package and its basic
plotting primitives such as grid.points, grid.lines, etc, I was wondering
whether the equivalent of a grid.image() function exists ?
Any pointer would be helpful.
Thanks !
Markus
[[alternative HTML version deleted]]
Hi,
I have a matrix of size 19x512x20 in R. I want to export this file into
another format which can be imported into MATLAB.
write.xls or write.table exports only one dimension.
please send a code if possible. I am very new to R and have been struggling
with this.
Thanks !
Gopi
Ivan Calandra wrote:
It looks to me that it does more or less the same as format().
Maybe I didn't explain myself correctly then. I would like to set the
number of decimal by default, for the whole R session, like I do with
options(digits=6). Except that digits sets up the number of digits
On Wed, 27 Jan 2010, David Winsemius wrote:
On Jan 27, 2010, at 9:09 PM, GlenB wrote:
I have an additive model of the following form :
zmdlfit - lm(z~ns(x,df=6)+ns(y,df=6))
I can get the fitted values and plot them against z easily enough, but I
also want to both obtain and plot the two
Ivan,
The default behavior for print()ing objects to the console in an R session is
via the use of the print.* methods. For real numerics, print.default() is used
and the format is based upon the number of significant digits, not the number
of decimal places. There is also an interaction with
On Thu, 28 Jan 2010, Benilton Carvalho wrote:
Hi Duncan,
On Tue, Jan 26, 2010 at 9:09 PM, Duncan Murdoch murd...@stats.uwo.ca wrote:
On 26/01/2010 3:25 PM, Blanford, Glenn wrote:
Has there been any update on R's handling large integers greater than 10^9
(between 10^9 and 4x10^9) ?
First things first: thanks for your help!
I see where the confusion is. With formatC and sprintf, I have to store
the numbers I want to change into x.
I would like a way without applying a function on specific numbers
because I can shorten the numbers that way, but it won't give me more
Looks like I didn't read your post carefully enough.
If you want some sort of global option to set the
display of numbers from any operation performed by R
then that's not likely to be possible without
capturing all output and formatting it yourself.
As the saying goes 'good luck with that'.
On Jan 28, 2010, at 10:55 AM, Marc Schwartz wrote:
Ivan,
The default behavior for print()ing objects to the console in an R
session is via the use of the print.* methods. For real numerics,
print.default() is used and the format is based upon the number of
significant digits, not the
I guess the easiest solution for me would therefore be to set
options(digits) to a high number, and then round down if I need to!
Thanks you both for your input!
Ivan
Le 1/28/2010 17:02, Peter Ehlers a écrit :
Looks like I didn't read your post carefully enough.
If you want some sort of
Hi everyone,
I am trying to install the RMySQL package under windows xp. I've got the MySQL
installed on the computer (MySQL server 5.1). I went through the steps
presented on the webpage http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL and
googled around and still can't find the answer.
Ivan,
Now I'm no longer sure of just what you want. Are you concerned about
the *internal* handling of numbers by R or just about the *printing*
of numbers? As Marc has pointed out, internally R will use the full
precision that your input allows.
Perhaps you're using the F-value from the output
VAR 980490
Some people have suggested placing new limits on foreign
imports in order to protect American jobs. Others say
that such limits would raise consumer prices and hurt
American exports.
Do you FAVOR or OPPOSE placing new limits on imports, or
haven't you thought much about this?
Thank you, Dennis and Petr.
One more question: when aggregating to one es per id, how would I go about
keeping the other variables in the data.frame (e.g., keeping the value for
the first row of the other variables, such as mod2) e.g.:
# Dennis provided this example (notice how mod2 is removed
Hi all,
Note:
lm(Yield ~ Block + C(Variety, base = 2), Alfalfa)
equals
i - 2; lm(Yield ~ Block + C(Variety, base = i), Alfalfa)
However,
lme(Yield ~ C(Variety, base = 2), Alfalfa, random=~1|Block)
which is fine, does not equal
i - 2; lme(Yield ~ C(Variety, base = i), Alfalfa, random=~1|Block)
On Jan 28, 2010, at 10:26 AM, GL wrote:
Can you make tapply break down groups similar to bwplot or such?
Example:
Data frame has one measure (Days) and two Dimensions (MM and
Place). All
have the same length.
length(dbs.final$Days)
[1] 3306
length()
[1] 3306
length()
[1]
Dear Abraham,
If I follow correctly what you want to do, the following should do it:
f - factor(c(1, 1, 5, 5, 8, 8, 9, 9, 0, 0))
f
[1] 1 1 5 5 8 8 9 9 0 0
Levels: 0 1 5 8 9
recode(f, '1'=3; '5'=1; '0'=2; else=NA )
[1] 3311NA NA NA NA 22
Levels: 1 2 3
I think that
I think one would only be concerned about such internals if one were
primarily interested in performance; otherwise, one would be more
interested in ease of specification and part of that ease is having it
independent of implementation and separating implementation from
specification activities.
Thanks. My mistake was that I used c(dbs.final$Days,dbs.final$Place) instead of
list(... when I tried to follow that part of the documentation.
David Winsemius dwinsem...@comcast.net 1/28/2010 11:49 AM
On Jan 28, 2010, at 10:26 AM, GL wrote:
Can you make tapply break down groups similar
I need to find out the difference between the way R calculates weighted
regression and standard regression.
I want to plot a 95% confidence interval around an estimte i got from least
squares regression.
I cant find he documentation for this
ive looked in
?stats
?lm
?predict.lm
?weights
On Jan 28, 2010, at 10:04 AM, David Winsemius wrote:
On Jan 28, 2010, at 10:55 AM, Marc Schwartz wrote:
Ivan,
The default behavior for print()ing objects to the console in an R session
is via the use of the print.* methods. For real numerics, print.default() is
used and the format
On Jan 28, 2010, at 10:42 AM, Gopikrishna Deshpande wrote:
Hi,
I have a matrix of size 19x512x20 in R.
No, you don't. Matrices are only 2 dimensional in R. You may have an
array, however.
I want to export this file into
another format which can be imported into MATLAB.
write.xls or
On Jan 28, 2010, at 12:08 PM, Marc Schwartz wrote:
On Jan 28, 2010, at 10:04 AM, David Winsemius wrote:
On Jan 28, 2010, at 10:55 AM, Marc Schwartz wrote:
Ivan,
The default behavior for print()ing objects to the console in an R
session is via the use of the print.* methods. For real
You'll probably need to consult a suitable text on linear models/applied
regression, as this is a statistics, not an R question -- or look for a
suitable tutorial on the web. You might also try one of the statistics
mailing lists or Google on some suitable phrase.
Bert Gunter
Genentech
Hi:
On Thu, Jan 28, 2010 at 8:40 AM, AC Del Re de...@wisc.edu wrote:
Thank you, Dennis and Petr.
One more question: when aggregating to one es per id, how would I go about
keeping the other variables in the data.frame (e.g., keeping the value for
the first row of the other variables, such
vikrant wrote:
Hi,
I want to estimate parameters of weibull distribution. For this, I am using
fitdistr() function in MASS package.But when I give fitdistr(c,weibull) I
get a Error as follows:-
Error in optim(x = c(4L, 41L, 20L, 6L, 12L, 6L, 7L, 13L, 2L, 8L, 22L,
:
non-finite value
Hi,
I'm having trouble editing the qplot layout. I'm using the geom=tile
option and I want to do a few things:
1. move the vertical and horizontal gridlines so that they appear on the
edge of each tile (right now they're in the middle)
2. bring the gridlines to the foreground and change their
Hello everyone,
I have a bit of a problem with reshape function in R.
I have simulated some normal data, which I have saved in 4 vectors.
y.1,y.2,y.3,y.4 which I combined a dataset:
datasetcbind(y1,y2,y3,y4). I have also generated some subject id number,
and denoted that by subject.
So, my
Why not look into the zoo package na.approx? And related functions.
On Thu, Jan 28, 2010 at 11:29 AM, ogbos okike ogbos.ok...@gmail.com wrote:
Happy New Year.
I have a data of four columns - year, month, day and count. The last column,
count, contains some missing data which I have to replace
Try this:
ong-reshape(as.data.frame(dataset), idvar=subject,
v.names=response, varying=list(2:5), direction=long)
or
dataset - cbind.data.frame(y1, y2, y3, y4)
On Thu, Jan 28, 2010 at 3:07 PM, Dana TUDORASCU dana...@gmail.com wrote:
Hello everyone,
I have a bit of a problem with reshape
The warning message simply indicates that you have more than one data point
with the same x value. So, `approx' collapses over the dulicate x values
by averaging the corresponding y values. I am not sure if this is your
problem - it doesn't seem like it. It is doing what seems reasonable for a
I'm talking about ease of use to. The first line of the Details section in
?[.data.table says :
Builds on base R functionality to reduce 2 types of time :
1. programming time (easier to write, read, debug and maintain)
2. compute time
Once again, I am merely saying that the
sorry, i ommited some important information.
this is a documentation question!
i meant to ask how to find out how R calculates the standard error and how
it differs between the two models
--
View this message in context:
Hi
Markus Loecher wrote:
While I am very happy with and awed by the grid package and its basic
plotting primitives such as grid.points, grid.lines, etc, I was wondering
whether the equivalent of a grid.image() function exists ?
No. But a simple implementation based on grid.rect() is not
Regarding the explanation of where the time goes it might be parsing
the statement or the development of the query plan. The SQL statement
for the more complex query is obviously much longer and its generated
query plan involves 95 lines of byte code vs 19 lines of generated
code for the simpler
Hi Jason,
Thanks for you suggestions, I think that's pretty close to what I'd need.
The only glitch is that I'd be working with a vector of ~30 elements, so
permutations(...) would take quite a long time. I only need one permutation
per vector (the whole routine will be within a loop that
chipmaney wrote:
typically, the apply family wants you to use vectors to run functions on.
However, I have a function, kruskal.test, that requires 2 arguments.
kruskal.test(Herb.df$Score,Herb.df$Year)
This easily computes the KW ANOVA statistic for any difference across
years
However, my
Hi Ram,
As others have pointed out, writing the code is the least of your
problems. In case this isn't sinking in, try the following exercise:
set.seed(10)
P - vector()
DF - as.data.frame(matrix(rep(NA, 10), nrow=100))
names(DF) - c(paste(x,1:999, sep=), y)
for(i in 1:1000) {
DF[,i] -
All,
I installed the lastest version of R 2.10.1. On the help page for a specific
function, it turns out that the vertical navigation panel on the left does
not appear anymore. For example,
?lm
The help page from this command is a page without navigation panel (which I
prefer to use). I
Thank you very much everybody. That worked.
Dana
On Thu, Jan 28, 2010 at 12:23 PM, Henrique Dallazuanna www...@gmail.comwrote:
Try this:
ong-reshape(as.data.frame(dataset), idvar=subject,
v.names=response, varying=list(2:5), direction=long)
or
dataset - cbind.data.frame(y1, y2, y3, y4)
On 28/01/2010 3:15 PM, Edwin Sun wrote:
All,
I installed the lastest version of R 2.10.1. On the help page for a specific
function, it turns out that the vertical navigation panel on the left does
not appear anymore. For example,
?lm
The help page from this command is a page without
Duncan,
Thank you for your quick reply. Do we users have any options to change
that? I personally become addicted to the navigation panel and feel it
is kind of table of contents.
Regards,
Edwin Sun
-Original Message-
From: Duncan Murdoch [mailto:murd...@stats.uwo.ca]
Sent:
On 28/01/2010 3:22 PM, Changyou Sun wrote:
Duncan,
Thank you for your quick reply. Do we users have any options to change
that? I personally become addicted to the navigation panel and feel it
is kind of table of contents.
You could downgrade to 2.9.2, but you'd lose all the other new
It wouldn't be guaranteed to produce any usable permutation, but it seems
like it would be much faster and so could be repeated until an acceptable
vector is found. What do you think?
Thanks--
Andy
I think I am not understanding what your ultimate goal is so I'm not
sure I can give you
I don't know of any existing palettes that meet your conditions, but here are a
couple of options for interactive exploration of colorsets (this is quick and
dirty, there are probably some better orderings, base colors, etc.):
colpicker - function( cols=colors() ) {
n - length(cols)
I'm hoping to get some best practice feedback for constructing a
function call which takes an undefined set of DIFFERENT length vectors
-- e.g. say we have two lists:
list1=c(1:10)
list2=c(2:4)
lists = data.frame(list1,list2) coerces those two to be the same length
(recycling list2 to fill
On Jan 28, 2010, at 2:14 PM, DispersionMap wrote:
sorry, i ommited some important information.
this is a documentation question!
i meant to ask how to find out how R calculates the standard error
and how
it differs between the two models
Luke, Use the Code!.
--
View this
On Jan 28, 2010, at 4:03 PM, Jonathan Greenberg wrote:
list1=c(1:10) # neither of which really are lists
list2=c(2:4)
lists = list(list1,list2) $ a list of two vectors.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
__
If you understand the differences between R lists and R vectors then this
should be easy:
vec1 - 1:10
vec2 - 2:4
myListOfVectors - list( vec1, vec2 )
Now you can pass the single list of 2 different sized vectors to your function.
For more details on working with lists (and vectors and
Hello everyone, I have a vector P and I want to replace each of its missing
values by its next element, for example:
P[i] = NA -- P[i] = P[i+1]
To do this I am using the replace() and lag() functions like this:
P - replace(as.ts(P),is.na(as.ts(P)),as.ts(lag(P,1)))
but here is the error that I
I am sure this is trivial, but I cannot solve it.
I make a histogram. There are 5 categories 1,...,5 and 80 values and
the histogram does not evenly space the bars.
Bars 1 and 2 have no space between them and the rest are evenly spaced.
How can I get all bars evenly spaced?
The code:
Q5
Well, Albyn Jones gave a great solution to my challenge that found the best
reading schedule.
My original thought was that doing an exhaustive search would take too much
time, but Albyn showed that there are ways to do it efficiently.
My approach (as mentioned before) was to use optim with
Does this help:
library(zoo)
na.locf(P, fromLast=TRUE)
You'll have to decide what to do if the last value is NA.
-Peter Ehlers
anna wrote:
Hello everyone, I have a vector P and I want to replace each of its missing
values by its next element, for example:
P[i] = NA -- P[i] = P[i+1]
To do
Well, your bars are not unevenly spaced; you just have
some zero-count intervals. Time to learn about the
str() function which will tell you what's going on.
zh - hist(your_code)
str(zh)
zh$breaks
zh$counts
You could set breaks with
hist(..., breaks=0:5 + .5)
But a histogram doesn't seem like
Hi Peter, thank you for helping. The thing is don't want to it replace it
with the last value but with the next value
-
Anna Lippel
--
View this message in context:
http://n4.nabble.com/Error-on-using-lag-function-tp1399935p1401319.html
Sent from the R help mailing list archive at
1 - 100 of 132 matches
Mail list logo