Hi,
You have to transform it to a Data Frame.
Try:
files <- stack(rasterlist)
filesdf<-as.data.frame(files)
pca <- princomp(formula = ~., data = filesdf, cor = TRUE,
na.action=na.exclude)
hope it helps
Gustavo
Em quinta-feira, 30 de outubro de 2014 14h38min56s UTC-2, Jo
Dear, I would like to post the following question to the r-help on Nabble
(thanks in advance for the attention, Gustavo Vieira):
Hi there.
I have a data set on hands with 5,220 cases and I'd like to automate some
procedures (but I have almost no programming knowledge). The data has
prices are growing
up nevertheless i would expect that at some point these ones decrease .
So i would expect that the prediction for the return would be different. but i
certanly dont know which is.
I would apreciate if you could help with th
?make.names perhaps.
On Fri, Sep 2, 2011 at 4:13 PM, Durant, James T. (ATSDR/DTEM/PRMSB)
wrote:
> Greetings -
>
> I am working on some data that contain chemical names with air
> concentrations, and I am creating a data frame with date/time and each
> chemical having its own column. However, th
sapply(a, `[`, 1)
On Wed, Aug 24, 2011 at 12:18 AM, Chee Chen wrote:
> Dear All,
> I would like to know, beside writing a function and then apply it to a list,
> or using a for loop, whether there is a one-line command to do the following.
> Suppose we have a list, each of whose components are n
To open a website on the default browser:
system("open http://www.google.com";)
Gustavo.
On Tue, May 24, 2011 at 7:56 PM, jbrezmes wrote:
> I would like to be able to call external programs such as Java scripts (*.jar
> files) or bring up the browser to a given direction. Can t
This might be a bit quicker with larger vectors:
f <- function(x, y) sum(x > y)
vf <- Vectorize(f, "x")
vf(x, y)
On Thu, Apr 14, 2011 at 5:37 PM, Marc Schwartz wrote:
> On Apr 14, 2011, at 2:34 PM, Kevin Ummel wrote:
>
>> Take vector x and a subset y:
>>
>> x=1:10
>>
>> y=c(4,5,7,9)
>>
>> For ea
Search for lavaan, sem, and OpenMx.
On Mon, Mar 21, 2011 at 12:34 AM, rvohen wrote:
> thank you ! I will try it !
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/confirmatory-factor-analysis-program-in-R-tp3386133p3392279.html
> Sent from the R help mailing list archive a
, sample.nobs=161, sample.cov=myCov, int.ov.free =
T, int.lv.free = F, auto.fix.first = T, auto.fix.single = T,
auto.resid.var = T, auto.cov.lv.x = T, auto.cov.y = T,
mimic = "EQS")
summary(fit)
Cheers,
Gustavo.
On Thu, Mar 17, 2011 at 9:50 AM, Andrew Miles wrote:
> I have been trying
?URLencode
On Thu, Nov 25, 2010 at 3:53 PM, Tal Galili wrote:
> Hello all,
>
> I would like some R function that can translate a string to a "URL encoding"
> (see here: http://www.w3schools.com/tags/ref_urlencode.asp)
>
> Is it implemented? (I wasn't able to find any reference to it)
>
> Thanks,
Perhaps something like this:
a$d <- ifelse(duplicated(a$a), 0, 1)
On Tue, Nov 23, 2010 at 1:33 PM, Joel wrote:
>
> Is there any similar function in R to the first. in SAS?
>
> What it dose is:
>
> Lets say we have this table:
>
> a b c
> 1 1 5
> 1 0 2
> 2 0 2
> 2 0 NA
> 2 9 2
> 3 1
putting the code from
the for loop into a function and passing it to combn but, as expected, it didn't
help much. Any pointers to functions that I should be looking into will be
greatly appreciated.
Thank you very much,
Gustavo.
__
R-help@r-project.
]] <- seq.to.match
}
}
return(where)
}
a<-c(3,4,3,0,4,5,6,9,3,4)
b<-c(0,4,5)
c<-c(5,4,0)
d<-c(3,4)
bleh(a, b)
bleh(a, c)
bleh(a, d)
Cheers,
Gustavo.
On Tue, Sep 21, 2010 at 11:31 AM, Lorenzo Isella
wrote:
> Dear All,
> Consider a simple example
>
> a<-c(1,4,3,
I've
specified is 21, as in the published model.
Any light you could shed on this would be greatly appreciated. The
code to reproduce all steps is presented below.
Thank you very much,
Gustavo.
##
library(sem)
grace <- matrix(ncol = 10, nrow = 10)
variables <- c("light
. Gustavo
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Hello rafamoral,
Try this:
ifelse(is.na(x),0,x)
On Wed, Jan 14, 2009 at 8:32 PM, rafamoral wrote:
>
> I have a dataset which contains some missing values, and I need to replace
> them with zeros. I tried using the following:
>
> x <- matrix(data=rep(c(1,2,3,NA),6), ncol=6, nrow=6)
>
> y <- matr
Sorry for the double post, but this is probably faster:
x[, colSums(x) != 0]
On Wed, Jan 14, 2009 at 8:22 PM, Gustavo Carvalho
wrote:
> You can also try this:
>
> x[,-(which(colSums(x) == 0))]
>
> Cheers,
>
> Gustavo.
>
> On Wed, Jan 14, 2009 at 8:01 PM, Anthony Dic
You can also try this:
x[,-(which(colSums(x) == 0))]
Cheers,
Gustavo.
On Wed, Jan 14, 2009 at 8:01 PM, Anthony Dick wrote:
> Hello-
>
> I would like to remove the columns of a matrix that contain all zeros. For
> example, from
> x<-matrix(c(1,5,3,2,1,4,0,0,0), ncol=3,nrow=3
Hello,
Something like this should work:
table(test$V1[!test$V2 %in% c("NM","QC")])
Cheers,
Gustavo.
On Wed, Dec 24, 2008 at 3:06 AM, Gundala Viswanath wrote:
> Dear all,
>
> I have the following data frame:
>
> V1 V2
> aaachr1
> aaach
Hello,
You can probably extract a .tar.gz using 7zip on Windows.
Regards,
Gustavo.
On Mon, Dec 15, 2008 at 8:07 PM, Farrel Buchinsky wrote:
> I saw a thread from September 24 in which Duncan Temple Lang told us:
> - The package currently has no Rd files, but there is a brief "use
Take a look at ?any.
On Thu, Dec 11, 2008 at 3:11 PM, David B. Thompson, Ph.D., P.E.,
D.WRE, CFM <[EMAIL PROTECTED]> wrote:
> OK, this should be trivial but I'm not finding it. I want to compress the
> test,
>
> if (i==7 | i==10 | i==30 | i==50) {}
>
> into something like
>
> if (i in c(7,10,30,50
Hello,
An alternative to round():
isTRUE(all.equal((2.3-1.3),1))
Regards,
Gustavo.
On Wed, Dec 10, 2008 at 3:12 PM, Stephan Kolassa <[EMAIL PROTECTED]> wrote:
> Hi Emma,
>
> unfortunately, rounding variables before taking the difference will not
> solve your problem, be
Hello,
You assigned 53 to c, not cc. Also, take a look at this:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
On Tue, Dec 9, 2008 at 9:36 PM, Renny Li <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to compare two values using "==" operand, p
Hello,
Anyone knows how can I do this in a cleaner way?
mynumber = 1001
as.numeric(unlist(strsplit(as.character(mynumber),"")))
[1] 1 0 0 1
Thanks in advance,
Gustavo
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listi
Thanks a lot!
On Fri, Dec 5, 2008 at 5:54 PM, Gabor Grothendieck
<[EMAIL PROTECTED]> wrote:
> Try this:
>
> dir()[!file.info(dir())$isdir]
>
>
> On Fri, Dec 5, 2008 at 2:30 PM, Gustavo Carvalho
> <[EMAIL PROTECTED]> wrote:
>> Is there a way to list only
Is there a way to list only the files in a given directory without
passing pattern="..." to list.files()?
On Fri, Dec 5, 2008 at 5:10 PM, Kyle. <[EMAIL PROTECTED]> wrote:
> Thanks, Barry. I'll use that in the future.
>
>
> ---Kyle.
>
> On Fri, Dec 5, 2008 at 11:01 AM, Barry Rowlingson <
> [EMAIL P
(0,0,0)}
Regards,
Gustavo
On Thu, Nov 27, 2008 at 3:02 PM, Salas, Andria Kay <[EMAIL PROTECTED]> wrote:
> I really need help with an if then statement I am having trouble with. A
> brief explanation of what I am trying to do: I have a p matrix of all
> permutations of a vector of
Hello,
Take a look at this course:
http://www.r4all.group.shef.ac.uk/index.html
I don't think they teach tools for working with the genome, but it
might be helpful anyway.
On Thu, Nov 20, 2008 at 11:16 AM, Peter Saffrey <[EMAIL PROTECTED]> wrote:
> (apologies if this is the wrong list)
>
> I'm
Take a look at vif in the package car.
On Wed, Nov 19, 2008 at 10:00 PM, Crystal McRae <[EMAIL PROTECTED]> wrote:
>
>
> I am running a logistic regression model with a random effect using lmer. I
> am uncertain how to check for collinearity between my parameters. I have
> already run cor() an
xdg utils is probably not being recognized because you compiled it
from source. The R rpm is looking for the xdg utils package. I'm not
familiar with yum, but I think you can try to force the installation:
rpm -ivh --force (or something like that) /data/R-2.8.0-1.rh4.x86_64.rpm
On Tue, Nov 18, 20
Hello all,
I have a vector with 1000 values and I would like to generate other
correlated vector, but with different correlation coefficient (for example,
r = 0.7).
Any ideas how can I do this?
Regards,
Gustavo
Fedora 7 is a linux distribution
On 9/11/07, Paul Smith <[EMAIL PROTECTED]> wrote:
> On 9/11/07, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > I wanted to ask what will be a good editor to write R scripts in Fedora 7.
>
> Tell us first what is your operating system.
>
> Paul
>
> _
32 matches
Mail list logo