Why does R think these numbers ***are*** equal?
In a somewhat bizarre set of circumstances I calculated
x0 - 0.03580067
x1 - 0.03474075
y0 - 0.4918823
y1 - 0.4474461
dx - x1 - x0
dy - y1 - y0
xx - (x0 + x1)/2
yy - (y0 + y1)/2
chk - yy*dx - xx*dy + x0*dy -
Dear R help,
I am fairly new in data management and programming in R, and am trying to write
what is probably a simple loop, but am not having any luck. I have a dataframe
with something like the following (but much bigger):
Dates-c(12/10/2010,12/10/2010,12/10/2010,13/10/2010,
Dear Chandra,
You're on the wrong track. You don't need for loops as you can do this
vectorised.
as.numeric(interaction(data$Groups, data$Dates, drop = TRUE))
Best regards,
Thierry
-Oorspronkelijk bericht-
Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Aug 2, 2011, at 08:02 , Rolf Turner wrote:
Why does R think these numbers ***are*** equal?
In a somewhat bizarre set of circumstances I calculated
x0 - 0.03580067
x1 - 0.03474075
y0 - 0.4918823
y1 - 0.4474461
dx - x1 - x0
dy - y1 - y0
xx - (x0 + x1)/2
On 08/02/2011 01:38 AM, kitty wrote:
Hi again,
I have tried playing around with the code given to me by Alan and Jim, thank
you for the code but unfortunatelyI can't seem to get either of them to
work... Alans does not work with the sample data and Jims is giving the
error :
Error in
Dear Peter,
Thanks for your concise answer, it works perfectly.
By the way, I fully agree that data or df are not good names for
data.frames and I am/was aware of that and I usually avoid those names
(not consequently though I've to admit, it is too tempting ;). However,
if one uses those evil
Hi
another possibility is to use logical values properties
(x 0)*x
[1] -3 -2 -1 0 0 0 0
Regards
Petr
In addition to what David said:
On Mon, Aug 1, 2011 at 6:57 PM, zoe_zhang 1987.zhan...@gmail.com
wrote:
Dear All,
Sorry to bother
I want to write a function in R using if
On Mon, 1 Aug 2011, Claudio Shikida (??) wrote:
Hello,
I am looking for some help with this question: how could I test structural
breaks in a instrumental variables?s model?
In principle, most of tests used in the standard linear regression model
can also be transferred to the IV
Thank you for your adding, Steve, i followed Daivd's suggection and finally
got the answer.
It is my careless that should put lena instead of lenx.
I also tried your codes and worked well. I appreciate your help. I learnt a
lot from this forum.
Cheers,
Zoe
--
View this message in context:
Dear friends,
I am building an R package called *mypackage*. I followed every possible
steps (to my understanding) for the same. I got following problem while
doing *R CMD check mypackage*.
* installing *source* package 'mypackage' ...
** libs
cygwin warning:
MS-DOS style path detected:
Dear R-helpers,
I am using confint() within a function, and I want to turn off the message
it prints:
x - rnorm(100)
y - x^1.1+rnorm(100)
nlsfit - nls(y ~ g0*x^g1, start=list(g0=1,g1=1))
confint(nlsfit)
Waiting for profiling to be done...
2.5%97.5%
g0 0.4484198 1.143761
g1
Try http://www.myassays.com/four-parameter-fit.assay
It’s free, requires no install and pre-configured for ELISAs. Just paste
and go
AW
--
View this message in context:
http://r.789695.n4.nabble.com/Fitting-ELISA-measurements-unknowns-to-4-parameter-logistic-model-tp3252381p3711676.html
I'm working with a lot of data right now, but I'm new to R, and not very good
with it, hence my request for help. What type of graph could I use to
straighten out things like...
http://r.789695.n4.nabble.com/file/n3711389/Untitled.png
...this?
I want to see general frequencies. Should I use
See ?suppressMessages
On Tue, 2 Aug 2011, Remko Duursma wrote:
Dear R-helpers,
I am using confint() within a function, and I want to turn off the message
it prints:
x - rnorm(100)
y - x^1.1+rnorm(100)
nlsfit - nls(y ~ g0*x^g1, start=list(g0=1,g1=1))
confint(nlsfit)
Waiting for profiling
Hi,
One solution could be to subsample the data, or jitter the data (give it
some random noise). A more elegant solution, imho, is to use a 2d
histogram (3d histogram is not a good alternative, I think it is much
better to use color instead of a third dimension). I don't think this is
easy to
Wir sind bis am 20. August in den Ferien und werden keine e-mails beantworten.
Bei dringenden Fällen melden Sie sich bei Stefanie von Felten
steffi.vonfel...@oikostat.ch
We are on vacation until 20. August. In urgent cases, please contact Stefanie
von Felten steffi.vonfel...@oikostat.ch
Works perfectly. Thanks.
f.
On 1 August 2011 18:22, jim holtman jholt...@gmail.com wrote:
Try this: had to add extra names to your data since it was not clear
how it was organized. Next time use 'dput' to enclose data.
x - read.table(textConnection( index time key date values
+
DimmestLemming wrote:
I'm working with a lot of data right now, but I'm new to R, and not very
good with it, hence my request for help. What type of graph could I use to
straighten out things like...
http://r.789695.n4.nabble.com/file/n3711389/Untitled.png
Three nice alternatives:
On 11-08-02 5:26 AM, Baidya Nath Mandal wrote:
Dear friends,
I am building an R package called *mypackage*. I followed every possible
steps (to my understanding) for the same. I got following problem while
doing *R CMD check mypackage*.
* installing *source* package 'mypackage' ...
** libs
The cygwin warning should not be fatal. Is that what made you think there's a
problem with your path? Can you upload mypackage online? Two options would be
Github hosts that sort of thing or you could use a tar ball and any file
hosting service. I (and possibly others more skilled) would be
Andrew McCulloch wrote:
I use R to draw my graphs. I have 100 points on a simple xy-plot. The
points are distinguished by a third variable which is categorical with 10
levels. I have been plotting x against y and using gray scales to
distinguish the level of the categorical variable for each
Dear Dennis and Steve,
Am Sonntag, den 31.07.2011, 23:32 -0400 schrieb Steve Lianoglou:
[…]
How about trying to write the of this `f4` function below using the
rcpp/inline combo. The C/C++ you will need to write looks to be quite
trivial, let's change f4 to accept an x argument as a vector:
Dear all,
I am trying to aggregate a table (divided in two lists here), but get a
memory error.
Here is the code I'm running :
sessionInfo()
print(paste(memory.limit() , memory.limit()))
print(paste(memory.size() , memory.size()))
print(paste(memory.size(TRUE) ,
Dear R users,
Would you plz tell me how to avoid this for loop blow??
I think there might be a better way to reduce running time.
--
## y1 and y2 are n*1 vectors
for (k in 1:n){
Hello,
My R knowledge could not take me any further, so this request !
I have a matrix of dimensions (1185 X 1185). I want to calculate standard
deviation of entire matrix.
sd function of {stats} calculates standard deviation for each row/column,
giving 1 X 1185 matrix as result. I would like
Hi,
I have some simple statistics to calculate for a large
number of variables.
I created a simple function to apply to variables.
I would like the variable name to be placed automatically.
I tried the following function but is not working.
desc = function(x){
media = mean(x,
Hi!
The sample below should give you what you want:
M = matrix(runif(100), 10, 10)
sd(as.numeric(M))
So the as.numeric command is the key. It transforms the matrix to a 1D
vector. Or alternatively without using as.numeric:
M = matrix(runif(100), 10, 10)
M
dim(M) = 100
M
sd(M)
Here I use the
On 08/01/2011 08:47 PM, Matt Curcio wrote:
Greetings all,
I am getting this error that is driving me nuts... (not a long trip, haha)
I have a set of files and in these files I want to calculate ttests on
rows 'compareA' and 'compareB' (these will change over time there I
want a variable
Hi
Hi!
The sample below should give you what you want:
M = matrix(runif(100), 10, 10)
sd(as.numeric(M))
So the as.numeric command is the key. It transforms the matrix to a 1D
vector. Or alternatively without using as.numeric:
M = matrix(runif(100), 10, 10)
M
dim(M) = 100
or
On Aug 2, 2011, at 8:48 AM, Petr PIKAL wrote:
Hi
Hi!
The sample below should give you what you want:
M = matrix(runif(100), 10, 10)
sd(as.numeric(M))
So the as.numeric command is the key. It transforms the matrix to a
1D
vector. Or alternatively without using as.numeric:
M =
Rattle won't install properly on my Windows 7 64 bit laptop.
Here is what I've tried:
I've followed the instructions here:
http://rattle.togaware.com/rattle-install-mswindows.html
I had R installed already.
I downloaded the GTK+ packages, unzipped the 32 bit one into c:\gtkwin32.
I put
Dear R-help list,
Pls I have this problem. Suppose I have a matrix of size nxn say, generated as
follows
z-matrix(rnorm(n*n,0,1),nrow=n)
I want to write a function such that for i in 1:n, I will remove the rows and
columns
corresponding to i (so, will be left with n-1*n-1 submatrix in each
Dear all
I have a simple R question. How do I execute R-code stored in a variable?
E.g if I have a variable which contains some R-code:
c = reg - lm(sales$sales~sales$price)
Is it possible to execute c
E.g like Exec(c)
I hope someone can help.
Thank you
Kim Lillesøe
[[alternative
Hi
Hi,
I have some simple statistics to calculate for a large
number of variables.
I created a simple function to apply to variables.
I would like the variable name to be placed automatically.
I tried the following function but is not working.
desc = function(x){
In addition to the other responses (all of which I liked), a couple of
other alternatives to consider are 2D density plots (see ?kde2d in the
MASS package, for example) or geom_tile() in the ggplot2 package,
which you can think of as a 3D histogram projected to 2D with color
corresponding to
On 08/02/2011 01:07 PM, Dennis Murphy wrote:
In addition to the other responses (all of which I liked), a couple of
other alternatives to consider are 2D density plots (see ?kde2d in the
MASS package, for example) or geom_tile() in the ggplot2 package,
which you can think of as a 3D histogram
Now that I'm back at my computer, I'll actually suggest you do something
else entirely.
If you look at the code of holidayNYSE() or by calling listHolidays() of the
timeDate package you'll see that there are many many functions that get
every conceivable holiday directly. I'll let you pick the
Hi:
Could you please provide a reproducible example? In your code,
(i) n is undefined;
(ii) logbp is undefined.
A description of what you want to do and/or a reproducible example
with an expected outcome would be useful.
As the bottom of each e-mail to R-help says...
PLEASE do read the
Thanks a lot, Michael - that's exactly what I was looking for!
Dimitri
On Tue, Aug 2, 2011 at 9:48 AM, R. Michael Weylandt
michael.weyla...@gmail.com michael.weyla...@gmail.com wrote:
Now that I'm back at my computer, I'll actually suggest you do something
else entirely.
If you look at the
Hi:
Try this:
z - matrix(rnorm(100), nrow = 10)
sum(sapply(seq_len(nrow(z)), function(k) det(z[-k, -k])))
[1] 1421.06
where
sapply(seq_len(nrow(z)), function(k) det(z[-k, -k]))
[1] 432.11613 81.65449 516.95791 54.72775 804.32097 -643.35436
[7] -411.15932 394.18780 84.13173
Hi Kim,
You can use
eval(parse(text = c))
Best,
Ista
On Tue, Aug 2, 2011 at 8:22 AM, Kim Lillesøe k...@dataminds.dk wrote:
Dear all
I have a simple R question. How do I execute R-code stored in a variable?
E.g if I have a variable which contains some R-code:
c = reg -
On Aug 2, 2011, at 11:45 , Guillaume wrote:
Dear all,
I am trying to aggregate a table (divided in two lists here), but get a
memory error.
Here is the code I'm running :
sessionInfo()
print(paste(memory.limit() , memory.limit()))
print(paste(memory.size() ,
Dear R-experts:
I am using a function called AUC whose arguments are data, time, id, and
dv.
data is the name of the dataframe,
time is the independent variable column name,
id is the subject id and
dv is the dependent variable.
The function computes area under the curve by
Hello!
I have dates for the beginning of each week, e.g.:
weekly-data.frame(week=seq(as.Date(2010-04-01),
as.Date(2011-12-26),by=week))
week # each week starts on a Monday
I also have a vector of dates I am interested in, e.g.:
july4-as.Date(c(2010-07-04,2011-07-04))
I would like to flag the
I realize that matrix indexing has been addressed in various flavors, but I'm
stumped and didn't find anything in the archives. It's not clear if it is an
igraph issue or a more general problem. Thanks in advance for your patience.
I am using igraph to read a gml file
From multiple data.frames I created two lists, one with temperature, one with
gps data. With your help and lapply I managed to interpolate the timestamps
of gps and temperature data. Now I want to merge/join both lists via the
time-stamp, taking only times, where both lists have data.
For the
Yes, you can use:
eval(parse(text=c))
On the other hand I would not recommend to use c as a variable name as it is
the name of a very important function in the R language to aggregate data.
HTH,
Samuel
-Original Message-
From: r-help-boun...@r-project.org
The findInterval function should surely be tried in some form or
another.
On Aug 2, 2011, at 10:36 AM, Dimitri Liakhovitski wrote:
Hello!
I have dates for the beginning of each week, e.g.:
weekly-data.frame(week=seq(as.Date(2010-04-01),
as.Date(2011-12-26),by=week))
week # each week starts
Michael,
The function aggregate() is not going to work for your situation. The
function is applied to the individual columns of the subsetted data, not
the subsetted data frame as a whole. The help file reads: Then, each of
the variables (columns) in x is split into subsets of cases (rows)
How about this?
indx - unique(cbind(Dates, Groups))
indx
DatesGroups
[1,] 12/10/2010 A
[2,] 12/10/2010 B
[3,] 13/10/2010 A
[4,] 13/10/2010 B
[5,] 13/10/2010 C
indx - data.frame(indx, id=1:nrow(indx))
indx
Dates Groups id
1 12/10/2010 A 1
2 12/10/2010
Hello,
I am using multinomial logit regression for the first time, and I am trying to
understand the warnings and errors I get.
My data consists of 200 to 600 samples with ~25 predictors (these are principal
components). The response has three categories.
I use the function vglm from the
R-help and Barry
Thank you for your suggestions. It works, and may I ask how I am able
to do the opposite (disable the call back, so that I could control
when to show and suppress the output). I would like to make a function
to enable/disable the callback similar to the one as follow:
On Tue, Aug 2, 2011 at 10:36 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
I have dates for the beginning of each week, e.g.:
weekly-data.frame(week=seq(as.Date(2010-04-01),
as.Date(2011-12-26),by=week))
week # each week starts on a Monday
I also have a vector of
Thank you everyone for your kind input,
I forgot to add that I have decimal points in my matrix !
Enclosed input file (reduced to 10 X 10 matrix), scripts and output for your
suggesions:
Code 1:
library(stats)
Matrix-read.table(test_input, head=T, sep= , dec=.)
SD-sd(as.numeric(Matrix))
SD
I'm familiar with the quantile() command, but what if I have a specific
number that I want to know its location in a vector? I know that in known
distributions, (for example the normal distribution), there is pnorm and
qnorm, but how can I do it with unknown vector?
thanks in
Hi Peter,
Thanks for your answer.
I made a mistake in the script I copied sorry !
The description of the object : listX has 3 column, listBy has 4 column, and
they have 9000 rows :
print(paste(ncol x , length((listX
print(paste(ncol By , length((listBy
print(paste(nrow ,
Dear R users,
I have two n*1 integer vectors, y1 and y2, where n is very very large.
I'd like to compute
elbp = 4^(y1) * 5^(y2) * sum_{i=0}^{max(y1, y2)} [{ (y1-i)! * (i)! *
(y2-i)! }^(-1)];
that is, I need to compute elbp for each (y1, y2) pair.
So I made R code like below, but I don't
Dear R experts;
I am trying to extract the p values from a coxme object (package coxme). I
can see the value in the model output, but I wanted to have the result with
a higher number of decimal places.
I have searched the mailing list and followed equivalent suggestions for
nlme/lme objects, but
?expand.grid
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded
On Aug 2, 2011, at 10:14 AM, ראובן אברמוביץ wrote:
I'm familiar with the quantile() command, but what if I have a
specific
number that I want to know its location in a vector? I know that
in known
distributions, (for example the normal distribution), there is
pnorm and
qnorm,
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of chakri
Sent: Tuesday, August 02, 2011 6:31 AM
To: r-help@r-project.org
Subject: Re: [R] Standard Deviation of a matrix
Thank you everyone for your kind input,
I forgot to
Would this work for you?
if you want to know where the i-th element falls percentage-wise in the
distribution of a vector:
sum(x = x[i])/length(x)
This could be turned into a function:
pEmpirical - function(i,x) {
if (length(i) 1) return(apply(as.matrix(i), 1, pEmpirical,x))
r = sum(x
Has anyone got SSOAP working on anything besides KEGG?
I just tried another 3 SOAP servers. Both the WSDL and constructing the .SOAP
call. Again the perl and ruby interface worked without any hitches.
Paul
library(SSOAP)
Does this help?
x - c(3, 8, 5, 2, 9, 33, 21)
# the 43rd percentile
quantile(x, 0.43)
# the proportion of the distribution that is less than 7
mean(x7)
Jean
`·.,, (((? `·.,, (((? `·.,, (((?
Jean V. Adams
Statistician
U.S. Geological Survey
Great Lakes Science Center
223 East Steinfest
On Aug 2, 2011, at 17:10 , Guillaume wrote:
Hi Peter,
Thanks for your answer.
I made a mistake in the script I copied sorry !
The description of the object : listX has 3 column, listBy has 4 column, and
So what is the contents of listBy? If they are all factors with 100 levels,
then
Hi:
Another way to do this is to use one of the summarization packages.
The following uses the plyr package.
The first step is to create a function that takes a data frame as
input and outputs either a data frame or a scalar. In this case, the
function returns a scalar, but if you want to carry
Dear all,
How can I make an index plot with lattice, that is plotting a vector
simply against its particular index in the vector, i.e. something
similar to
y - rnorm(10)
plot(y)
I don't want to specify the x's manually, as this could become
cumbersome when having multiple panels.
I tried
Whoa!
1. First and most important, there is very likely no reason you need
to do this. R can handle multiple groupings automatically in fitting
and plotting without creating artificial labels of the sort you appear
to want to create. Please read an Intro to R and/or get help to see
how.
2. The
Hi:
You could try the lubridate package:
library(lubridate)
week(weekly$week)
week(july4)
[1] 27 27
week
function (x)
yday(x)%/%7 + 1
environment: namespace:lubridate
which is essentially Gabor's code :)
HTH,
Dennis
On Tue, Aug 2, 2011 at 7:36 AM, Dimitri Liakhovitski
On Aug 1, 2011, at 20:50 , David L Carlson wrote:
Actually Sara's method fails if the insertion is after the first or before
the last column:
x - data.frame(A=1:3, B=1:3, C=1:3, D=1:3, E=1:3)
newcol - 4:6
cbind(x[,1], newcol, x[,2:ncol(x)])
Sarah (sic) is on the right track, just lose
I'm trying to create a density plot using census data, where the
weights don't sum to 1.
plot(density(oh$FINCP,weights=oh$PWGTP))
Warning message:
In density.default(oh$FINCP, weights = oh$PWGTP) :
sum(weights) != 1 -- will not get true density
How would I go about doing this?
Thanks!
Thanks a lot, everyone!
Dimitri
On Tue, Aug 2, 2011 at 12:34 PM, Dennis Murphy djmu...@gmail.com wrote:
Hi:
You could try the lubridate package:
library(lubridate)
week(weekly$week)
week(july4)
[1] 27 27
week
function (x)
yday(x)%/%7 + 1
environment: namespace:lubridate
which is
Does
xyplot(y ~ seq_along(y), xlab = Index)
do what you want?
Peter Ehlers
On 2011-08-02 09:07, Thaler, Thorn, LAUSANNE, Applied Mathematics wrote:
Dear all,
How can I make an index plot with lattice, that is plotting a vector
simply against its particular index in the vector, i.e.
On Aug 2, 2011, at 12:51 PM, r student wrote:
I'm trying to create a density plot using census data, where the
weights don't sum to 1.
plot(density(oh$FINCP,weights=oh$PWGTP))
Warning message:
In density.default(oh$FINCP, weights = oh$PWGTP) :
sum(weights) != 1 -- will not get true
Hi,
I've tried to look through all the previous related Threads/posts but can't
find a solution to what's probably a simple question.
I have a data frame comprised of three columns e.g.:
ID1 ID2 Value
a b 1
b d 1
c a 2
c e 1
d a 1
e d 2
I'd like to convert the data to a matrix i.e.:
a b
Hi Peter,
Yes I have a large number of factors in the listBy table.
Do you mean that aggregate() creates a complete cartesian product of the
by columns ? (and creates combinations of values that do not exist in the
orignial by table, before removing them when returning the aggregated
table?)
Thanks for this Peter:
Sarah (sic) is on the right track, just lose the commas so that you don't
drop to a vector:
x - data.frame(A=1:3, B=1:3, C=1:3, D=1:3, E=1:3)
newcol - 4:6
cbind(x[1], newcol, x[2:ncol(x)])
A newcol B C D E
1 1 4 1 1 1 1
2 2 5 2 2 2 2
3 3 6 3 3 3
On Aug 2, 2011, at 1:11 PM, r student wrote:
Like below?
plot(density(oh$FINCP,weights=oh$PWGTP/sum(oh$PWGTP)))
I don't understand why you are asking for approval. You are the one
with the data and know where they came from. We have none of that
background.
--
David.
On Tue, Aug 2,
Jagz,
Assuming that your data frame is called df, try this ...
tapply(df$Value, list(df$ID1, df$ID2), mean)
Jean
`·.,, (((º `·.,, (((º `·.,, (((º
Jean V. Adams
Statistician
U.S. Geological Survey
Great Lakes Science Center
223 East Steinfest Road
Antigo, WI 54409 USA
715-627-4317,
On Aug 2, 2011, at 19:17 , Bert Gunter wrote:
Thanks for this Peter:
Sarah (sic) is on the right track, just lose the commas so that you don't
drop to a vector:
x - data.frame(A=1:3, B=1:3, C=1:3, D=1:3, E=1:3)
newcol - 4:6
cbind(x[1], newcol, x[2:ncol(x)])
A newcol B C D E
1 1
On Aug 2, 2011, at 19:09 , Guillaume wrote:
Hi Peter,
Yes I have a large number of factors in the listBy table.
Do you mean that aggregate() creates a complete cartesian product of the
by columns ? (and creates combinations of values that do not exist in the
orignial by table, before
Like below?
plot(density(oh$FINCP,weights=oh$PWGTP/sum(oh$PWGTP)))
On Tue, Aug 2, 2011 at 10:06 AM, David Winsemius dwinsem...@comcast.net wrote:
On Aug 2, 2011, at 12:51 PM, r student wrote:
I'm trying to create a density plot using census data, where the
weights don't sum to 1.
Dear helpers,
I can create a vector with the priority of the packages that came with
R, like this:
installed.packages()[,Priority]-my.vector
my.vector
base boot class cluster codetools
base recommended recommended recommended recommended
compiler
Hi:
Here are a couple of ways. Since your data frame does not contain a
'c' in ID2, we redefine the factor to give it all five levels rather
than the observed four:
df - read.table(textConnection(
+ ID1 ID2 Value
+ a b 1
+ b d 1
+ c a 2
+ c e 1
+ d a 1
+ e d 2), header = TRUE)
str(df)
str(df)
On Aug 2, 2011, at 2:21 PM, Sverre Stausland wrote:
Dear helpers,
I can create a vector with the priority of the packages that came with
R, like this:
installed.packages()[,Priority]-my.vector
my.vector
base boot class cluster codetools
base
Sverre,
Try this:
my.list - split(names(my.vector), my.vector)
my.list$base
my.list$recommended
Jean
`·.,, (((º `·.,, (((º `·.,, (((º
Jean V. Adams
Statistician
U.S. Geological Survey
Great Lakes Science Center
223 East Steinfest Road
Antigo, WI 54409 USA
From:
Sverre Stausland
Hi:
One more possibility:
names(my.vector[grep('recommended', my.vector)])
[1] Matrix boot class clustercodetools
[6] foreignKernSmooth latticeMASS Matrix
[11] mgcv nlme nnet rpart spatial
[16] survival
names(my.vector[grep('base',
Hi,
This might be a simple problem but I don't know how to calculate a random
variable density the way panel.histogram does it before it creates the
actual density rectangles. The documentation says that it uses the density
function but the actual code suggests that the hist.constructor function
Does anyone know how to create a 3D Bargraph using ggplot2/qplot. I don't
mean 3D as in x,y,z coordinates. Just a 2D bar graph with a 3D shaped bard.
See attached excel file for an example.
Before anyone asks I know that 3D looking bars don't add anything except
prettiness.
On Wed, Aug 3, 2011 at 5:11 AM, r student student...@gmail.com wrote:
Like below?
plot(density(oh$FINCP,weights=oh$PWGTP/sum(oh$PWGTP)))
Yes
If you are doing lots of analyses with weighted data you might want to
look at the survey package. It also has a density estimator, in
svysmooth(),
On 8/2/2011 11:39 AM, wwreith wrote:
Does anyone know how to create a 3D Bargraph using ggplot2/qplot. I don't
mean 3D as in x,y,z coordinates. Just a 2D bar graph with a 3D shaped bard.
See attached excel file for an example.
It is not possible.
Before anyone asks I know that 3D looking
On 11-08-02 2:39 PM, wwreith wrote:
Does anyone know how to create a 3D Bargraph using ggplot2/qplot. I don't
mean 3D as in x,y,z coordinates. Just a 2D bar graph with a 3D shaped bard.
See attached excel file for an example.
Before anyone asks I know that 3D looking bars don't add anything
Dear R folks,
having simulation data in a vector n2off, I know that they should be
similar to a power function f [1], f(n) = n^(-1/r), r ∈ ℕ\{0}, and I
want to find the value for r best fitting the simulation data.
Furthermore I know that this is only true for big n, that means n2off(n)
~ f(n) ⇔
Thanks to Peter Dalgaard and to Baptiste Auguie (off-list) for the
insights they provided.
cheers,
Rolf turner
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
I have the following:
Tout = c(., .,
+ -51.0, -9.6, -9.6, -9.6, -9.6, -9.6, -9.6,
+ -9.6, -9.5, -9.5, -9.6, -9.5, -9.6, -9.6,
+ -9.5, -9.4, -9.3, -9.3, -9.3, -9.2, -9.0,
+ -9.0, -8.9, -8.9, -8.9)
How can I take the mean while ignoring the null values? I
Are you sure it doesn't? na.rm=T works for me, so I think your problem is
elsewhere.
Specifically, the example given below consists of 27 character strings, not
numbers, so there' so surprise R doesn't want to give you a mean -- to R,
it's as logical as asking for the average of a and Q5
Try
On Thu, 2011-07-28 at 11:58 -0400, Sarah Goslee wrote:
Hi Mark,
On Thu, Jul 28, 2011 at 10:44 AM, m...@statcourse.com wrote:
1. How can I plot the entire tree produced by rpart?
What does plot() not do that you are expecting?
Not do any labelling... ;-)
text(tree)
where `tree` is
Hi R helpers,
I tried to convert a list of LatLong coordinates (in DD format) into UTM
zone 11 NAD 27. I first tried this from PBSmapping:
library(PBSmapping)
LatLong-cbind(c(56.85359, 56.85478),c(-118.4109, -118.4035))
colnames(LatLong)-c(X,Y)
attr(LatLong, projection) - UTM
attr(LatLong,
Hey All,
I'm trying to use the xlsx package to read a series of excel spreadsheets
into R, but my code is failing at the first step.
I setwd into my the directory with the spreadsheets, and, as a test ask for
the first one:
read.xlsx(file = Argentina Final.xls, sheetIndex = 1)
I promptly
Em Segunda 01 Agosto 2011, você escreveu:
Is there a preferred language you would like to use in your package
development? I randomly downloaded packages until I found some that
helped me along my way, and might be able to help you pick one. If you
are just looking at building a package of R
1 - 100 of 113 matches
Mail list logo