I have no magic answer for you, just some suggestions until you can clarify
your problem.
Your description of loading one column in at a time is a bit odd... It is much
more typical to use one of the read.table variants.
Don't use cbind to make data frames. If you have any non-numeric columns t
Hello All,
I have a data frame called windSFO of four columns, wind speed, wind
direction, station number, and date (mmdd). I downloaded the gz
data from a site online and then unzipped it using readLines. I then
concatenated these four columns from the unzipped data into a
dataframe using cb
On Mon, 23 Feb 2015, Ramiro Barrantes wrote:
Thank you for pointing this out. I had no idea about the distinction
but there are some good references on the matter
(http://www.r-bloggers.com/packages-v-libraries-in-r/). I am pasting
the corrected version below, any suggestions appreciated:
David and Scott,
principal will also take a covariance matrix (set the cover option to TRUE)
library(psych)
C <- cov(iris[-5])
pc4 <- principal(C,4,covar=TRUE,rotate="none”)
However, in the case of no rotation or orthogonal rotations, the structure
matrix and the pattern matrix are identical.
Take a look at im1 and im2. You will find that they are just the
quoted names. You have imported nothing.
Have you made any effort to read R's or the GeoTiff's tutorials? --
you appear to not have a clue about how either works. Also see
?scale, which will do what you appear to want much much fast
Hi R user,
Would you give me some hints on to standardize the raster image (GeoTiff). I
used the following code but did not work. would you give me some hints on it?
#--
#code
# center with 'apply()'
center_apply <- function(x) {
apply(x, 2, function(y) y - me
Thanks David. What do you do when the input is a covariance matrix rather
than a dataset?
--
View this message in context:
http://r.789695.n4.nabble.com/Extracting-Factor-Pattern-Matrix-Similar-to-Proc-Factor-tp4703704p4703719.html
Sent from the R help mailing list archive at Nabble.com.
_
Hello,
I am fairly new to R and coming from SAS IML. I am rewriting one of my MC
simulations in R and am stuck on extracting a factor pattern matrix as would
be done in IML using Proc Factor.
I have found the princomp() command and read through the manual but can't
seem to figure out how to sav
The pattern matrix is easy to compute from the results of princomp(). First we
need a reproducible example so we'll use the iris data set (use ?iris for
details) that comes with R.
> data(iris)
> iris.pc <- princomp(iris[,-5], cor=TRUE)
> print(iris.pc$loadings, cutoff=0)
Loadings:
Hi,
On Monday, February 23, 2015, Alexandra Catena wrote:
> The command, data[data ==] <- NA, worked! Thank you!
>
> But just in case you wanted to know, I'm downloading the data and
> unzipping it through readLines. I then concatenate two columns ( wind
> speed and direction) from the unz
Something like
tmp <- merge(df1, df2, by = "row.names", all.x = TRUE)
merge(tmp, df3, by.x = "Row.names", by.y = "row.names", all.x = TRUE)
perhaps?
On Mon, Feb 23, 2015 at 4:25 PM, Jon BR wrote:
> Hi R-help,
> Although I know that variations of this question are frequently asked,
> I sea
Function principal() in psych takes a correlation matrix so use cov2cor() to
convert:
library(psych)
iris.pca <- principal(cov2cor(cov(iris[,-5])), nfactors=4, rotate="none")
print(iris.pca$Structure, cutoff=0)
David
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] O
Hi R-help,
Although I know that variations of this question are frequently asked,
I searched and haven't found an answer for this specific variant, and
wonder if any of you know this off the top of your head:
df1 <- data.frame(a = 1:5,
row.names = letters[1:5]) # letters a to
I am trying to install the swirl library via devtools with the following results
> devtools::install_github(c("swirldev/swirl", "swirldev/swirlify"))
Installing github repo swirl/master from swirldev
Downloading master.zip from https://github.com/swirldev/swirl/archive/master.zip
Installing packag
Thank you for pointing this out. I had no idea about the distinction but there
are some good references on the matter
(http://www.r-bloggers.com/packages-v-libraries-in-r/). I am pasting the
corrected version below, any suggestions appreciated:
I have a package that I created that defines a p
On 24/02/15 09:35, Ramiro Barrantes wrote:
Hello,
I have a library that I created .
No you ***DO NOT***. You have a ***PACKAGE***. If you cannot even get
your terminology straight, what hope is there for you?
cheers,
Rolf Turner
--
Rolf Turner
Technical Editor ANZJS
Department of
Hello,
I have a library that I created that defines a parent class, assayObject.
I created other classes that inherit from it, say assayObjectDemo. Each one of
those classes I wanted to make in its own directory separate from where the
assayObject is defined (there are reasons for that).
But
Just for the record, you do not need cbind():
wind <- data.frame(windSpeed,windDirec)
Using cbind() does not create a problem as long as the columns are all numeric,
but if your data frame contains a mixture of numeric, factor, and character
columns, cbind() will mess things up.
--
I'm using the dplyr package to perform one-row-at-a-time processing of a data
frame:
> rnd6 = function() sample(1:300, 6)
> frm = data.frame(AA=rnd6(), BB=rnd6(), CC=rnd6())
> frm
AA BB CC
1 123 50 45
2 12 30 231
3 127 147 100
4 133 32 129
5 66 235 71
6 38 264 261
The interface is
On Feb 23, 2015, at 4:03 AM, Tim Richter-Heitmann wrote:
> Thank you very much for the line. It was doing the split as suggested.
> However, i want to release all the dataframes to the environment (later on,
> for each dataframe, some dozen lines of code will be carried out, and i dont
> know h
On 23 Feb 2015, at 15:06 , Alain D. wrote:
> Dear R-List
>
> I have a date column formatted dd.mm. separated by points that was
> converted
> into a number using as.integer(date). Now I wish to convert the number back
> into
> the original date. Something like:
>
> date<-as.factor(c("07.
Dear R-List
I have a date column formatted dd.mm. separated by points that was converted
into a number using as.integer(date). Now I wish to convert the number back into
the original date. Something like:
date<-as.factor(c("07.12.2010","29.04.2013"))
dd<-as.integer(date)
as.Date(dd, origi
Hello,
I use asRules from the Rattle package to make rules of a rpart decision tree:
asRules(rpart1). It gives a rule such as (don't mind the data, it's merely
testdata):
Rule number: 18 [Product=153 cover=3 (1%) prob=0.00]
TotalChildren>=4.5
Education=Bachelors,Partial College,Parti
Did you try "dplyr" package?
Sergio
Il 23/feb/2015 13:05 "Tim Richter-Heitmann" ha
scritto:
> Thank you very much for the line. It was doing the split as suggested.
> However, i want to release all the dataframes to the environment (later
> on, for each dataframe, some dozen lines of code will be
Thank you very much for the line. It was doing the split as suggested.
However, i want to release all the dataframes to the environment (later
on, for each dataframe, some dozen lines of code will be carried out,
and i dont know how to do it w lapply or for-looping, so i do it
separately):
li
Dear Antonello,
How about this? Obviously, you can change the background colours for the
confidence levels (deprespal) and for the regression lines, etc.
Surely, many in the list can improve on my rough and ready solution.
deprespal=c("#CC","#99")
p2 <- ggplot(data = df, aes(x =Levels_De
Since some years I have the following domains which I don't need any longer
(and in fact never used despite some plans)
- developr.org
- editr.org
- helpr.org
It makes no sense to hoard domains and I plan to give them away for a 'good
cause'. I'd like to have a small fee for the costs but t
Thanks to all who responded.
I like Sarah's solution best, although it did provide only a clue. It just
needed a little of tweak to finish with suitable solution. For the record I put
here this tweak (it is not fully reproducible but I hope it is understandable
and can help others too).
# make
28 matches
Mail list logo