Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of bgnumis
> Sent: Sunday, March 17, 2013 4:12 PM
> To: r-help@r-project.org
> Subject: [R] zero line
>
> Hi all,
>
> I´m plotting cf (with two axis) and addind a shaded color
hi R users:
I have a dataset including u wind in x-axis and v wind in y-axis.
How can I plot the u,v wind data in vector or barb figure?
which command ?
thank you .
--
TANG Jie
[[alternative HTML version deleted]]
__
R-help@r-project.org
On 03/18/2013 08:50 PM, Jie Tang wrote:
hi R users:
I have a dataset including u wind in x-axis and v wind in y-axis.
How can I plot the u,v wind data in vector or barb figure?
which command ?
thank you .
Hi Jie,
Maybe the vectorField function (plotrix)?
Jim
_
As it turns out, I am working on this right now, and it's a bit of a challenge
to get the color gradient correct. I don't think this is really the right kind
of question for this list, so let's see if anyone has attempted it or has
ideas, and then take the conversation private. I can send you
ishi soichi gmail.com> writes:
> Has anyone plotted or is it possible to plot
>
> CIE *xy* chromaticity diagram
>
> http://en.wikipedia.org/wiki/File:CIE1931xy_blank.svg
>
> I need this plot in color.
>
> ishida
>
I think that plotting the spectral locus and the line of purples is trivial,
ishi soichi gmail.com> writes:
> Has anyone plotted or is it possible to plot
>
> CIE *xy* chromaticity diagram
>
> http://en.wikipedia.org/wiki/File:CIE1931xy_blank.svg
>
> I need this plot in color.
>
> ishida
And following up on my previous mail (diatribe), after
having contemplated th
I am, unfortunately, well-aware of the limitations that Ken points out (and I
do appreciate him making these points). One can readily demonstrate the gamut
limitations by printing the diagram Ishida links to on different devices. My
hope is to get something close and include a disclaimer. Bry
Unfortunately, a bad idea that looks good never dies.
That said, I still think that it is an interesting challenge
to create this graph by programming. I can imagine that if
you specified the coordinates at a certain number of points
in the interior and along the spectrum locus, you could use
an
At 14:56 17/03/2013, Wim Kreinen wrote:
Hello,
I have chi2-values from 2x2 contingency tables, each degree of freedom =1.
But I dont know the values of the contingency table. All I have in addtion:
The allelic odds ratio.
Now I would like to do a Q-Q-plot. Is that possible?
If I understand you
Dear All,
is there a simple way that covers all regression models to extract the number
of samples from a data frame/matrix actually used in a regression model?
For instance I might have a data of 100 rows and 4 colums (1 response + 3
explanatory variables). If 3 samples have one or more NAs i
Hi,
I have a 2 x 1 matrix of confidence intervals. The first column is the
lower and the next column is the upper. I want to cont how many times a
number say 12 lies in the interval. Can anyone assist?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
Bert Gunter gene.com> writes:
>
> But this has nothing to do with 7.31 and everything to do with operator
> precedence and automatic casting from integers to logical and vice-versa.
>
> I also think it fair to say that all (??) languages have these sorts of
> malapropisms due to operator prece
Federico Calboli imperial.ac.uk> writes:
> is there a simple way that covers all regression models to extract
> the number of samples from a data
> frame/matrix actually used in a regression model?
>
> For instance I might have a data of 100 rows and 4 colums
> (1 response + 3 explanatory vari
Hi Jim,
Try either of the following (untested):
sum( x[1, ] < 12 & x[2, ] > 12)
sum(apply(x, 2, function(x) x[1] < 12 & x[2] > 12))
where "x" is your 2x1000 matrix.
HTH,
Jorge.-
On Tue, Mar 19, 2013 at 12:03 AM, Jim Silverton <> wrote:
> Hi,
> I have a 2 x 1 matrix of confidence interva
sum(M[1]<12 & 12<=M[2]) untested, no data
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dea
--
Thanks & Regards,
Kamal Kishore
Research Scholar
Department of Biostatistics
National Institute of Mental Health and Neuro Sciences (NIMHANS)
Banglore-560029
Mob-+91-9591349768
Email:kamalkishorest...@gmail.com
[[alternative HTML version deleted]]
___
Hi All,
I have tried every fix on my try or tryCatch that I have found on the
internet, but so far have not been able to get my R code to continue with
the "for loop" after the lmer model results in an error.
Here is two attemps of my code, the input is a 3D array file, but really
any function wo
Hi Everyone,
I have a problem that keeps occurring using the biclust function (info
below).
Does anyone have an idea what is going wrong?
Best Wishes and thank you,
Bart
> library(biclust)
> data<-read.table(file.choose(), header = T, sep = "\t")
> data2<-as.matrix(data[,-1])
Dear All,
I would be very grateful for your help concerning the following question:
Below mentioned programme is available on net to generate longitudinal
data. Usually we get almost same parameter estimates as used to generate
the data. The problem here is I am not able to get it for data used
Hi Arun,
Thank u so much for your help. It helped me solve the problem
THANK YOU
-Yashvardhan Kajaria
On Thu, Mar 14, 2013 at 11:28 PM, arun wrote:
> HI,
>
> 1.
>
> date1<-c("5 jan 2013", "1 jan 2013")
> date1<-as.Date(date1,format="%d %b %Y")
> date1[1]-date1[2]
> #Time difference of 4 days
>
I'm not aware of any routine that those the job, although I think that
it could be relatively easily done by multiplication the manifest
variable vector with the estimates for the specific effect.
To make an example:
v1; v2; v3; v4 are manifest variables that loads on one y latent
variablein a
Hi, is there a way to assign observations from a dataset to nodes of a tree? Â
For example, if I have a data frame like the following:
ID Var1 Var2 Var3 ⦠VarX
1 Â Â Â Â Â
. Â Â Â Â Â
. Â Â Â Â Â
. Â Â Â Â Â
n     Â
And then run a classification tree with th
Hi,
Try this:
set.seed(25)
mat1<-
matrix(cbind(sample(1:15,20,replace=TRUE),sample(16:30,20,replace=TRUE)),ncol=2)
nrow(mat1[sapply(seq_len(nrow(mat1)),function(i)
any(seq(mat1[i,1],mat1[i,2])==12)),])
#[1] 17
set.seed(25)
mat2<-
matrix(cbind(sample(1:15,1e5,replace=TRUE),sample(16:30,1e5,rep
Hi everyone,
I'm trying to create unique filenames and then write a data frame into
these files. This is the code I am using.
str1<-"fname"
str2<-".ext.txt";
FILENAME<-paste0(str1,str2);
write.table(df,
file=FILENAME,col.names=FALSE,row.names=FALSE,quote=FALSE,sep="\t");
Ideally, a file calle
Thanks.
Jeff
On Mon, Mar 18, 2013 at 9:30 AM, Jeff Newmiller wrote:
> sum(M[1]<12 & 12<=M[2]) untested, no data
> ---
> Jeff NewmillerThe . . Go Live...
> DCN:Basics: ##.#.
Thats cumbersome, Arun.
> sum(mat1[,1] < 12 & mat1[,2] > 12)
[1] 17
will do the job and even faster:
> system.time(replicate(1, sum(mat1[,1] < 12 & mat1[,2] > 12)))
# user system elapsed
# 0.067 0.001 0.078
HTH,
Jorge.-
On Tue, Mar 19, 2013 at 1:06 AM, arun <> wrote:
> Hi,
> Try
Hi,
Jorge's method will be faster.
#system.time(res1<-sum(apply(mat2,1,function(x) x[1]<12 & x[2]>12))) #instead
of 2, it should be 1
# user system elapsed
# 0.440 0.000 0.445
system.time(res1<-sum(apply(mat2,1,function(x) x[1]<=12 & x[2]>12))) #
# user system elapsed
# 0.500 0.
If you don't use apply() it would be even faster:
> system.time(sum(mat2[,1] < 12 & mat2[,2] > 12))
user system elapsed
0.004 0.000 0.003
Regards,
Jorge.-
On Tue, Mar 19, 2013 at 1:21 AM, arun <> wrote:
> Hi,
> Jorge's method will be faster.
> #system.time(res1<-sum(apply(mat2,1,func
On Mar 18, 2013, at 7:36 AM, Federico Calboli wrote:
> Dear All,
>
> is there a simple way that covers all regression models to extract the number
> of samples from a data frame/matrix actually used in a regression model?
>
> For instance I might have a data of 100 rows and 4 colums (1 respon
Dear Marko,
I can't quite tell whether this is an original question (as suggested by no
"Re:" in the subject field and no text from an earlier message) or an answer to
a question already posed (as suggested by the phrasing of the message); if the
latter, I apologize for missing the original que
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Sahana Srinivasan
> Sent: Monday, March 18, 2013 3:04 PM
> To: r-help@r-project.org
> Subject: [R] Problem with write.table
>
> Hi everyone,
> I'm trying to create unique fil
Perhaps a crude but reliable way is to check the number of residuals, e.g.,
length(my.model$resid).
Brian
Brian S. Cade, PhD
U. S. Geological Survey
Fort Collins Science Center
2150 Centre Ave., Bldg. C
Fort Collins, CO 80526-8818
email: ca...@usgs.gov
tel: 970 226-9326
On Mon, Mar 18, 2
Hi R-help,
I am using the sem package to run confirmatory factor analysis (cfa) on some
questionnaire data collected from 307 participants. I have been running
R-2.15.3 in Windows in conjunction with R studio. The model I am using was
developed from exploratory factor analysis of a separate dat
On 18/03/2013 14:51, Cade, Brian wrote:
Perhaps a crude but reliable way is to check the number of residuals, e.g.,
length(my.model$resid).
Not very reliable (what about zero weights, for example?), and the
component is usually 'residuals'.
No one has so far mentioned nobs(), which seems to
On 18 Mar 2013, at 15:07, Prof Brian Ripley wrote:
> On 18/03/2013 14:51, Cade, Brian wrote:
>> Perhaps a crude but reliable way is to check the number of residuals, e.g.,
>> length(my.model$resid).
>
> Not very reliable (what about zero weights, for example?), and the component
> is usually 'r
It would help if you told us what type of error you are getting and to also
provide sample data so that we could run it to see what happens. I use
'try' a lot to catch errors and have not had any problems with it.
On Mon, Mar 18, 2013 at 6:11 AM, lisa wrote:
> Hi All,
>
> I have tried every fix
Dear Kevin,
See ?summary.objectiveML, and in particular the description of the fit.indices
argument. By default, the summary() method doesn't print many fit indices, but
many are available optionally.
I hope this helps,
John
John Fox
Sen. Willi
> > I want to cont how many
> > times a number say 12 lies in the interval. Can anyone assist?
Has anyone else ever wished there was a moderately general 'inside' or 'within'
function in R for this problem?
For example, something that behaves more or less like
within <- function(x, interval=N
Ben Bolker gmail.com> writes:
> Maybe FAQ 7.31 was referred to not for its direct relevance but as
> a measure of the "old-hand-ness" of the people who will get the joke.
!1i|!0
Chuck
__
R-help@r-project.org mailing list
https://stat.ethz.ch/m
Dear John,
Thank you for taking the time to help me with this, I have been able to obtain
fit indices using the information that you provided.
Note to users searching archived R-help posts about this issue: The
instructional video I looked at (http://vimeo.com/38941937) gave fit indices
using
> * Bert Gunter [2013-03-17 20:30:56 -0700]:
>
> I also think it fair to say that all (??) languages have these sorts
> of malapropisms due to operator precedence.
Except for those languages which do _not_ have "operator precedence".
Like, e.g., Lisp.
--
Sam Steingold (http://sds.podval.org/) o
Sam:
Yes. Good point. (which is why my "??" was necessary).
-- Bert
On Mon, Mar 18, 2013 at 10:05 AM, Sam Steingold wrote:
> > * Bert Gunter [2013-03-17 20:30:56 -0700]:
> >
> > I also think it fair to say that all (??) languages have these sorts
> > of malapropisms due to operator precedenc
Besides what others have suggested, there are at some packages for writing
Excel files directly, and either of those might have a way to write
something that Excel will recognize as a hyperlink.
xlsx, XLConnect are both Java-based; I would start with these.
-Don
--
Don MacQueen
Lawrence Liverm
## Can someone suggest a simpler expression than either of these, with the
goal
## of taking a long matrix into a wide one with exactly one of the factors
converted to
## columns and all the rest retained as factors. I want something that
generalizes beyond
## the three factors illustrated here.
here is the error:
> aa<-metatrialstry(beta_5_50)
Error in asMethod(object) : matrix is not symmetric [1,2]
metatrials, the function that i am attempting to convert with try/tryCatch,
gives me back a matrix with as many rows are there are simulations (z) in
the aray with dim(x,y,z). with the
Hello
I am trying to find an automated way of fitting a mixture of normal and
log-normal distributions to data which is clearly bimodal.
Here's a simulated example:
x.1<-rnorm(6000, 2.4, 0.6)x.2<-rlnorm(1, 1.3,0.1)X<-c(x.1, x.2)
hist(X,100,freq=FALSE, ylim=c(0,1.5))lines(density(x.1), lty=2,
I have this little data.frame
http://dl.dropbox.com/u/102669/nanotna.rdata
Two column contains NA, so the best thing to do is use na.locf function (with
fromLast = T)
But locf function doesn't work because NA in my data.frame are not recognized as
real NA.
Is there a way to substitute fake NA
Hi Kevin,
With sem package use : summary(X,fit.indices=c("RMSEA",...)) to get
RMSEA or anothers fit indices.
See the section "ML.methods" in sem.pdf
Hervé
Hervé
Le 18/03/2013 16:00, Kevin Cheung a écrit :
Hi R-help,
I am using the sem package to run confirmatory factor analysis (cfa) on som
I have several rasters that I want to do some calculations ,basically
calculating the moving average.
dir2 <- list.files("D:\\2010+2011", "*.bin", full.names = TRUE)
saf=stack(dir2)
movi <- overlay(stack(saf),fun=function(x) movingFun(x, fun=mean,
n=3, na.rm=TRU
I'm sorry for the really vague subject line but I am not sure how to
succinctly describe what I am doing and what the problem is.
But, here goes:
1. I have data with two-way data with frequencies. Below is an
example, though in reality I am looking at about 10 different variables
that I am
On 18-03-2013, at 16:49, Pete wrote:
>
> I have this little data.frame
>
> http://dl.dropbox.com/u/102669/nanotna.rdata
>
> Two column contains NA, so the best thing to do is use na.locf function (with
> fromLast = T)
>
> But locf function doesn't work because NA in my data.frame are not rec
Hi,
library(reshape2)
dcast(tmp.n,X1~X2,value.var="Y")
# X1 0 2 4
#1 0 83 12 14
#2 1 107 25 27
#3 2 47 14 28
#4 3 27 4 13
#5 4 38 9 18
#6 99 1 0 0
A.K.
- Original Message -
From: "plessthanpointohf...@gmail.com"
To: r-help@r-project.org
Cc:
Sent: Monday, March 18,
On Mar 18, 2013, at 12:44 PM, plessthanpointohf...@gmail.com wrote:
> I'm sorry for the really vague subject line but I am not sure how to
> succinctly describe what I am doing and what the problem is.
>
> But, here goes:
>
> 1. I have data with two-way data with frequencies. Below is an exam
Dear Kevin,
In earlier versions of the sem package, the summary() method for model objects
produced many (and from version to version, an increasing number of) fit
indices by default. For various reasons, I decided to provide only the LR
chisquare test for the model, the BIC, and the AIC by def
Trying to make a strip in lattice xyplots to display shingle intervals
with a sensible number of digits:
First I make a 2x2 matrix with rounded values of the shingle itnervals:
lec <- round(matrix(unlist(levels(equal.count(sd$Frother))), ncol = 2,
byrow = TRUE), 3)
Next I make a custom strip fu
That works great! I didn't even know there was a reshape2 package.
Thanks!
Jen
On 03/18/2013 01:49 PM, arun wrote:
Hi,
library(reshape2)
dcast(tmp.n,X1~X2,value.var="Y")
# X1 0 2 4
#1 0 83 12 14
#2 1 107 25 27
#3 2 47 14 28
#4 3 27 4 13
#5 4 38 9 18
#6 99 1 0 0
A.K.
Hello!
I am having an issue with the OrgMassSpecR package. I run my HPLC using a
DAD detector. My raw data is exported form chemstation as a csv file. I
then upload the csv into Rstudio no problem. Using the DrawChromatogram
function, I get a nice chromatogram, and my retention time, peak area
This works really great, too.
Thanks for this option.
I am glad I have two ways to accomplish this.
I KNEW it was going to be that simple. I was convinced I was making more
out of it than I needed to and I'm glad to see I was right.
Best,
Jen
(It's fun to be new at something when I'm this
Hi list,
I am curious how to stop the set.seed(), I don't want the same repeated
random number. I know I can set it to a different seed, but I don't want
to go through the trouble of setting different seed every time.
Thanks,
Mike
[[alternative HTML version deleted]]
__
z.boxplot<- function(lst){
new.list<- lapply(lst,function(x) x[x$FDR<0.01,])
print(new.list)
par(mfrow=c(2,2))
b1<-lapply(names(new.list),function(x) lapply(new.list[x],function(y)
boxplot(FDR~z,data=y,xlab="Charge",ylab="FDR",main=x)))
}
z.boxplot(ListFacGroup) #prints new.list
If you
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of C W
> Sent: Monday, March 18, 2013 11:27 AM
> To: r-help
> Subject: [R] How to stop set.seed() besides exiting out of R?
>
> Hi list,
>
> I am curious how to stop the set.seed()
set.seed(100)
for (i in 1:100){
a <- rnorm(1000, mean=0, sd=1)
hist(a)
}
#Now say, I want to simulate without being confined to set.seed(100), I
just want to get a simulation like how R "normally" does it.
Mike
On Mon, Mar 18, 2013 at 2:40 PM, Nordlund, Dan (DSHS/RDA) <
nord...@dshs.wa.g
If you type DrawChromatogram you can see the method used to calculate the peak
area. Looks to me like you could easily hack it if you wanted. The relevant
part about peak areas is this:
for (j in 1:n) {
k <- (j%%n) + 1
x[j] <- peakTime[j] * peakIntensity[k] - pe
Hi Chris,
> I am having an issue with the OrgMassSpecR package. I run my HPLC
> using a DAD detector.
You are on a statistics IDE related mailing list. Have mercy with
people from other fields and tell them that you are using a diode array
to measure UV/VIS absorption. (And possibly let them kno
As I understand it, how R âânormallyâ does it is to use the system clock
to set the seed once per session, unless you use set.seed() to set a new seed.
You chose to set the seed to a different value. But from that point on, the
pseudo random number generation continues in the same way it
On 18-03-2013, at 19:57, Pietro wrote:
> Yes, it's true Berend!
>
> What i do is simply use read.xlsx function
>
> db <- read.xlsx2("c:/mydb.xlsx",1,as.data.frame=T)
>
> This is excel file i use:
> http://dl.dropbox.com/u/102669/mydb.xlsx
>
I don't have the required packages installed to r
Hi All,
I'm developing a ksvm application. I need to use the results obtained from ksvm
in R to construct or restore the ksvm formula and further use this formula to
predict new data.
The ksvm class contains xmatrix, ymatrix, coefficients, alpha, b and fitted
value. Taking linear svm as an exa
Yes, I agree with you. I guess what I was really looking for is a function
like UNset.seed()?
By having set.seed(), I can have reproducible code. But what if I want to
check my work against what's produced from set.seed(100)?
I really want to escape from the shadow of set.seed(), can I unset it
Hi Bryan,
Division by 2 is correct, comes from trapezoid calculation.
The modulo line is a funny way of producing c (2 : n, 1)
Best,
Claudia
Am Mon, 18 Mar 2013 15:00:06 -0400
schrieb Bryan Hanson :
> If you type DrawChromatogram you can see the method used to calculate
> the peak area. Loo
Yes, it's true Berend!
What i do is simply use read.xlsx function
db <- read.xlsx2("c:/mydb.xlsx",1,as.data.frame=T)
This is excel file i use:
http://dl.dropbox.com/u/102669/mydb.xlsx
I can't find a way to import as numeric.
My objective is to be able to work (in R) with my NA's
At 18.46 1
No, you cannot unset the seed. You can set it to a different value, but a the
random number generators always need a starting seed. If you donât set one,
R will set one for you , you just wonât know what it is. And as a practical
matter, given a sequence of random numbers you canât tell
Hello all,
I have just completed a principal components analysis and now which to create
sub scales out of my factors. Does anyone know how to do this in R?
Thanks!!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
htt
Hello,
There _is_ a function ?within. Maybe your function can be named 'between'
Rui Barradas
Em 18-03-2013 16:16, S Ellison escreveu:
I want to cont how many
times a number say 12 lies in the interval. Can anyone assist?
Has anyone else ever wished there was a moderately general 'inside' or
I am not sure of this, but I think you can unset the seed by removing the
dataset .Random.seed
from the global environment. E.g.,
> set.seed(1)
> runif(5)
[1] 0.2655087 0.3721239 0.5728534 0.9082078 0.2016819
> rm(list=".Random.seed", envir=globalenv())
> runif(5)
[1] 0.5952379 0.3355091 0.88201
Your request is meaningless. The seed itself is effectively overwritten each
time a random number is requested. It is only the repeatability of the sequence
of random numbers following the set.seed call that is reproducible. You can set
the seed to something else, but there is always a seed and
Thanks, William. You read my mind.
Cheers,
Mike
On Mon, Mar 18, 2013 at 4:00 PM, Jeff Newmiller wrote:
> Your request is meaningless. The seed itself is effectively overwritten
> each time a random number is requested. It is only the repeatability of the
> sequence of random numbers following t
Try this
Open the spreadsheet in Excel. Select all of the data click Copy. Don't
close Excel.
Open R and type the following command:
> Foglio1 <- read.table("clipboard-128", header=TRUE, sep="\t")
Now take a look at the structure of the data.frame
> str(Foglio1)
'data.frame': 1489 obs. of 1
On 18/03/2013 19:59, William Dunlap wrote:
I am not sure of this, but I think you can unset the seed by removing the
dataset .Random.seed
from the global environment. E.g.,
set.seed(1)
runif(5)
[1] 0.2655087 0.3721239 0.5728534 0.9082078 0.2016819
rm(list=".Random.seed", envir=globalenv())
The my.symbols and ms.arrows functions in the TeachingDemos package may
help.
On Mon, Mar 18, 2013 at 3:50 AM, Jie Tang wrote:
> hi R users:
>I have a dataset including u wind in x-axis and v wind in y-axis.
> How can I plot the u,v wind data in vector or barb figure?
> which command ?
>
Hi all,
I'm having problems finding the correct format for a command.
I would like to write some text on a plot.
I'm using the following command:
text(x,y,"text here", srt=90)
I would like the text to read:
capacity 10^3 m^3
(with ^ denoting superscript (i.e. each '3' as superscript).
I've
It appears that you MUST use the colClasses= argument with read.xlsx2:
Foglio1 <- read.xlsx2("mydb.xlsx", 1, colClasses=c("Date", rep("numeric",
14)))
However, e and n are converted to NaN not NA so you would need to convert
those columns (at least, I didn't check for missing values in the other
> -Original Message-
> From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk]
> Sent: Monday, March 18, 2013 1:22 PM
> To: William Dunlap
> Cc: r-help
> Subject: Re: [R] How to stop set.seed() besides exiting out of R?
>
> On 18/03/2013 19:59, William Dunlap wrote:
> > I am not sure of thi
On Tue, Mar 19, 2013 at 9:29 AM, Benjamin Gillespie wrote:
> Hi all,
>
> I'm having problems finding the correct format for a command.
>
> I would like to write some text on a plot.
>
> I'm using the following command:
>
> text(x,y,"text here", srt=90)
>
> I would like the text to read:
>
> capaci
Hello,
Something like this?
plot(1, type = "n")
text(1,1, expression(capacity ~ 10^3 ~ m^3))
Hope this helps,
Rui Barradas
Em 18-03-2013 20:29, Benjamin Gillespie escreveu:
Hi all,
I'm having problems finding the correct format for a command.
I would like to write some text on a plot.
I'
HI,
Not sure whether this is what you wanted.
library(reshape2)
result.dcast<-dcast(meltTest,A+D~H,value.var="M")
attr(result.reshape,"reshapeWide")<-NULL
row.names(result.reshape)<-1:nrow(result.reshape)
identical(result.reshape,result.dcast)
#[1] TRUE
result.dcast
# A D I J K L
#1 B E 1
Richard M. Heiberger temple.edu> writes:
>
> ## Can someone suggest a simpler expression than either of these, with the
> goal
> ## of taking a long matrix into a wide one with exactly one of the factors
> converted to
> ## columns and all the rest retained as factors. I want something that
> g
Hello
I am trying to find an automated way of fitting a mixture of normal and
log-normal distributions to data which is clearly bimodal.
Here's a simulated example:
x.1<-rnorm(6000, 2.4, 0.6)
x.2<-rlnorm(1, 1.3,0.1)
X<-c(x.1, x.2)
hist(X,100,freq=FALSE, ylim=c(0,1.5))lines(density(x.1), lty=
You posted this earlier. Do not repost, please. It was seen.
-- Bert
On Mon, Mar 18, 2013 at 3:28 PM, To . . wrote:
>
> Hello
>
> I am trying to find an automated way of fitting a mixture of normal and
> log-normal distributions to data which is clearly bimodal.
> Here's a simulated example:
>
Dear all,
I am wondering if what would be the simple way to develop a simple web
application that runs R. That is, the web application allows any user upload a
dataframe as a variable to my web server, a linux-based apache, and then run a
R package (my package) on the variable that should ideal
I can't offer any advice, but I feel like you could probably get a good
start on this by looking through the archives.
On Mon 18 Mar 2013 06:55:33 PM CDT, John linux-user wrote:
Dear all,
I am wondering if what would be the simple way to develop a simple web
application that runs R. That is,
I've got a complicated semi-parametric model that I'm fitting with
mgcv. I start with a model based on theory. Its got lots of
interaction terms. I want to winnow it down: removing each interaction
term or un-interacted main effect one by one, checking the AIC, and
retaining the model that g
Thanks for reply, but which archives?
Thanks again.
John
From: Stephen Sefick
Cc: "r-help@r-project.org"
Sent: Monday, March 18, 2013 8:02 PM
Subject: Re: [R] R web application development
I can't offer any advice, but I feel like you could probably get a
thank you all.
the dcast formulation is what I am looking for. That version of the
formula A+D ~ H
also works with the original cast function.
result.cast <- cast(A+D ~ H, value="M", data=meltTest)
It generalizes to a four-factor example, as requested.
This ftable solution didn't do what I wan
Just to add, I've been playing around with "select=TRUE" in mgcv, and it
does seem that it could work if I were to specify all of the nested
two-way interactions in my three-way interactions (see the toy example
below). But the problem is that I don't have enough degrees of freedom
to feed suc
I generally use the Markmail search engine but others use the Newcastle
resource. Some of other ones can be found with perusal of the Posting Guide and
Mailing list info page.
http://markmail.org/search/?q=list%3Aorg.r-project.r-help
On Mar 18, 2013, at 5:11 PM, John linux-user wrote:
> Thank
Hello,
I have a matrix of simulated data that I want to plot as a 3D surface using
RGL. Have followed the documentation carefully, but my plot only contains a
weird "single slice" of the data.
The actual RGL library and dependance seem fine as all of the demo code plots
beautifully.
The ac
Hi,
Your example is not reproducible.
What is "d" in your command?
Regards,
Pascal
On 19/03/13 10:21, Noah Silverman wrote:
Hello,
I have a matrix of simulated data that I want to plot as a 3D surface using RGL. Have
followed the documentation carefully, but my plot only contains a weird
Oops, that was a type.
d is just y.
If you want to reproduce, I put the entire matrix, as a csv here:
http://pastebin.com/gniyD4Rc
Thanks,
--
Noah Silverman, M.S.
UCLA Department of Statistics
8117 Math Sciences Building
Los Angeles, CA 90095
On Mar 18, 2013, at 6:58 PM, Pascal Oettli wr
Dear R Users,
I have data for more than 3 years. For each year I want to find the day
corresponding to Jaunary 1 of that year. For example:
> x <- c('5/5/2007','12/31/2007','1/2/2008')
> #Convert to day of year (julian date) -
> strptime(x,"%m/%d/%Y")$yday+1
[1] 125 365 2
I want to know ho
Hi Janesh,
On Mar 18, 2013, at 10:49 PM, Janesh Devkota wrote:
> Dear R Users,
>
> I have data for more than 3 years. For each year I want to find the day
> corresponding to Jaunary 1 of that year. For example:
>
>> x <- c('5/5/2007','12/31/2007','1/2/2008')
>
>> #Convert to day of year (juli
1 - 100 of 109 matches
Mail list logo