Hi dear,
I want to estimate d.f for Chi-squared distribution:
est.chi[i,]<-c(
fitdistr(as.numeric(data2[,i]),"chi-squared",start=list(df=1))$estimate)Warning
message:In optim(x = c(7.86755, 7.50852, 7.86342, 7.70589, 7.70153,
7.58272, :
one-diml optimization by Nelder-Mead is unreliable:
use "
Hello Brit and Michael,
indeed, fCalendar was replaced by timeDate (so was fSeries by timeSeries). Old
versions of both packages are in the CRAN archive. Now, with respect to QRMlib,
the package author/maintainer (cc'ed to this email) is pretty close to a
re-submittance of his package to CRAN.
Hi,
The "xtable" method for "summary.prcomp" is just creating a table of the
"importance" values. So you can get the same table for just a few of the PCs
by subscripting the importance values:
xtable(mySummary$importance[,1:2],digits=4)
Best,
Charlie
-Original Message-
From: r-he
On 23.02.2012 04:17, arunkumar wrote:
Yes the table already exist and it contains data
ant to insert two data frame into that separately
I still wonder why people write message completely out of context.
Uwe Ligges
-
Thanks in Advance
Arun
--
View this message in context
Thanks Don for your suggestion. I have received the original data in
Excel xlsx format so I must work with them unless I want to change file
format to thousands of files... I am also saving my output R files in
Excel format to make them compatible with the original ones. Everything
will be then
On 22.02.2012 21:04, zheng wei wrote:
Based on my understanding of the manual, I moved upziped the file and put the
folder of Rcplex under the directory of c:/temp
Then I use cmd under windows to go to the director of C:\Program
Files\R\R-2.13.0\bin, where my R is installed
and typed R CMD INS
Hi everybody!
I have intended to use library(lsa) on R 64-bits for Windows but it was not
possible. Every time I try to launch library(lsa) function R give me back next
message:
Loading required package: SnowballError : .onLoad failed in loadNamespace() for
'Snowball', details: call: NULL e
Thank you very much Ilai, I'll try and implement this right away.
On 22 February 2012 18:21, ilai wrote:
> On Wed, Feb 22, 2012 at 8:49 AM, David Winsemius
> wrote:
>
>>
>> After going back and constructing a proper dataset, you should be passing
>> 'groups' into the panel function and picking
The error message suggests that you do not have Java installed. And
since you said it works in 32-bit: You only have a 32-bit Java but no
64-bit Java installed in your machine.
Uwe Ligges
On 23.02.2012 11:08, A J wrote:
Hi everybody!
I have intended to use library(lsa) on R 64-bits for Win
Hi,
I have a coxph model like
coxph(Surv(start, stop, censor) ~ x + y, mydata)
I would like to calculate the Schoenfeld residuals for the null, i.e the same
model where the beta hat vector (in practical terms, the coeff vector spat out
by summary()) is constrained to be all 0s --all lese stays
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Vanúcia Schumacher
> Sent: 23 February 2012 00:08
> To: r-help@r-project.org
> Subject: [R] why is generating the same graph???
>
>
> Hi,
> why my script iss always generatin
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of uday
> Error in rowSums(a[, 2] == -999.99) :
> 'x' must be an array of at least two dimensions
Indeed it must - but you have asked for rowSums on a one-dimensinal object
(
Thanks Uwe, you vere right. Now the library is working but I have next problem
as well.
I have loaded a matrix (named matrix_v3) from a TXT file. This matrix was
previously reached using xtabs function. Now I have used this formula to obtain
cosine similarities from my data matrix (following i
On 23.02.2012 13:07, A J wrote:
Thanks Uwe, you vere right. Now the library is working but I have next problem
as well.
I have loaded a matrix (named matrix_v3) from a TXT file. This matrix was
previously reached using xtabs function. Now I have used this formula to obtain
cosine similarit
Dear Richard
I think the results below are consistent
set.seed(1020)
# created from EXP
X1 <- rEXP(1000)
Gexp <- gamlss(X1~1,family=EXP)
#GAMLSS-RS iteration 1: Global Deviance = 1999.762
#GAMLSS-RS iteration 2: Global Deviance = 1999.762
Glno <- gamlss(X1~1,family=LOGNO)
#GAMLSS-RS iterat
OK. I will try to explain in the best way:
Starting point: I had an arc list (like list provided by social network
softwares: Pajek, Ucinet...) With this form:
ID1 IDP2 SUMVAL
1 2 0.065
1 3 0.044
3 1 0.071
3 4 0.016
3 5 0.011
4 3 0.004
4 7 0.004
4 9 0.004
...
I transformed this list (recorded
I have 100 data files, which contains very huge data sets of location
details ( e.g latitude, longitude, time, temp)
Now I would like to save the all data of these 100 files in r object, so I
can reload data any time.
* Every file has different length of data
latitude <- NULL
longitude
Hi Guys,
I am relatively new to R and was wondering if I could next my gsub command
in identifying one object
I have data which looks like this: Taiwan_250km
I want it to look like this: Taiwan_250km
So essentially I just want to gsub '' and with nothing!
So far I have got th
On Feb 23, 2012 at 11:19am Soheila wrote:
> Who can help me to solve this problem?
> est.chi[i,]<-c(
> fitdistr(as.numeric(data2[,i]),"chi-squared",start=list(df=1))$estimate)
> Warning message:In optim(x = c(7.86755, 7.50852, 7.86342, 7.70589,
> 7.70153, 7.58272, : one-diml optimization by
> N
Dear all,
i'm using gdistance to model animal movement across landscape.
I have imported 11 rasters with roads, freeways, slope, use-of-land, lakes
(...) after recoding them with GRASS with a HSI value ranging from 1 to 4.
I've assigned zero to the NAs and then transformed all the rasters in
Transi
Dear All,
I would like to extract the smoothing matrix of the fitted GAM, \hat{y} = Sy. I
can't seem to find the function or am I missing something?
Thanks, any help is greatly appreciated
Man Zhang
[[alternative HTML version deleted]]
__
R-h
Hello
I wonder if anybody can help,
I am using the package adehabitatHR to estimate the potential distribution of a
species using the command "domain"
In the example given in the AdehabitatHS manual a map containing elevation
information is loaded (class= spatial pixels data frame) as well as th
It looks like it works. (I ran your code leaving out the inner
non-reproducible loop and just saving the NULL objects with your
syntax)
What is the error you are getting?
Michael
On Thu, Feb 23, 2012 at 3:01 AM, uday wrote:
>
> I have 100 data files, which contains very huge data sets of locati
hi there!
i am desperately in need for help.
i have read in data:
qthm=read.csv("qthm.csv",sep=";",header=TRUE)
then created time series ie
m2=ts(log(qthm$m2), start=c(1959, 1), frequency=4)
transformed these time series in zoo variables
qthmz=merge.zoo(diff(mbase),diff(m2),diff(cpi),diff(rgdp))
Dear all,
when applying the optim function the following error occured
"non-finite finite-difference value"
Therefore I would like to ask how one can try to handle such a problem and
which strategies have proven useful. (There is only litte guidance on the help
list for this kind of problem.)
It looks like what you are doing is reasonably efficient: I do think
there's a residuals element to the object returned by lm() so you
could just call that directly (which will be just a little more
efficient).
The bulk of the time is probably being taken up in the lm() call,
which has alot of ove
I am fitting individual growth models using nlme (multilevel models with
repeated measurements nested within the individual), and I am trying to
calculate the Pseudo R-squared for the models (an overall summary of the
total outcome variability explained). Singer and Willett (2003) recommend
calcul
? window
Michael
On Thu, Feb 23, 2012 at 7:09 AM, phillen wrote:
> hi there!
> i am desperately in need for help.
>
> i have read in data:
> qthm=read.csv("qthm.csv",sep=";",header=TRUE)
> then created time series ie
> m2=ts(log(qthm$m2), start=c(1959, 1), frequency=4)
> transformed these time
On Feb 23, 2012, at 2:04 AM, Petr PIKAL wrote:
Hi
[R] How do I save the current session?
savehistory() gives me the option of saving the executable lines
only.
I'd
like to save everything.
Using save is not enough?
I'm guessing the OP wanted to do what I accomplish in my MacGUI
ses
On Thu, Feb 23, 2012 at 5:28 AM, TwistedSkies wrote:
> Hi Guys,
>
> I am relatively new to R and was wondering if I could next my gsub command
> in identifying one object
>
> I have data which looks like this: Taiwan_250km
> I want it to look like this: Taiwan_250km
>
> So essenti
I have an object called rcom which was created by the command rcom
<-"mean(mat_rix$COL_1)". Also the data-frame mat_rix is well defined with
numeric values in its column 1 and its name is "COL_1".
My question is how to extract (or do something with) the content of rcom
so that it provides the m
There's no function for extracting this directly, as almost anything
that you want to do with the smoother matrix can be done in a much more
efficient way without computing it explicitly, but here's an example of
how to compute it explicitly in the unweighted additive case...
library(mgcv)
set
eval(parse(text = rcom))
Michael
On Thu, Feb 23, 2012 at 8:30 AM, Aniruddha Mukherjee
wrote:
> I have an object called rcom which was created by the command rcom
> <-"mean(mat_rix$COL_1)". Also the data-frame mat_rix is well defined with
> numeric values in its column 1 and its name is "COL_1".
On Thu, Feb 23, 2012 at 7:09 AM, phillen wrote:
> hi there!
> i am desperately in need for help.
>
> i have read in data:
> qthm=read.csv("qthm.csv",sep=";",header=TRUE)
> then created time series ie
> m2=ts(log(qthm$m2), start=c(1959, 1), frequency=4)
> transformed these time series in zoo varia
Dear Helpers,
I wrote a simple function to standardise variables if they contain more than
one value. If the elements of the variable are all identical, then I want the
function to return zero.
When I submit variables whose elements are all identical to the function, it
returns not zero, but N
Hi,
The parentheses are in the wrong places in the two if() statements.
Look here:
(length(table(x)>1))
^^
(length(table(x)==1))
^ ^
In both cases you're checking whether
the length of the comparison (table(x) > 1) or (table(x) == 1)
is 1,
I give up.
Uwe Ligges
On 23.02.2012 15:01, zheng wei wrote:
Thanks.
I do not understand item 2, what do you mean by add R's bin directory to path?
While directly use to c:\temp and type the commands, it says 'R' is not
recognized as an internal or external command.
While I use previous ap
In short, pick your poison...
Is there any particular reason why the tools that shipped with R itself (e.g.,
kernSmooth) are inadequate for you?
I like using the locfit package because it has many tools, including the ones
that the author didn't think were optimal. You may need the book to get
Hi
>
> Hi,
>
> The parentheses are in the wrong places in the two if() statements.
>
> Look here:
>
> (length(table(x)>1))
> ^^
> (length(table(x)==1))
> ^ ^
>
> In both cases you're checking whether
> the length of the comparison (table
Thank you Andy!
I went thru KernSmooth package but I don't see a way to use the fitted
function to do the "predict" part...
data=data.frame(z=z, x=x)
datanew=data.frame(z=z, x=x)
lmfit=lm(z~x, data=data)
lmforecast=predict(lmfit, newdata=datanew)
Am I missing anything here?
Thanks!
2012/2/2
I have a Mac OS X system. To deal with a long monthly electricity demand
time-series I use the procedures TRAMO/SEATS with the MS-windows only Demetra
programme and X12 under R resorting to the awkward - as far as the output is
concerned - x12 R package running the relating Fortran code.
I won
Hello,
consider the following data.frame df and vector v
df <- data.frame(group = c("A","B","C","D"), value = c(1,2,3,4))
v <- c(2,3)
How can I return a sub data.frame which has only the rows left where value
matches v
df:
group value
B 2
C 3
Cheers
--
View this message in context:
http:/
> df[df$value %in% v,]
group value
2 B 2
3 C 3
df is a function; you're better off not using that name for your
dataframe.
Sarah
On Thu, Feb 23, 2012 at 10:48 AM, syrvn wrote:
> Hello,
>
>
> consider the following data.frame df and vector v
>
> df <- data.frame(group = c("A",
df[value %in% v, ]
Michael
On Thu, Feb 23, 2012 at 10:48 AM, syrvn wrote:
> Hello,
>
>
> consider the following data.frame df and vector v
>
> df <- data.frame(group = c("A","B","C","D"), value = c(1,2,3,4))
> v <- c(2,3)
>
> How can I return a sub data.frame which has only the rows left where v
Dear all,
I am tryng to solve a nonlinear optimization probel using the solnp function.
I have different datasets. For the smaller I get full solutions, for
the bigger I got an error message stating:
Iter: 1 fn: 101.8017 Pars: 0.21000 0.21000 0.21
Dear Helpers,
I wrote a simple function to standardise variables if they contain more than
one value. If the elements of the variable are all identical, then I want the
function to return zero.
When I submit variables whose elements are all identical to the function, it
returns not zero, but
Dear Marcin,
This document should clarify your questions:
http://www.google.be/url?sa=t&rct=j&q=ccgarch%3A%20an%20r%20package%20for%20building%20multivariate%20garch&source=web&cd=1&ved=0CCMQFjAA&url=http%3A%2F%2Fhhs.diva-portal.org%2Fsmash%2Fget%2Fdiva2%3A320449%2FFULLTEXT02&ei=8V1GT_uDDcLq8QOW
muchas gracias! Exactly what I was looking for, very helpful.
Best regards,
Philipp
--
View this message in context:
http://r.789695.n4.nabble.com/changing-time-span-tp4413672p4414007.html
Sent from the R help mailing list archive at Nabble.com.
__
R-
The need comes from the PISA data. (http://www.pisa.oecd.org)
In the data there are many cases and each of them carries a numeric
variable that signifies it's weight.
In SPSS the command would be "WEIGHT BY"
In simpler words here is an R sample ( What is get VS what i want to get )
> data.rec
Dear R user,
I am a biochemist/bioinformatician, at the moment working on protein
clusterings by conformation similarity.
I only started seriously working with R about a couple of months ago.
I have been able so far to read my way through tutorials and set-up my
hierarchical clusterings. My probl
Thanks.
I do not understand item 2, what do you mean by add R's bin directory to path?
While directly use to c:\temp and type the commands, it says 'R' is not
recognized as an internal or external command.
While I use previous approach by going into the bin directory and type R CMD
INSTALL
Thanks for reply Michael
the error which I got is as follows :
Error in gzfile(file, "wb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "wb") :
cannot open compressed file 'data.RData', probable reason 'Permission
denied'
--
View this message in context:
http://
Michael , the first error which I got is
"number of items to replace is not a multiple of replacement length"
sorry last time it did not copied whole thing
--
View this message in context:
http://r.789695.n4.nabble.com/saving-all-data-in-r-object-tp4413092p4414058.html
Sent from the R help ma
Also see the most excellent rmgarch package from A*lexios Ghalanos *available
here:
https://r-forge.r-project.org/R/?group_id=339
On Thu, Feb 23, 2012 at 9:41 AM, vnatanel wrote:
> Dear Marcin,
>
>
> This document should clarify your questions:
>
> http://www.google.be/url?sa=t&rct=j&q=ccgar
If that's the kind of framework you'd like to work in, use locfit, which has
the predict() method for evaluating new data. There are several different
handwidth selectors in that package for your choosing.
Kernel smoothers don't really fit the framework of "creating a model object,
followed by
Thank you all very much for your help (on both the r-help and the
bioconductor listserves).
Benilton - I couldn't get sqldf to install on the server I'm using
(error is: Error : package 'gsubfn' does not have a name space). I
think this was a problem for R 2.13, and I'm trying to get the admin's
t
On 23-Feb-2012 Jonathan Williams wrote:
> Dear Helpers,
> I wrote a simple function to standardise variables if they
> contain more than one value. If the elements of the variable
> are all identical, then I want the function to return zero.
>
> When I submit variables whose elements are all ident
Hi all,
I'm trying to use the package read.table within a foreach loop. I'm
grabbing 500M rows of data at a time from two different files and then
doing an aggregate/tapply like function in read.table after that. I
had planned on doing a foreach loop 39 times at once for the 39 files
I have, but o
Hi Members,
Do exist the possibility to delete a command line into the history?
Fo example. If I' ve typed a line code that is wrong, Can I delete it from
the hostory in reason to do not save it in the .Rhistory file?
Thanks for helping,
Gian
[[alternative HTML version deleted]]
___
Did you have to use a particular filename? or extension.
I created a similar file but then could not read it back in
Steve
On Mon, Feb 13, 2012 at 6:45 AM, Djordje Bajic wrote:
> I've been investigating and I partially respond myself. I tried the
> packages 'bigmemory' and 'ff' and for me the
Dear list,
I am trying to pass data frame colnames through ddply without sucess.
Here is my command:
>exportfile<-ddply(exportfile,c("Product","Price"),summarise,Nbr.Lots=sum(Filled.Qty))
exportfile is a df. I want to apply summarise to Product and Price columns and
sum the Filled.Qty column a
On Thu, Feb 23, 2012 at 04:40:07PM -, Ted Harding wrote:
[...]
> A basic solution for this special case would be
>
> zt=function(x){
> if (sd(x) == 0) return(0*x) else return( (x-mean(x))/sd(x) )
> }
>
> This should cover the case where length(table(x))==1 (see also below).
>
> I'm n
I saw no reply to this yet, so herewith a few comments.
1. Best recommendation: Post to r-sig-mixed-models instead.
Miscellaneous comments.
R-squared as "an overall summary of the total outcome variability
explained" is practically useless and generally misleading. Why?
Short answer: Because no
On Feb 23, 2012, at 10:49 AM, Hed Bar-Nissan wrote:
The need comes from the PISA data. (http://www.pisa.oecd.org)
In the data there are many cases and each of them carries a numeric
variable that signifies it's weight.
In SPSS the command would be "WEIGHT BY"
In simpler words here is an R sam
Dear R People:
I have a question, please:
I want to install a package from R CMD INSTALL and I have a boatload
of configure args. I want to put them into a file. How do I point
the R CMD INSTALL to that file, please?
Thanks,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer an
See inline
On Thu, Feb 23, 2012 at 8:54 AM, kosmo7 wrote:
> Dear R user,
> In other words, I am trying to obtain/read the sub-clusters of a specific
> cluster in the dendrogram, by isolating a specific node and exploring
> locally its lower hierarchy.
To explore or "zoom in" on elements of z yo
Dear R users,
I am trying to fit a gls model and weight my data points using a
VarFixed structure. I have found many examples, but I do not
understand the difference between the following models with varFixed
specified in a different way:
mod<-gls(y~x,weights=varFixed(~1/invsigma)
mod<-gls(y~x,w
Hei,
I have a one simple question which does not seem to be that simple as I
cannot find any solution/answer:
Is it possible to compare multiple survival curves in R with
survdiff-function when there is interaction term involved in predictor
variables (and this interaction is significant)?
Examp
You can tell me what do you mean by add R's bin directory to path.
Thanks
From: Uwe Ligges
Cc: David Winsemius ; "r-help@r-project.org"
Sent: Thursday, February 23, 2012 9:29 AM
Subject: Re: [R] installing the package Rcplex
I give up.
Uwe Ligges
On 23
Hi,
I am running a model with count data and one categorical predictor (simple
model for me to understand it fully), I did in R a glm like this:
glm(Recruitment~Depth, family=poisson). I get the coefficientes and
confidence intervals and all is ok. But then I want to do the same model
with Bayesian
DEAR R-girl:
On Thu, Feb 23, 2012 at 8:12 AM, R-girl wrote:
> Hei,
>
> I have a one simple question which does not seem to be that simple as I
> cannot find any solution/answer:
>
> Is it possible to compare multiple survival curves in R with
> survdiff-function when there is interaction term inv
R Experts
I wish to tabulate into one data frame statistics summarizing
concentration data. The summary is to include mean, standard
deviation, median, min and max. I wish to have summaries by Dose, Day
and Time. I can do this by calling aggregate once for each of the
statistics (mean, s
On 2/22/2012 4:53 PM, Vinny Moriarty wrote:
Hello,
I have current data from a nortek ADP, which is basically current speed and
direction data in a 3 dimensional X Y Z format
http://www.nortekusa.com/usa/products/current-profilers/aquadopp-profiler-1
The instrument logs data in a complex wa
The chol and solve methods for dpoMatrix (Matrix package) are much
faster than the default methods. But, the time required to coerce a
regular matrix to dpoMatrix swamps the advantage.
Hence, I have the following problem, where use of dpoMatrix is worse
than a regular matrix.
library(Matrix)
x <
Thanks Andy.
I am reading the "locfit" document...
but not sure how to do the CV and bandwidth selection...
Here is a quote about the function "regband": it doesn't seem to be usable?
Basically I am looking for a "locfit" that comes with an automatic
bandwidth selection so that I am essentially
On Feb 23, 2012, at 1:41 PM, Michael Karol wrote:
R Experts
I wish to tabulate into one data frame statistics summarizing
concentration data. The summary is to include mean, standard
deviation, median, min and max. I wish to have summaries by Dose, Day
and Time. I can do this by callin
On Feb 23, 2012, at 11:12 AM, R-girl wrote:
Hei,
I have a one simple question which does not seem to be that simple
as I
cannot find any solution/answer:
Is it possible to compare multiple survival curves in R with
survdiff-function when there is interaction term involved in predictor
vari
Adan,
How many levels does Depth have? my wild guess: 3 and your bugs model
is not identifiable.
Second, I think you may have a critical error in the way you formatted
the data for the bugs model. From your code it looks like you are just
using the factor Depth and not a design matrix of dummy var
I have a four-digit string I want to convert to five digits. Take the
following frame:
zip
2108
60321
60321
22030
91910
I need row 1 to read '02108'. This forum directed me to formatC previously
(thanks!) That usually works but, for some reason, it's not in this
instance. Neither of the syntaxes
sprintf's "%s" format descriptor ignores initial 0's in ,
in C's sprintf and in R's. Here are 2 ways to do it:
> z <- c("5", "45", "345", "2345", "12345")
> sprintf("%05d", as.integer(z))
[1] "5" "00045" "00345" "02345" "12345"
> gsub(" ", "0", sprintf("%5s", z))
[1] "5" "00045"
You said that the values are already character - that's the key.
Compare:
> sprintf("%05s", "2018")
[1] " 2018"
> sprintf("%05d", 2018)
[1] "02018"
Since they are already character, though, here's another option:
x <- c("2108", "60321", "22030") # part of your data
ifelse(nchar(x) == 4, paste("0"
On 23-Feb-2012 z2.0 wrote:
> I have a four-digit string I want to convert to five digits. Take the
> following frame:
>
> zip
> 2108
> 60321
> 60321
> 22030
> 91910
>
> I need row 1 to read '02108'. This forum directed me to formatC previously
> (thanks!) That usually works but, for some reason,
Another simple question - trying to specify xlim in a zoo plot and getting
error
my plot line is
plot(z1,
ylim=c(-100,3000),xlim=c(chron("10/30/2011","00:00:00"),chron("10/30/2011","00:20:00")),type="b",xlab="",ylab="1
Minute Fit",cex.lab=1.3)
Error in substring(paste("0", v$day, sep = ""), first =
The as.matrix (and as.table or as. vector or as.numeric ...) command takes
the object that you wish to convert as an argument. So the code below will
actually perform the conversion from table to matrix.
> newmatrix<- as.matrix(matrix_v3)
A way to see what form your data are taking is to use the
On Thu, Feb 23, 2012 at 3:06 PM, Henry wrote:
> Another simple question - trying to specify xlim in a zoo plot and getting
> error
> my plot line is
> plot(z1,
> ylim=c(-100,3000),xlim=c(chron("10/30/2011","00:00:00"),chron("10/30/2011","00:20:00")),type="b",xlab="",ylab="1
> Minute Fit",cex.lab=1
If you could just construct the zoo object you want to plot and then
use dput() on it to create a plain-text representation (safe for
emailing) that'd make it easiest for us to help you. We can't do much
right now since we don't have the text file in question.
Michael
On Thu, Feb 23, 2012 at 3:21
It's really weighting - it's just that my simplified example was too
simplified
Here is my real weight vector:
> sc$W_FSCHWT
[1] 14.8579 61.9528 3.0420 2.9929 5.1239 14.7507 2.7535
2.2693 3.6658 8.6179 2.5926 2.5390 1.7354 2.9767 9.0477
2.6589 3.4040 3.0519
And
Please cc the list. I'm not a debian user so any suggestions I make
will be guesses based on similarities with Mac OS X. There's also a
R-SIG-Debian list that might be appropriate.
That said, if you plan on doing this repeatedly, perhaps you can make
an alias in your bash profile (or whatever shel
On Feb 23, 2012, at 3:27 PM, Hed Bar-Nissan wrote:
It's really weighting - it's just that my simplified example was too
simplified
Here is my real weight vector:
> sc$W_FSCHWT
[1] 14.8579 61.9528 3.0420 2.9929 5.1239 14.7507
2.7535 2.2693 3.6658 8.6179 2.5926 2.5390
No. But there is nothing preventing you from editing the file once your session
is complete.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Hed Bar-Nissan
> Sent: Thursday, February 23, 2012 12:27 PM
> To: David Winsemius
> Cc: r-help@r-project.org
> Subject: Re: [R] Case weighting
>
> It's really weighting - it's jus
suppose I have two sets of vectors: x1,x2,...,xN and y1,y2,...,yN.
I want N correlations: cor(x1,y1), cor(x2,y2), ..., cor(xN,yN).
my sets of vectors are arranged as data frames x & y (vector=column):
x <- data.frame(a=rnorm(10),b=rnorm(10),c=rnorm(10))
y <- data.frame(d=rnorm(10),e=rnorm(10),f=
sapply(1:NCOL(x), function(n) cor(x[n], y[n])) is a quick and dirty
way, though probably not optimal.
Michael
On Thu, Feb 23, 2012 at 5:10 PM, Sam Steingold wrote:
> suppose I have two sets of vectors: x1,x2,...,xN and y1,y2,...,yN.
> I want N correlations: cor(x1,y1), cor(x2,y2), ..., cor(xN,yN
Use 1:n as an index.
e.g.
sapply(1:n, function(i) cor(x[,i],y[,i]))
-- Bert
On Thu, Feb 23, 2012 at 2:10 PM, Sam Steingold wrote:
> suppose I have two sets of vectors: x1,x2,...,xN and y1,y2,...,yN.
> I want N correlations: cor(x1,y1), cor(x2,y2), ..., cor(xN,yN).
> my sets of vectors are arr
Have a look at the gretl econometric package. This has a simplified
interface to X12 and integrates well with R.
Best Regards
John
On Thursday, 23 February 2012, Victor wrote:
> I have a Mac OS X system. To deal with a long monthly electricity demand
> time-series I use the procedures TRAMO/SE
Have a look at the gretl econometric package. This has a simplified
interface to X12 and integrates well with R.
Best Regards
John
On Thursday, 23 February 2012, Victor wrote:
> I have a Mac OS X system. To deal with a long monthly electricity demand
> time-series I use the procedures TRAMO/SE
On Thu, Feb 23, 2012 at 3:24 PM, Bert Gunter wrote:
> Use 1:n as an index.
>
> e.g.
> sapply(1:n, function(i) cor(x[,i],y[,i]))
## sapply is a good solution (the only one I could think of too), but
not always worth it:
# for 100 x 1000
x <- data.frame(matrix(rnorm(10),nc=1000))
y <- data.f
Dear R Help,
I have been struggling with this problem without making much headway. I am
attempting to avoid using a loop, and would appreciate any suggestions you may
have. I am not well versed in R and apologize in advance if I have missed
something obvious.
I have a data set with multiple
Sorry. I forgot to note that I am using R version 2.8.0.
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] on behalf of
Kara Przeczek [przec...@unbc.ca]
Sent: February 23, 2012 3:13 PM
To: r-help@r-project.org
Subject: [R] perform t.test by
Elai:
Thank you.You make an excellent point. cor() is implemented at the C
level (via a .internal call) whereas sapply implements an interpreted
loop that has to issue the call each time through the loop (with some
shortcuts/tricks to reduce overhead). So the operations count of the
original poste
1 - 100 of 123 matches
Mail list logo