Displaying 20 results from an estimated 1000 matches similar to: "using 'apply' to apply princomp to an array of datasets"
2004 Jul 08
2
Getting elements of a matrix by a vector of column indice s
See if the following helps:
> m <- outer(letters[1:5], 1:4, paste, sep="")
> m
[,1] [,2] [,3] [,4]
[1,] "a1" "a2" "a3" "a4"
[2,] "b1" "b2" "b3" "b4"
[3,] "c1" "c2" "c3" "c4"
[4,] "d1" "d2" "d3" "d4"
[5,]
2012 Sep 07
6
splitting character vectors into multiple vectors using strsplit
Hi folks,
Suppose I create the character vector charvec by
> charvec<-c("a1.b1","a2.b2")
> charvec
[1] "a1.b1" "a2.b2"
and then I use strsplit on charvec as follows:
> splitlist<-strsplit(charvec,split=".",fixed=TRUE)
> splitlist
[[1]]
[1] "a1" "b1"
[[2]]
[1] "a2" "b2"
I was wondering
2012 Dec 04
3
odd behavior of browser()
Hi everyone,
I normally include a call to browser() as I'm working out the kinks in my
scripts, and I am always able to step through each line by hitting
"Return", but for some reason, in the scripts I'm working on now, hitting
"Return" seems to cause execution of *all* the lines in my script. I've
restarted R several times in case it was stuck in a bad state for
2018 Nov 02
2
[BUG?] sftp is echoing back prompt and commands in batch mode
Thanks, Iain.
I am willing to hear from other users whether anyone else sees this as a
bug before filing it.
--
Vincenzo Romano
Il giorno ven 2 nov 2018, 20:03 Iain Morgan <imorgan at nas.nasa.gov> ha
scritto:
> If you truly intend this as a bug report, you should file it at
> bugzilla.mindrot.org.
>
> On Fri, Nov 02, 2018 at 12:25:22 +0100, Vincenzo Romano wrote:
> >
2003 Oct 27
2
how to select random rows ?
How can I select random subsets (rows!) from a data set ?
If I generate simple data set
> a <- data.frame(x=1:2, y = NaN, z = 2:1)
> a
x y z
1 1 NaN 2
2 2 NaN 1
I can select random subsets (colums) very easily using sample function:
> sample(a, 2)
z y
1 2 NaN
2 1 NaN
I expected that using transpose of a would do the same for rows, but I am
getting
rather unexpected
2011 Jul 18
1
XEN and vcpus
HI.
Got a question.
When I assign a number of vcpus to a DomU, Are they dedicated to that VM?
For example: If I have 16 vcpus available and 8 DomUs, should I assign 2
vcpus for each one? or could I assign more vcpus (i.e. 6) and the hypervisor
takes care of it?
Thanks
--
----------------------------------------------------------
Luis R. Romano
Estudiante de IngenierÃa en Computación.
FCEFyN -
2018 Nov 07
2
openssh-based file transfers (e.g. rsync, scp, ...) are running 40 (!!) times faster via IPv4 than IPv6
Vincenzo,
thanks for answering !!!
As I found out before that this slow down only happens for encrypted transmissions, I've followed your suggestion and
tested with a https-based download, from my Nextcloud instance on my VPS.
Same slow speed when connecting via IPv6, and as fast as expected when connecting via IPv4.
Just to confirm: There's NO dependency/relation between openssh and
2018 Nov 02
2
[BUG?] sftp is echoing back prompt and commands in batch mode
Short description: All comands sent to server in batch mode are being
echoed back along with prompt.
Software Version: "OpenSSH_7.9p1, OpenSSL 1.1.1 11 Sep 2018" (as
printed by ssh -V)
Server and client systems: ArchLinux x86_64 fully updated as of 2018-11-02.
## How to reproduce
Provided that you have proper SSH key authentication in place, from
command line run:
echo "dir
2018 Nov 04
3
[BUG?] sftp is echoing back prompt and commands in batch mode
Il giorno dom 4 nov 2018 alle ore 01:45 Ben Lindstrom
<mouring at offwriting.org> ha scritto:
>
> I don't see it as a bug.
Yes, this is why I put a question mark in the subject.
> As if I'm writing a batch script I want to see the echo of the command and the output so if there is a failure I know where the failure is.
I see: you have a single batch file with no
2012 Nov 15
4
using ifelse to remove NA's from specific columns of a data frame containing strings and numbers
Hi everyone,
I have a data frame one of whose columns is a character vector and the rest
are numeric, and in debugging a script, I noticed that an ifelse call seems
to be coercing the character column to a numeric column, and producing
unintended values as a result. Roughly, here's what I tried to do:
df: a data frame with, say, the first column as a character column and the
second and
2013 Feb 10
4
different behavior of $ with string literal vs string variable as argument
Hi everyone,
I ran into the issue below while trying to execute a command of the form
apply(list.names,1, function(x) F(favorite.list$x) )
where list.names is a character vector containing the names of the elements
of favorite.list and F is some function defined on a list element.
Namely, the $ operator doesn't treat the string variable 'x' as the string
it represents, so that,
2002 Sep 05
1
can't browse across subnets
Hi folks -
I'm having an issue here.
I have my samba server sitting on one subnet, and the rest of the clients
sitting on another (due to IP administration reasons).
I assign both my clients and the server to the same workgroup, but
the winboxen clients can't browse to the samba server.
The win clients all have WINS resolution turned on, and I specified
all of my WINS servers in
2014 May 09
3
Mail Merge data to a pdf file by overlaying the data on the image
Everyone,
I am looking for a utility that I can use to do a mail merge of data to
a pdf image file. The image file does not have any active fields, but
will be just an image file. I would like to overlay names addresses
etc.
We currently do this with a pcl file by just overlaying the data with
pcl print positions. However, in order to get the pcl file from an
original pdf file we have to
2003 Aug 08
1
covmat argument in princomp() (PR#3682)
R version: 1.7.1
OS: Red Hat Linux 7.2
When "covmat" is supplied in princomp(), the output value "center" is all
NA's, even though the input matrix was indeed centered. I haven't read
anything about this in the help file for princomp(). See code below for an
example: pc2$center is all NA's.
Jerome Asselin
x <- rnorm(6)
y <- rnorm(6)
X <- cbind(x,y)
2003 Jul 15
2
"na.action" parameter in princomp() (PR#3481)
Full_Name: Jerome Asselin
Version: 1.7.1
OS: Red Hat Linux 7.2
Submission from: (NULL) (24.77.125.119)
Setting the parameter na.action=na.omit should remove
incomplete records in princomp. However this does not
seem to work as expected. See example below.
Sincerely,
Jerome Asselin
data(USArrests)
princomp(USArrests, cor = TRUE) #THIS WORKS
USArrests[1,3] <- NA
princomp(USArrests, cor =
2009 Oct 19
2
What is the difference between prcomp and princomp?
Some webpage has described prcomp and princomp, but I am still not
quite sure what the major difference between them is. Can they be used
interchangeably?
In help, it says
'princomp' only handles so-called R-mode PCA, that is feature
extraction of variables. If a data matrix is supplied (possibly
via a formula) it is required that there are at least as many
units as
2003 Oct 16
1
princomp with more coloumns than rows: why not?
As of R 1.7.0, princomp no longer accept matrices with more coloumns
than rows. I'm curious: Why was this decision made?
I work a lot with data where more coloumns than rows is more of a rule
than an exception (for instance spectroscopic data). To me, princomp
have two advantages above prcomp: 1) It has a predict method, and 2)
it has a biplot method.
A biplot method shouldn't be too
2009 Nov 26
1
R help with princomp and pam clustering
Hi all!
I am working with R package cluster and I have a little problem:
let's say I have two datasets...first one ("A") is divided into 4 clusters
by means of Pam algorythm.
Let's say I want to project the second database ("B") onto the Comp.1 X
Comp.2 graph, and see where its elements are placed.
The two datasets are made of different dim (54x19 and 28x19). I tried
2006 Jul 31
1
How does biplot.princomp scale its axes?
I'm attempting to modify how biplot draws its red vectors (among other
things). This is how I've started:
Biplot <- function(xx, comps = c(1, 2), cex = c(.6, .4))
{
## Purpose: Makes a biplot with princomp() object to not show arrows
## ----------------------------------------------------------------------
## Arguments: xx is an object made using princomp()
##
2006 Jun 26
1
princomp and prcomp confusion
When I look through archives at
https://stat.ethz.ch/pipermail/r-help/2003-October/040525.html
I see this:
Liaw, Andy wrote:
>In the `Detail' section of ?princomp:
>
>princomp only handles so-called Q-mode PCA, that is feature extraction of
>variables. If a data matrix is supplied (possibly via a formula) it is
>required that there are at least as many units as variables. For