Skip to content

Convert back to lower triangular matrix

9 messages · Juliet Ndukum, Jeff Newmiller, David Winsemius +4 more

#
This is R-help, not the linear algebra hotline. Please stay on topic.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Juliet Ndukum <jpntsang at yahoo.com> wrote:

            
#
On Nov 15, 2011, at 5:38 PM, Juliet Ndukum wrote:

            
Surely this would be the logical inverse

dd1.b <- as.dist(ddm)
#
On Tue, Nov 15, 2011 at 2:38 PM, Juliet Ndukum <jpntsang at yahoo.com> wrote:
as.dist(ddm)

Peter
#
1. Please post in plain text, not HTML (as the posting guide asks!)

2. This might actually be an R question -- is
?lower.tri
what you want?

-- Bert

On Tue, Nov 15, 2011 at 2:50 PM, Jeff Newmiller
<jdnewmil at dcn.davis.ca.us> wrote:

  
    
#
Hi,

The obvious answer is don't use attach() and you'll never have
that problem. And see further comments inline.
On Tue, Nov 15, 2011 at 6:05 PM, Steven Yen <syen at utk.edu> wrote:
Look there. R even *told* you that it was going to use the
y in the global environment rather than the one you were
trying to attach.

The other solution: don't save your workspace. Your other
email on this topic suggested to me that there is a .RData
file in your preferred working directory that contains an
object y, and that's what is interfering with what you think
should happen.

Deleting that file, or using a different directory, or removing
y before you attach the data frame would all work.

But truly, the best possible strategy is to avoid using attach()
so you don't have to worry about which object named y is
really being used because you specify it explicitly.

  
    
1 day later
#
Well, if your problem is that a workspace is being loaded automatically
and you don't want that workspace, you have several options:

1. Use a different directory for each project so that the file loaded
by default is the correct one.

2. Don't save your workspace, but regenerate it each time.

3. Use R --vanilla or your OS's equivalent to start R without loading anything
automatically, and use load() and save() to manually manage RData files.

Yes, it's convenient, but if you want to use a non-standard way of working
you need to understand what you're doing.

Sarah
On Thu, Nov 17, 2011 at 3:10 AM, Steven Yen <syen at utk.edu> wrote: