Displaying 20 results from an estimated 5000 matches similar to: "find indices of nonzero elements"
2001 Oct 30
2
extracting object names as strings
Hi,
I'm looking for a function which returns the name of the argument
object as a string:
>vect <- 1:3
>function(vect)
"vect"
I've looked at 'name', 'names', 'objects', none seem to do exactly what I
want. ls/objects comes close, but I can't figure out how to force it to
give me only one object name.
daver
2002 Mar 20
7
how does while work
i am having some problems with a program that i am writing and i think that
knowing how the while command works will help me to figure out where i am
going wrong
*when do you get kicked out of a while loop?*
(i.e., in the following example what would the final value of 'a' be?) i
thought it would be 99 but running it in R i get 101 (and 101 for x too!)
while (x <100) {
for (i in
2001 Sep 28
3
evaluating the contents of a string
Hi,
suppose I do:
b <- matrix(1:9,3,3)
bname <- "b"
now
dim(b)
returns
[1] 3 3
and
dim(bname)
returns
NULL
is there a function to pass bname to such that dim returns the dimensions
of b?
like
dim(somefunc(bname))
returns
[1] 3 3
does 'somefunc' exist?
daver
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|David Richmond It
2001 Sep 29
1
how much memory does one need...
to allocate 7.8 MB to a vector? (on R running on MacOS 8.6 with a 100MB
partition)
I get this error from a function which is trying to create a 1000x1000
matrix:
Error: cannot allocate vector of size 7812 Kb
the error occurs here:
dist <- as.single((t(pos)-pos)/n)
where pos is a matrix of integers, and n is the size of the first
dimension. It appears to first create a double with
2001 Nov 29
3
pause/get input
Hi,
Is there a simple command to pause a script until the user hits
return? Alternatively, is there a command which prompts the user for some
input and assigns the input into a variable?
dave
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|David Richmond It works on a |
+ Dept. of Sociology complex scientific +
|Saint Mary's College
2001 Sep 14
3
stuff I used to do in Matlab
Hi,
I'm new to R, and trying to map stuff I knew how to do in Matlab
to R. For instances, in matlab, sum(x) gave the column sums of
matrix(/vector) x. In R it just gives the sum of all the elements,
regardless of their form (vector or matrix). Is there a simple way to
return a vector of column sums for a matrix? Also, in Matlab binary
operators exist for concatenating a matrix onto the end or
2001 Nov 15
6
two plots in one frame
I would like to plot two different scatterplots in the same frame (say with
different colors) but everytime plot is called a new frame is created. Is
there a way around this?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or
2001 Oct 16
4
Assignment of structures on a given environment
Hi,
In order to avoid deep copies by passing large arguments to functions or
returning values, I'm trying to do the assignment of variables in a
given environment. The problem is when I try to assign a structure: a
list for example.
If I have:
ind <- c("a","b")
my idea is doing something like
l <- alist()
l[ind] <- as.list(c(20,40))
in a given
2002 Feb 28
1
postscript output sideways
Hi,
My plots are all coming out sideways! If I do the following:
> postscript("plot1.ps",horizontal=TRUE,paper="letter")
> plot(ns,meanpl/maxvec)
> dev.off(2)
The output file has "ns" on the left and the "meanpl/maxvec" on the top!
It doesn't matter if I change the horizontal flag to FALSE.
I have noticed, however that If I create my own
2001 Oct 14
1
recursive functions and global variables
Hi,
I am trying to write a recursive routine which passes some
variables through the function calls but also refers to some global
variables. I need the global variables because they are very big (n by n
matrices where n is <= 1000) and I don't have the huge amount of memory
needed to spawn dozens of copies of these matrices. The problem seems to
be that while variables in the root
2002 Apr 12
2
Help
I have an adjacency matrix and I want to obtain a matrix of the minimum
paths between the nodes. Thank you
Alessandro Ambrosini
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)
2001 Dec 14
0
polylog
Hi,
Does R do the "PolyLog" function, also know as Jonquiere's
function: Li-n(z) = sum over k= 1 to inf. of (z^k)/(k^n) ?
dave
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|David Richmond It works on a |
+ Dept. of Sociology complex scientific +
|Saint Mary's College principle, known as |
+ Notre Dame, IN
2005 May 07
1
Incorrect libxml2.2.dylib version on Tiger install
Hi all,
I have just installed OSX Server 10.4 and R comes up with the
incompatible libxml library message reported by Dan Kelley a few
messages ago. Xcode 2 does not ship with Tiger Server. I installed
the X-Windows code. I can report that the version of libxml2.2 that is
installed in this case is the version 8.0.0 dylib.
[6]sboker at munimula:/usr/lib % ls -l libxml2.2*
-rwxr-xr-x 1
2004 Nov 25
2
logistic regression and 3PL model
Hello colleagues,
I am a novice with R and am stuck with an analysis I am trying to conduct.
Any suggestions or feedback would be very much appreciated.
I am analyzing a data set of psi (ESP) ganzfeld trials. The response
variable is binary (correct/incorrect), with a 25% base rate. I've looked
around the documentation and other online resources and cannot find how I
can correct for
1998 Jul 28
4
problems with samba 1.9.18p8
I recently installed samba 1.9.18p8. Since then, we get the following
error:
"No domain server was available to validate your password. You may not be
able to gain access to some network resources."
after the server has been running for >48 hours. If I stop and restart the
server, everything is ok again. Our samba server is a Sun Ultra 2170
running Solaris 2.5.1.
Any help will
2005 Feb 20
1
logistic regression and 3PL model
Hello colleagues,
This is a follow up to a question I posed in November regarding an analysis
I was working on. Thank you to Dr. Brian Ripley and Dr. John Fox for
helping me out during that time.
I am conducting logistic regression on data set on psi (ESP) ganzfeld
trials. The response variable is binary (correct/incorrect), with a 25%
guessing base rate. Dr. Ripley suggested that I
2003 Nov 26
9
Error Message
I noticed this error message within some of my users log files;
rpc_server/srv_samr_nt.c:_samr_query_aliasmem(2626) _samr_query_aliasmem:
Not yet implemented.
Why does this mean and what do I need to do to stop this error message from
appearing.
BTW, the users all have XP machines.
Martin Stacey
IT Support Manager
Safcol Australia Pty Ltd
2004 Sep 22
5
Issue with predict() for glm models
[This email is either empty or too large to be displayed at this time]
1997 Oct 09
0
R-alpha: [sboker@calliope.psych.nd.edu: Re: S-PLUS on UNIX plans]
--Multipart_Thu_Oct__9_10:41:03_1997-1
Content-Type: text/plain; charset=US-ASCII
In case you did not realize how much this is related to R :
--Multipart_Thu_Oct__9_10:41:03_1997-1
Content-Type: message/rfc822
Return-Path: s-sender@utstat.toronto.edu
From: "Steven M. Boker" <sboker@calliope.psych.nd.edu>
Date: Wed, 8 Oct 97 16:37:05 -0500
To: s-news@utstat.toronto.edu
Subject:
2003 May 13
0
bug in promax?
I was wondering whether the following inconsistency of the promax
rotation function with the results of a promax rotation using SAS
should be considered a bug in the promax function of R. Any comments
will be highly appreciated.
The following is a loading matrix obtained from a varimax rotation in SAS:
# Factor loadings after varimax rotation
x <- t(array(c(0.78107, 0.35573,