Can somebody help me in finding package/Example in R which could do
EMA(Exponential Mean Average).
I installed TTR package but the 'EMA function which I was trying to use
is giving the following error.
Error: Could not find function EMA
Thanks Regards,
Thomas
[[alternative HTML
Hey Guys,
i am kind of confused. Under windows the system() function works great, but
not with my mac.
I have two questions:
1) What do i have to change. Using packages which require system or
eval(parse() everything is fine, but
when i try it myself sh: cmd: command not found
Under windows i
I forgot to mention that even after updating all packages on the 64 bit
opensuse machine running R 2.15, the problem did not vanish.
Thanks so far
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Dear Brian,
I found this in the archives and was going to follow your advice, but can't
get the source code of the function extractAIC you suggest modifying.
Getting the full source code of stepAIC straight from the R session (by
typing
the function name) was immediate. Do I need to go down
Thanks for the replies and sorry for the missing information.
@@
System information:
R version 2.15.0 (2012-03-30)
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-suse-linux-gnu (64-bit)
On May 21, 2012, at 05:25 , Duncan Murdoch wrote:
On 12-05-20 10:28 PM, Bert Gunter wrote:
Well, that's not very comforting, Duncan. It's like saying that you
have to read the engineering specs to drive the car successfully.
I think Robert's message that I responded to was asking for a
I'm failing to get a for loop working. I'm sure it's something simple, and I
have found some posts relating to it, but I'm just not understanding why
this isn't working.
I have a data frame and would like to loop through specific column names,
using aggregate() within a for loop. There are
No data, not reproducible.
I think you should be using na.omit, though.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Hi everybody,
I have a small question about R.
I'm doing some correlation matrices between my files. These files contains
each 4 columns of data.
These data files contains missing data too. It could happen sometimes that
in one file, one of the 4 columns contains only missing data NA. As I'm
On Thu, 17-May-2012 at 05:00PM -0700, Rich Shepard wrote:
| On Thu, 17 May 2012, Mercier Eloi wrote:
|
| Missing a closing parenthesis after log10.
|
| Eloi,
|
| A-ha! I knew new eyes would see what I kept missing.
That example shows the benefit of using a text editor that is designed
for
On 05/21/2012 05:59 PM, jeff6868 wrote:
Hi everybody,
I have a small question about R.
I'm doing some correlation matrices between my files. These files contains
each 4 columns of data.
These data files contains missing data too. It could happen sometimes that
in one file, one of the 4 columns
hi, nice people
I needs to compute the product whose annual sales values are all
among the top 100 using R ( version 2.15.0)
data is stored in the MSSQL database.
data structure( sales table's fields): productID, time, value
I have found the SQL solution
Hi
You did not provide data but I can see some problems in your code. See
inline.
I'm failing to get a for loop working. I'm sure it's something simple,
and I
have found some posts relating to it, but I'm just not understanding why
this isn't working.
I have a data frame and would
Hi Jim,
Thanks for your answer.
I tried your proposition. The idea seems to be good but I still have my
error.
Actually, the error is in the next function, which uses the function
get.max.cor I told you before.
I also tried these 2 functions with data containing no missing data, and it
works
Hello,
Didi you run
library(TTR)
?
Regards
- Mail original -
De : Prakash Thomas pthomas2...@gmail.com
À : r-help@r-project.org
Cc :
Envoyé le : Lundi 21 mai 2012 15h02
Objet : [R] Need help in doing EMA(Exponential Mean Average).
Can somebody help me in finding
Hi, you should give more details of your problem (at least some output,
as Peter Daalgard says). But you are probably asking for something like
this:
http://www.r-bloggers.com/anova-%E2%80%93-type-ii-ss-explained/
or many other webpages that you may find if you Google or R-seek with
keywords
On May 21, 2012, at 10:25 , Petr PIKAL wrote:
Hi
You did not provide data but I can see some problems in your code. See
inline.
I'm failing to get a for loop working. I'm sure it's something simple,
and I
have found some posts relating to it, but I'm just not understanding why
this
On Mon, May 21, 2012 at 2:00 AM, peter dalgaard pda...@gmail.com wrote:
[snip]
What the poster probably wanted was something in the vein of
nm - colnames(airquality)[1]
ff - formula(bquote(.(as.name(nm))~Month))
aggregate(ff, airquality, mean, na.rm=T)
Month Ozone
1 5 23.61538
2
Hi Sven:
Could you find an answer to your post above? I too need to extract the path
to the terminal nodes in a ctree object and could not find a way to do it.
Thanks.
Tudor
--
View this message in context:
MMJ == Mahometa, Michael J michael.mahom...@ssc.utexas.edu
on Wed, 16 May 2012 17:09:31 + writes:
MMJ All, Just to get the word out: We are looking for a new
MMJ Statistical Consultant at .
MM...
MMJ Thanks, Michael
Sorry, but that's ABSOLUTELY *not*
er...@rice.edu
on Wed, 16 May 2012 12:39:44 -0500 writes:
I need to fit a t copula with fixed degree of freedom
let's say 4. I do not want to estimate the dof together
with correlation matrix optimally. Instead fix the dof to
4 and only estimate the correlation matrix
Hello Rui,
Thanks for your answer too.
I tried your proposition too, but by giving the value 0 for this file, it
still wants to make a calculation with it. As it is looking for the best
correlation, and then the 2nd best correlation, giving only 0 seems to be a
problem for the 2nd best
On Sat, May 5, 2012 at 1:18 AM, Spencer Graves
spencer.gra...@structuremonitoring.com wrote:
On 5/4/2012 9:27 PM, Duncan Murdoch wrote:
On 12-05-04 10:33 PM, Joshua Wiley wrote:
On Fri, May 4, 2012 at 7:17 PM, Duncan Murdochmurdoch.dun...@gmail.com
wrote:
On 12-05-04 7:40 PM, Spencer
Hi,
I plot no: of bytes against time and find the distribution
curve using R. These bytes are sent from the client to the server.
Is there a way to generate bytes randomly using R according to a
distribution ? I would like to send these bytes to the server. Hope I am
not misguided
On 2012-05-20 16:22, ejulia17 wrote:
Dear Brian,
I found this in the archives and was going to follow your advice, but can't
get the source code of the function extractAIC you suggest modifying.
Getting the full source code of stepAIC straight from the R session (by
typing
the function name)
Thanks Rui...I need chisqtest inside loop , I've given only example code
here.
--
View this message in context:
http://r.789695.n4.nabble.com/Replace-a-variable-by-its-value-tp4630734p4630737.html
Sent from the R help mailing list archive at Nabble.com.
I have a dataset called raw-data . I am trying to use the following code -
col_name-names(raw_data)
for (i in 1:(length(names(raw_data))-2))
{
tbl=table(raw_data$Pay.Late.Dummy, raw_data$col_name[i])
chisqtest-chisq.test(tbl)
}
Say the 1st column of my raw_data is Column1. The idea is
Hello,
Maybe the function could return a special value, such as zero.
Since a column with that number doesn't exist, the code executed afterward
would simply move on to the second greatest correlation.
The function would then become
get.max.cor - function(station, mat){
mat[row(mat) ==
Yes the matrix is symmetric
Gabor provided a partial solution:
Try this:
ix - na.action(na.omit(replace(M, upper.tri(M), 0)))
M[-ix, -ix]
However this removes all rows containing an NA in the lower half of the matrix
- even if the corresponding column has also been removed
I I have revised
Try this.
check.na - function(mat){
nas - NULL
for(st in seq.int(ncol(mat)))
if(sum(is.na(mat[, st])) == nrow(mat) - 1) nas - c(nas, st)
if(length(nas)){
mat - mat[, -nas]
mat - mat[-nas, ]
}
mat
}
Dear R experts,
I am trying to do linear extrapolation on a dataset like the attached document.
I looked at the approx and approxfun function that seem to do this function,
but not fully understand them. I was wondering if someone could help with
writing commands to do the following based on
Hello,
Your doubt is a frequent one. 'col_name' is a character vector, it's
elements are character strings, not symbols.
These are all equivalent, and are what you want.
raw_data[[ col_name[i] ]] # using a list-like syntax (data.frame subclasses
list)
raw_data[ , col_name[i] ] # seems more
Hi
I have a dataset called raw-data . I am trying to use the following
code -
col_name-names(raw_data)
for (i in 1:(length(names(raw_data))-2))
{
tbl=table(raw_data$Pay.Late.Dummy, raw_data$col_name[i])
chisqtest-chisq.test(tbl)
}
Say the 1st column of my raw_data is
Hi ,
I have built decision tree using rpart . I want to do k Fold validation on
the decision tree .
Could you help how can i do that .. please tell the package which required
for K fold validation.
Regards,
Santosh
--
View this message in context:
I am trying to parse a webpage using the htmlParse command in XML package as
follows:
library(XML)
u = http://en.wikipedia.org/wiki/World_population;
doc = htmlParse(u)
I get the following error:
Error in htmlParse(u) :
error in creating parser for
On Sun, May 20, 2012 at 10:54 AM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Sun, May 20, 2012 at 10:52 AM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Sun, May 20, 2012 at 10:17 AM, Nevil Amos nevil.a...@monash.edu wrote:
I have some square matrices with na values in
Hi
You can do it by hand and remove row/col with max number of NA values.
rem-which.max(colSums(is.na(M)))
M1-M[-rem, -rem]
rem-which.max(colSums(is.na(M1)))
M2-M1[-rem, -rem]
M2
1 2 3 4 5 7 8 10 11 12
10 143 92 134 42 123 40 107 49 93
2 143 0 77 6 99 46 47 114
Hi,
How do you identify all occurences of an element or a sub-vector in a vector as
opposed to match, %in%, and intersect which find the first occurrence of an
element?
Cheers,
Carol
[[alternative HTML version deleted]]
__
On May 20, 2012, at 6:49 PM, barb wrote:
Hey Guys,
i am kind of confused. Under windows the system() function works
great, but
not with my mac.
I have two questions:
1) What do i have to change. Using packages which require system or
eval(parse() everything is fine, but
when i try it
I tried your function. It works great thanks. I used then diag() in order to
have the value 1 for the whole diagonal of my matrix. But it still doesn't
work it's crazy.
By deleting colums and rows (and so some files) containing only NAs in the
correlation matrix, it doesn't work when I apply
Hi Everyone,
I am merging two data frames that have different number of rows. But I end
up having rows a lot more than both rows combined. I tried the following
but the duplicate bit does not change anything. Can anyone suggest to me
how I can handle this?
Regards,
Belay
x -c(1, 2, 3, 4,5,
Hello,
Try
while(TRUE){
ix - apply(M, 2, function(x) sum(is.na(x)))
if(all(ix == 0)) break
ix - max(which(ix == max(ix)))
M - M[-ix , -ix]
}
M
Note that in the original there's really no difference between columns 9
and 10.
If in the above code you use 'min', column 9 is
Hi Carol,
I'm not sure what a sub-vector in a vector is, but I think you might
be looking for ?grep
Best,
Ista
On Mon, May 21, 2012 at 9:20 AM, carol white wht_...@yahoo.com wrote:
Hi,
How do you identify all occurences of an element or a sub-vector in a vector
as opposed to match, %in%,
Hi,
On Mon, May 21, 2012 at 6:01 AM, santoshdvn santosh...@gmail.com wrote:
Hi ,
I have built decision tree using rpart . I want to do k Fold validation on
the decision tree .
Could you help how can i do that .. please tell the package which required
for K fold validation.
I think you'll
Hello,
I have a question regarding the syntax of the lme function in the nlme
package. What I'm trying to do is to calculate an estimate of R^2 based on
the likelihood ratio test. For this calculation, I need to determine the
maximum log-likelihood of the intercept-only model and the model of
Sorry, wasn't clear .. .Rui's code as worked
--
View this message in context:
http://r.789695.n4.nabble.com/Replace-a-variable-by-its-value-tp4630734p4630748.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing
Hi!
I have a matrix defined on geographical positions (through) row and column
names. I need to change a number of elements in this matrix using the
information of a data.frame containing geographical positions and a number of
variables.
Changing the value of one specific element is easy, but
In addition to the papers suggested by Roy, if you are interested in a
book-length treatment of state space models and Kalman filter in R, I
would look at
http://www.springer.com/978-0-387-77237-0
And I would carry out the implementation in R using package dlm
Just my (biased) 2 cents
like searching m or [m,n] in [1,n,m,e,m,n,n,u].
I want the exact match of all occurrences of m and n in the last vector.
Therefore, grep is not helpful as it will extract if there are also mm and mmm.
Cheers,
Carol
From: Ista Zahn istaz...@gmail.com
Cc:
Hi,
See inline below
On Mon, May 21, 2012 at 6:03 AM, i_like_macs dk...@mac.com wrote:
Hello,
I have a question regarding the syntax of the lme function in the nlme
package. What I'm trying to do is to calculate an estimate of R^2 based on
the likelihood ratio test. For this calculation, I
On Mon, May 21, 2012 at 7:33 AM, carol white wht_...@yahoo.com wrote:
like searching m or [m,n] in [1,n,m,e,m,n,n,u].
I want the exact match of all occurrences of m and n in the last vector.
Therefore, grep is not helpful as it will extract if there are also mm and
mmm.
I am pretty sure
I think though that the concepts involved are really truly subtle
I don't think the concepts are truly subtle; it is essentially the
difference between things and names of things (and names are
also things). However, we have muddied the waters by providing
convenience functions like library()
And what distribution would that be
R provides many built in distributions, but if those aren't enough for
you, you can check:
http://cran.r-project.org/web/views/Distributions.html
Best,
Michael
On Mon, May 21, 2012 at 7:26 AM, Mohan Radhakrishnan moh...@fss.co.in wrote:
Hi,
I think you want this:
merge(a,b, by = d, all = FALSE)
Type ?merge to see all the options to merge available to you,
Best,
Michael
On Mon, May 21, 2012 at 9:31 AM, Belay Gebregiorgis belay...@gmail.com wrote:
Hi Everyone,
I am merging two data frames that have different number of rows. But
On Mon, May 21, 2012 at 6:25 AM, David Winsemius dwinsem...@comcast.net wrote:
On May 20, 2012, at 6:49 PM, barb wrote:
Hey Guys,
i am kind of confused. Under windows the system() function works great,
but
not with my mac.
I have two questions:
1) What do i have to change. Using
Hello Everyone,
I have what I think is a complex text parsing task. I've provided some sample
data below. There's a relatively simple version of the coding that needs to be
done and a more complex version. If someone could help me out with either
version, I'd greatly appreciate it.
Here are
Hi everyone.
I'm working on a list of files (about 50 files). I've listed them thanks to
the function: list.files.
Each of my files contains 35000 lines of data. These files may also contain
some missing values NA (sometimes till 10 000 NAs following each other).
The aim is to do some correlation
Hi Jeff,
Does this work okay for you?
ST - list(data.frame(a=1:10),
data.frame(b=c(NA,NA,NA,NA,NA,6:10)),
data.frame(c=c(1,NA,NA,4:10)),
data.frame(d=c(NA,NA,NA,NA,NA,NA,NA,NA,NA,NA)),
data.frame(e=c(1,2,3,4,NA,NA,7:9,NA)))
doit - function(data, rows, minpresent) {
if
Hi Nick,
Can you elaborate (hopefully in a constructive way) on what it is that you find
objectionable about my post?
Thanks,
Paul
--- On Mon, 5/21/12, Nick Gayeski n...@wildfishconservancy.org wrote:
From: Nick Gayeski n...@wildfishconservancy.org
Subject: RE: [R] Complex text parsing
Hi Øystein,
You can do it by passing a matrix for indexing instead of two vectors.
Here's an example:
tmpmat - matrix(NA, nrow = 10, ncol = 10,
dimnames = list(letters[1:10], LETTERS[1:10]))
tmpmat[cbind(c(d, e, f), c(D, E, F))] - 100
tmpmat
The matrix is created using cbind() to
Hi Paul,
I do not think that Nick's comment was really meant to be directed at
you. He is probably just tired of getting so many emails from R-help.
Nick, to stop getting emails if you no longer want them, try following
the link at the bottom of every single email you have received from
Hi Josh,
Thanks for pointing this out. It hadn't occurred to me that someone might post
something like this to indicate they would like to receive fewer or no
messages.
Paul
--- On Mon, 5/21/12, Joshua Wiley jwiley.ps...@gmail.com wrote:
From: Joshua Wiley jwiley.ps...@gmail.com
Subject:
Hi Joshua,
Many thanks for your quick reply.
You can do it by passing a matrix for indexing instead of two vectors.
Here's an example:
tmpmat - matrix(NA, nrow = 10, ncol = 10,
dimnames = list(letters[1:10], LETTERS[1:10]))
tmpmat[cbind(c(d, e, f), c(D, E, F))] - 100
tmpmat
The
Hi Joshua,
Thanks you for your answer. I have to leave my work now but I'll try your
proposition tomorrow and I'll tell you if it works for me.
Good evening
--
View this message in context:
http://r.789695.n4.nabble.com/select-part-of-files-from-a-list-files-tp4630769p4630777.html
Sent from the
On Mon, May 21, 2012 at 9:27 AM, Øystein Godøy o.go...@met.no wrote:
Hi Joshua,
Many thanks for your quick reply.
You can do it by passing a matrix for indexing instead of two vectors.
Here's an example:
tmpmat - matrix(NA, nrow = 10, ncol = 10,
dimnames = list(letters[1:10],
Joshua Wiley wrote on 2012-05-21
...
This looks interesting and is what I want, but I am not fully
understanding the output I receive. The input array has 100 elements
while the resulting vector after replacement is 106 elements long. I
have tried to understand the manual on this, but it
Here is a slightly different approach that takes advantage of recycling:
# Make 7 data frames
for (i in 1:7) {
assign(paste(TOWER, i, sep=), data.frame(A=letters[1:4],
X=rnorm(4)))
}
# Add Tower column taking advantage of recyling
tnames - paste(TOWER, 1:7, sep=)
for (i in 1:7) {
The Mac does not have an application called notepad, so you can't save a
text in [your] notepad. However, the Mac has TextEdit, and if you save
any file with the .txt suffix it will open in TextEdit when you
double-click on it in a Finder window (outside R, that is).
You could even, from inside
I should have added
TOWER$Tower - factor(TOWER$Tower)
To the end to convert Tower from an integer to a factor.
--
David L Carlson
Associate Professor of Anthropology
Texas AM University
College Station, TX 77843-4352
-Original Message-
Yet again:Thank you Peter and Duncan. I appreciate your comments and insights.
I agree wholeheartedly with Peter's comments below about understanding
what a parsed expression is in R. In R -- and in functional
programming in general, I believe -- computing on the language is
extremely handy, even
Hi all,
I'm going to be teaching an R development master classes in NYC June
21-12 and in the Bay Area June 28-29. The basic idea of the class is
to help you write better code, focused on the mantra of do not repeat
yourself. In day one you will learn powerful new tools of
abstraction, allowing
On Fri, May 18, 2012 at 09:20:59PM -0400, Axel Urbiz wrote:
[...]
Petr: I kind of see your line of thought, but still cannot see how it works
on a specific example like this one.
I did not have email in the last few days.
The previous suggestion from
Hello,
I try to find a function for M-estimation in multivariate linear regression
model (function that can estimate betas in my model: y=x * beta + e, where
y is a matrix). I´ve searched R-site for a long time, but I am hopeless.
I would like to ask, if there is any function for M-estimation
Hi Spencer,
it looks like you either don't have Java installed or the architectures of
R and your JVM don't match, i.e. your running 64-bit R (as noted from your
sessionInfo() output) but are using a 32-bit JVM. In any case installing
64-bit Java should resolve your issue.
Hope that helps.
Dear R committee:
I am Renzhi, Ph.D student in computer science in the University of
Missouri. I have one question for you. I try to install R in the linux server,
but I don't have the root permission, is there any way to install the R locally?
Thank you very much for helping me.
Hello Joshua,
Many thanks for your help, especially from a fellow Bruin (I went there as
an undergrad!).
I understand that there is another forum for mixed models. If my problem
can't be solved within this thread, I'll have to go there. I do understand
some theory about mixed models, but
Hi everyone,
I have been using adaptIntegrate from the cubature package for a
multidimensional integral that has infinite variance (and so not
appropriate for Monte Carlo techniques). Most of the time it works but
sometimes (though not always) when I slightly increase the accuracy I want,
or
I'm sorry everyone for the inconvenience of spamming the R-help...
Here's the complete post:
Hi everyone,
Since it's quite a while that I used the reshape package, I now feel kind
of rusty.
I have a data.frame like this:
id Sample.Name Marker Allele.1
http://r.789695.n4.nabble.com/file/n4630788/GOF_CGIK.R GOF_CGIK.R
http://r.789695.n4.nabble.com/file/n4630788/RESIDSNEWr.csv RESIDSNEWr.csv
In order to save place, I attach the data and the R code, for which I have 2
questions.
1/ I cannot convert successfully the data frames with names first
Familiarize yourself with the CRAN task views and check out the Robust
task view.
Also ?rlm in MASS.
-- Bert
On Mon, May 21, 2012 at 11:23 AM, Monika Steinhubelova
monika.steinhubel...@gmail.com wrote:
Hello,
I try to find a function for M-estimation in multivariate linear regression
model
Hy,
I don't think there is a committee here but I'll try to help you
nevertheless:
If you don't have root permissions you can still install R in several ways:
1. Build it by yourself. If you have a compiler installed, you can build
R from source. See [1] for a manual.
2. Install a virtual
It should certainly be possible to install to some directory where you
have write permissions, but the exact specifics will depend on which
Linux you're using.
There are R-SIG-Debian and R-SIG-Fedora lists which can give OS
specific advice, but it might be easier just to talk to your IT folks.
Hello folks,
I've been on a journey trying to figure out how to manage documents that
are amenable to sharing and editing, but that contain dynamic content
generated by R. I've come to the following solution: I use Sweave to
generate labeled png pdf figures, and I Insert Link those figures
as
Take a look at addtable2plot in plotrix or grid.table / tableGrob in
gridExtras.
Michael
On Mon, May 21, 2012 at 4:29 PM, Alexander Shenkin ashen...@ufl.edu wrote:
Hello folks,
I've been on a journey trying to figure out how to manage documents that
are amenable to sharing and editing, but
Dear friends - We have 25 rats, 14 of these subjected to partial removal
of kidney tissue, 11 to sham operation, and then followed for 6 weeks.
So far we have data on 26 urine metabolites measured by NMR 7 times
during the observation. I have smoothed the measurements by b.splines in
fda
Please do not answer directly to the people but answer to the list
instead so everybody sees your mail.
You can change the target directory using the --prefix= command line
parameter of the ./configure script.
On 21/05/12 22:37, Cao, Renzhi (MU-Student) wrote:
Dear Dominik:
Thank you
I was wondering if someone could point in the direction of a package
that could generate not heatmaps, but something like a unidimensional
heat map.
I might be mistaken, but it seems like image and heatmap are an
overkill for such a simple task.
For example, if I have a data frame:
Thanks Michael - I think grid.table does the trick.
On 5/21/2012 3:33 PM, R. Michael Weylandt wrote:
Take a look at addtable2plot in plotrix or grid.table / tableGrob in
gridExtras.
Michael
On Mon, May 21, 2012 at 4:29 PM, Alexander Shenkin ashen...@ufl.edu wrote:
Hello folks,
I've been
Inline:
On 2012-05-21 11:17, i_like_macs wrote:
Hello Joshua,
Many thanks for your help, especially from a fellow Bruin (I went there as
an undergrad!).
I understand that there is another forum for mixed models. If my problem
can't be solved within this thread, I'll have to go there. I do
Consider the following:
x-list(c(1,2,3),c(4,5,6))
x[1]
[[1]]
[1] 1 2 3
x[2]
[[1]]
[1] 4 5 6
So far that all seems reasonable. But now there's a problem. I'm used to
python, where I would say x[2][1] and get the value 4. But I can't figure out
how to do that in R.
x[2][1]
[[1]]
[1] 4 5
It's a little funny, you actually need
x[[2]][1]
What's going on is the following:
lists can contain anything else in R, including more lists so
subsetting them takes a hair more work. x[2] returns the sublist of x
containing the second list element -- this is, however, not the same
as x[[2]]
Hi,
I'm new to R, so apologies in advance for the triviality of this question,
but I was wondering if anyone could tell me why this function doesn't return
the expected output, i.e. a matrix containing two columns from a large data
frame called 'finalTable'? Oddly, the statement between the curly
Dear R Users,
I am facing a problem analyzing an incomplete block design with two replicates.
As you can see in the attached .xls file, the factor2 (6 levels) nested within
factor1(two levels) nested within replicates all were chosen as random effects
in the statistical model (see below). Note
Hello,
You need to tell read.table that the table has headers.
# needed 'header=TRUE'
first - read.table(RESIDSNEWr.csv, sep=;, quote=\,
header=TRUE)[c(1)]
second - read.table(RESIDSNEWr.csv, sep=;, quote=\,
header=TRUE)[c(2)]
# see what they look like
str(first)
str(second)
is.numeric(first)
Hello,
There's nothing wrong with having 'thisCol' and 'thatCol' already defined or
not.
The problem is that your function does NOT return a value. Get rid of the
assignment and it will work.
CompFunct - function(thisCol, thatCol) {cbind(finalTable[, thisCol],
finalTable[, thatCol])}
I would
There is also the recursive extraction with [[:
x[[c(2, 1)]]
[1] 4
From ?Extract
‘[[’ can be applied recursively to lists, so that if the single
index ‘i’ is a vector of length ‘p’, ‘alist[[i]]’ is equivalent to
‘alist[[i1]]...[[ip]]’ providing all but the final indexing
results
On May 21, 2012, at 5:13 PM, acnunn wrote:
Hi,
I'm new to R, so apologies in advance for the triviality of this
question,
but I was wondering if anyone could tell me why this function
doesn't return
the expected output, i.e. a matrix containing two columns from a
large data
frame called
Is there a way to tell glm() that rows in the data represent a certain number
of observations other than one? Perhaps even fractional values?
Using the weights argument has no effect on the standard errors. Compare the
following; is there a way to get the first and last models to produce the
On May 21, 2012, at 10:58 PM, Steve Taylor wrote:
Is there a way to tell glm() that rows in the data represent a
certain number of observations other than one? Perhaps even
fractional values?
Using the weights argument has no effect on the standard errors.
Compare the following; is
Hi David,
Try
x[[2]][1]
[1] 4
A.K.
- Original Message -
From: David Perlman dperl...@wisc.edu
To: r-help@r-project.org
Cc:
Sent: Monday, May 21, 2012 8:07 PM
Subject: [R] List indexing question
Consider the following:
x-list(c(1,2,3),c(4,5,6))
x[1]
[[1]]
[1] 1 2 3
x[2]
[[1]]
1 - 100 of 106 matches
Mail list logo