Displaying 20 results from an estimated 27 matches for "urbanpop".
2012 Aug 21
1
make check fails two tests on RHEL 6 build
...x.Rout.save? ...
6325c6325
< Grand Mean: 291.5937
---
> Grand Mean: 291.5938
12674c12674
< Murder -0.536 0.418 0.341 0.649
---
> Murder -0.536 0.418 -0.341 0.649
12675c12675
< Assault -0.583 0.188 0.268 -0.743
---
> Assault -0.583 0.188 -0.268 -0.743
12676c12676
< UrbanPop -0.278 -0.873 0.378 0.134
---
> UrbanPop -0.278 -0.873 -0.378 0.134
12677c12677
< Rape -0.543 -0.167 -0.818
---
> Rape -0.543 -0.167 0.818
14358c14358
< Grand Mean: 291.5937
---
> Grand Mean: 291.5938
15446c15446
< Murder -0.54 0.42 0.34 0.65
---
> Murder...
2006 Dec 05
1
problem with lists...
Hi guys,
I am new to R, so sorry if my problem seems trivial.
Sometimes I encounter some lists, which I cannot index their components
with [ . ]
For instance the prcomp() function returns a 'prcomp' object whose
components are some 'lists'. the second component is a list that
comtains the following:
> mylist <- churn[2]
> class(mylist)
[1] "list"
>
2008 Jan 13
1
What is the 'scale' in princomp() function?
...ckages to do Principal
Components Analysis, I am not very clear what is the "scale".
And the scores are different from "PROC PRINCOMP" procedure from SAS.
Using the example data from this package:
restpc <- princomp(USArrests, cor = TRUE)
> restpc$scale
Murder Assault UrbanPop Rape
4.311735 82.500075 14.329285 9.272248
> sd(USArrests)
Murder Assault UrbanPop Rape
4.355510 83.337661 14.474763 9.366385
Why 'restpc$scale' is different from 'sd(USArrests)'?
felix
2008 Mar 06
0
Help with colinearity problem in multiple linear regression
...sm
technique to work.
Does anyone have any pointers how this might be accomplished?
Thanks,
Caleb
-------
# Bigger example
# Introduce artificial colinearity to test case
P = cbind(USArrests[2]*2, USArrests)
names(P) = c("Introduced", "Murder", "Assault", "UrbanPop", "Rape")
# Split the data into partitions to be calculated separately
# In the real case the full data would have been too large and
# each instance would have received just a chunk of data.
P1 = P[1:25,]
P2 = P[26:50]
# Partition 1 - calculated on host 1
P1_X = as.matrix(cbind(1,...
2008 Jul 15
3
playwith package crashes on Mac
...3 cairoDevice_2.8 gWidgetsRGtk2_0.0-35
RGtk2_2.12.5-3 gWidgets_0.0-28
[6] lattice_0.17-10
loaded via a namespace (and not attached):
[1] gridBase_0.4-3 tools_2.7.1
Making links in per-session dir ... done
> rownames(USArrests) <- state.name
> playwith(plot(Assault ~ UrbanPop, data=USArrests,
+ xlab="Percent urban population, 1973",
+ ylab="Assault arrests (per 100,000), 1973"))
*** caught bus error ***
address 0xa8, cause 'non-existent physical address'
Traceback:
1: .Call(L_newpage)
2: grid.newpage()
3: playNewPlot(playState)...
2013 Dec 02
1
Arithmetic Error while compiling R with the Intel compilers
...st of
the tests passed successfully but while checking a 'stats' package I saw
many lines were printed which did not match the desired output.
e.g.
There were two types of mismatch
Case 1)
6300c6300
< Grand Mean: 291.5937
---
> Grand Mean: 291.5938
Case 2)
12699c12699
< UrbanPop *0.278* -0.873 -0.378 0.134
---
> UrbanPop *-0.278* -0.873 -0.378 0.134
Case 1 was having slight difference in the values and
assumed due to the floating point error, but Case 2 is having values
with difference signs. Is such behaviour is normal or there is any issue
with...
2007 Jun 27
1
Condensed PCA Results
...mmand.
When I carry out PCA on R, typically I get:
Standard deviations:
[1] 83.732400 14.212402 6.489426 2.4827900
Rotation:
PC1 PC2 PC3 PC4
Murder 0.04170432 -0.04482166 0.07989066 -0.99492173
Assault 0.99522128 -0.05876003 -0.06756974 0.03893830
UrbanPop 0.04633575 0.97685748 -0.20054629 -0.05816914
Rape 0.07515550 0.20071807 0.97408059 0.07232502
I want to get only:
PC1 PC2 PC3 PC4
Murder 0.04170432 -0.04482166 0.07989066 -0.99492173
Assault 0.99522128 -0.05876003 -0.06756974 0.03893830
Urban...
2011 Sep 09
2
prcomp: results with reversed sign in output?
Dear All,
when I'm running a PCA with
prcomp(USArrests, scale = TRUE)
I get the right principal components, but with the wrong sign infront
Rotation:
PC1 PC2 PC3 PC4
Murder 0.5358995 -0.4181809 0.3412327 0.64922780
Assault 0.5831836 -0.1879856 0.2681484 -0.74340748
UrbanPop 0.2781909 0.8728062 0.3780158 0.13387773
Rape 0.5434321 0.1673186 -0.8177779 0.08902432
instead of
PC1 PC2 PC3 PC4
Murder -0.5358995 0.4181809 -0.3412327 0.64922780
Assault -0.5831836 0.1879856 -0.2681484 -0.74340748
UrbanPop -0.2781909 -0.8728062 -0.3780158 0.13387773
Rape -0.5434321 -0.1673186...
2014 Oct 22
1
"make check" fails on lapack.R and stats-Ex.R
Hi folks,
I suspect this is a request for a sanity check than a bug report:
I've been successfully compiling an optimised version of R for several years using the Intel compiler and MKL. I've just test-run the new Intel 15.0 compiler suite, and I'm seeing a few numeric failures that I don't see using the same build method with Intel 13.0. I've attached the output of
2017 Aug 09
1
arithmetic with zero-column data.frames
...ugly inconsistency:
> str(USArrests ^ 0.5)
num [1:50, 1:4] 3.63 3.16 2.85 2.97 3 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:50] "Alabama" "Alaska" "Arizona" "Arkansas" ...
..$ : chr [1:4] "Murder" "Assault" "UrbanPop" "Rape"
> str(sqrt(USArrests))
'data.frame': 50 obs. of 4 variables:
$ Murder : num 3.63 3.16 2.85 2.97 3 ...
$ Assault : num 15.4 16.2 17.1 13.8 16.6 ...
$ UrbanPop: num 7.62 6.93 8.94 7.07 9.54 ...
$ Rape : num 4.6 6.67 5.57 4.42 6.37 ...
>
I propose to...
2004 Nov 25
3
Searching for a string in RSQLite
...ests)
> dbWriteTable(con, "USArrests", USArrests, overwrite = T)
[1] TRUE
> state <- "Wyoming"
# this works fine:
> dbGetQuery(con, paste("SELECT * from USArrests where row_names='",state,"'",sep=""))
row_names Murder Assault UrbanPop Rape
1 Wyoming 6.8 161 60 15.6
# Buf if the search string contains characters that SQL interprets, I
# get an error
> state <- "messy: ' ("
> dbGetQuery(con, paste("SELECT * from USArrests where row_names='",state,"'",sep="&q...
2012 Oct 26
4
R 2.15.2 is released
The build system has rolled up R-2.15.2.tar.gz (codename "Trick or Treat") at 9:00 this morning. This is a maintenance release; see the list below for details.
You can get it from
http://cran.r-project.org/src/base/R-2/R-2.15.2.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will appear in due course.
For the R Core Team
Peter
2012 Oct 26
4
R 2.15.2 is released
The build system has rolled up R-2.15.2.tar.gz (codename "Trick or Treat") at 9:00 this morning. This is a maintenance release; see the list below for details.
You can get it from
http://cran.r-project.org/src/base/R-2/R-2.15.2.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will appear in due course.
For the R Core Team
Peter
2012 Oct 26
4
R 2.15.2 is released
The build system has rolled up R-2.15.2.tar.gz (codename "Trick or Treat") at 9:00 this morning. This is a maintenance release; see the list below for details.
You can get it from
http://cran.r-project.org/src/base/R-2/R-2.15.2.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will appear in due course.
For the R Core Team
Peter
2004 Nov 03
2
Princomp(), prcomp() and loadings()
...-----
> pca.1 <- prcomp(USArrests)
> pca.1
Standard deviations:
[1] 83.732400 14.212402 6.489426 2.482790
Rotation:
PC1 PC2 PC3 PC4
Murder 0.04170432 -0.04482166 0.07989066 -0.99492173
Assault 0.99522128 -0.05876003 -0.06756974 0.03893830
UrbanPop 0.04633575 0.97685748 -0.20054629 -0.05816914
Rape 0.07515550 0.20071807 0.97408059 0.07232502
> pca.2 <- princomp(USArrests)
> pca.2
Call:
princomp(x = USArrests)
Standard deviations:
Comp.1 Comp.2 Comp.3 Comp.4
82.890847 14.069560 6.424204 2.457837
4 variables...
2009 Apr 30
1
Creating datasets in packages
...I get:
> data(BowRiver)
> BowRiver
Error: object "BowRiver" not found. However, I can access the dataset
from
> data
Example R datasets (such as USArrests) are loaded and can be accessed by
the dataset name:
> data(USArrests)
> USArrests
Murder Assault UrbanPop Rape
Alabama 13.2 236 58 21.2
Alaska 10.0 263 48 44.5
Arizona 8.1 294 80 31.0
Arkansas 8.8 190 50 19.5
California 9.0 276 91 40.6
...
What am I doing wrong?
Thanks in advance,
Dave
[[alternative HT...
2003 Apr 02
1
RODBC sqlSave problem.
...basically the example part of the help file for the
sqlSave function:
> library(RODBC)
> odbcConnect("theodor") -> channel
> data(USArrests)
> sqlSave(channel, USArrests, verbose = TRUE)
Query: CREATE TABLE USArrests (rownames varchar(255) ,Murder float8
,Assault int4 ,UrbanPop int4 ,Rape float8 )
Error in sqlSave(channel, USArrests, verbose = TRUE) :
[RODBC] ERROR: Could not SQLExecute
When issuing this comamnd, a table is created in the specified database,
with fields corresponding to names(USArrests), except in lower case, but
the fiels contain no data....
2005 Sep 16
1
About princomp
...<http://pc.cr> <- princomp(USArrests, cor = TRUE))
Erreur dans cov.wt(z) : 'x' must contain finite values only
> loadings(pc.cr <http://pc.cr>) ## note that blank entries are small but
not zero
Loadings:
Comp.1 Comp.2 Comp.3
Murder 0.663 0.314 0.679
Assault 0.694 -0.715
UrbanPop 0.279 -0.946 0.165
Comp.1 Comp.2 Comp.3
SS loadings 1.000 1.000 1.000
Proportion Var 0.333 0.333 0.333
Cumulative Var 0.333 0.667 1.000
> plot(pc.cr <http://pc.cr>) # shows a screeplot.
> biplot(pc.cr <http://pc.cr>)
Erreur dans plot.window(xlim, ylim, log, asp, ...) :
'xlim...
2010 Nov 25
1
RODBC
...<NA>
USArrests
COLUMN_NAME DATA_TYPE TYPE_NAME COLUMN_SIZE BUFFER_LENGTH
DECIMAL_DIGITS
1 state 12 VARCHAR 255 510
NA
2 Murder 8 DOUBLE 53 8
NA
3 Assault 4 INTEGER 10 4
0
4 UrbanPop 4 INTEGER 10 4
0
5 Rape 8 DOUBLE 53 8
NA
NUM_PREC_RADIX NULLABLE REMARKS COLUMN_DEF SQL_DATA_TYPE
SQL_DATETIME_SUB
1 NA 1 <NA> <NA> 12
NA
2 2 1 <NA...
2000 Jul 20
1
Installing R-1.1.0 (PR#612)
...nes in mva-Ex.Rout are:
> prcomp(USArrests, scale = TRUE)
Standard deviations:
[1] 1.5748783 0.9948694 0.5971291 0.4164494
Rotation:
PC1 PC2 PC3 PC4
Murder -0.5358995 -0.4181809 0.3412327 -0.64922780
Assault -0.5831836 -0.1879856 0.2681484 0.74340748
UrbanPop -0.2781909 0.8728062 0.3780158 -0.13387773
Rape -0.5434321 0.1673186 -0.8177779 -0.08902432
> plot(prcomp(USArrests))
Error in hsv(h, s, v, gamma) : invalid HSV color
Execution halted
Any idea how I could get around this problem? I presume that this
problem has to do with the number of...