Displaying 20 results from an estimated 1300 matches similar to: "converting apply output"
2011 May 29
1
constructing nxn matrices involving calculations& conditions based on other tables
Dear R-users,
I am having trouble constructing nxn matrices involving calculations&
conditions based on other tables.
Below I describe a simple example of what I am trying to do:
Given the Table A (n x m):
Species1
Species2
X
A1,1
A1,2
Y
A2,1
A2,2
Z
A3,1
A3,2
I want to create a matrix M (n xn)
X
Y
Z
X
-
M1,2
M1,3
Y
M2,1
-
M2,3
Z
M3,1
M3,2
-
2005 Feb 05
2
Problem installing Hmisc (more info)
Frank Harrell suggested I re-post with information about the version of
R
Heres's the information:
> > version
> _
> platform powerpc-apple-darwin6.8
> arch powerpc
> os darwin6.8
> system powerpc, darwin6.8
> status
> major 2
> minor 0.1
> year 2004
> month 11
> day 15
> language R
Here's what happens
2004 Nov 01
2
Compilation error on mgcv_1.1-7 on OS X (10.3)
Greetings
I run into a compilation error when updating to mgcv_1.1-7 in R 2.0.0 on
OS X 10.3. Note that other pacakges have compiled nicely.
Some details are given below, but in short it looks like it's seeking for
/usr/local/lib/powerpc-apple-darwin6.8/3.4.2/
which I don't have. But I do have
/usr/lib/gcc/darwin/3.3
i.e a lower version of GCC in a different directory. More
2011 Mar 24
2
Problem with pam-auth and winbind
Hi
I try to use windbind rule to authenticate users in dovecot login procedure.
/etc/nsswitch.conf file:
passwd: files winbind
shadow: files winbind
group: files winbind
when I try logon from my console to dovecot (pop3 server):
# telnet komp14 110
Trying 10.10.10.38...
Connected to komp.xxx.xxx (10.10.10.38).
Escape character is '^]'.
+OK Dovecot ready.
user tt1
+OK
pass xxxxxxxxx
-ERR
2017 Sep 25
0
build a SpatialLines object from a list
Hi Ashraf,
It is not obvious to me what your structures are but one problem in your
function is the assignment tt1 <- SpatialLines(list(tt[[i]])).
This will set tt1 to just have one item.
Consider the following
test.func <- function(x) {
tt1 <- list()
for ( i in ... ) {
...
tt1[[i]] <- SpatialLines(tt[[i]])
}
return(tt1)
}
HTH,
Eric
On Mon, Sep 25,
2005 Mar 24
2
problem with pdf() on Mac Os X
Hello R helpers,
I am quite new as a R user, and even more on a Mac Os. I am running R
under Emacs 21.3.30.5 through ESS.
I have some problems with the pdf() device : when sent to it, plots
don't come out with any
labels, titles or whatever written. I don't have that problem when
plots are sent to X11 or postscript devices.
As pdf is the native format on Mac Os X, i find it sad to
2017 Sep 26
2
build a SpatialLines object from a list
Hi Eric,
Thanks for the help.But this will not solve the problem as it will generate a list and what I need is an object of class sp using SpatialLine function from sp package.So, I need to convert each matrix to coordinates and then to a line and then to a spatial line as figured in the code.
My data structure is a list of 141 matrices.Each matrix represents coordinates of the river lines
2017 Sep 26
0
build a SpatialLines object from a list
Hi Ashraf,
In that case I think you may need to structure the code to first build the
list and only at the end supply that to the SpatialLines function,
something like
test.func <- function(x) {
tt <- list()
for ( i in ... ) {
...
tt[[i]] <- (whatever)
}
return(SpatialLines(tt))
}
Eric
On Tue, Sep 26, 2017 at 12:36 PM, Ashraf Afana <asafaneh at
2004 Oct 23
2
R_LIBS and R Cocoa GUI for Mac OS X (PR#7308)
Full_Name: David Firth
Version: 2.0.0
OS: Mac OS 10.3.5
Submission from: (NULL) (81.178.234.156)
When running R in R Cocoa GUI 1.0 (v2004-10-14), I have
> Sys.getenv()[["R_LIBS"]]
[1] "/Users/david/Library/R"
> .libPaths()
[1] "/Users/david/Library/R/library"
[2] "/Library/Frameworks/R.framework/Resources/library"
The pasting of
2002 Apr 02
1
cbind.ts bug?
The following creates a time series tt1 whose values rise from 1
to 20 and another time series tt2 each of whose values are 10 larger
than the corresponding value in tt1. When we attempt to bind them
together as columns, the entry after Dec 1960 is erroneously listed
as NA 1960 instead of Jan 1961. If n is changed to either 19 or is
changed to 21 in the example below, the example suddenly
2004 May 12
1
convert.times in chron, error when 59 < seconds < 60 (PR#6878)
Full_Name: Dennis Wolf
Version: 1.9.0
OS: Mac OS 10.3.3
Submission from: (NULL) (160.91.76.23)
platform powerpc-apple-darwin6.8
arch powerpc
os darwin6.8
system powerpc, darwin6.8
status
major 1
minor 9.0
year 2004
month 04
day
2004 Nov 23
4
data.frame into vector
Hi
I want to extract a row from a data.frame but I want that object to
be a vector . After trying some different ways I end up always with a
data.frame or with the wrong vector. Any pointers?
x <- data.frame(a = factor(c('a',2,'b')), b = c(4,5,6))
I want to get
"a" "4"
I tried:
as.vector(x[1,])
a b
1 a 4
(resulting in a data.frame even after in my
2004 Nov 15
2
Problems installing packages on MacOS with R 2.00
Dear all,
I have a problem installing a package required by Hmisc on MacOS 10.3.5
with R 2.00.
g77 -fno-common -g -O2 -c avas.f -o avas.o
g77 -fno-common -g -O2 -c rlsmo.f -o rlsmo.o
gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o
acepack.so ace.o avas.o rlsmo.o -L/usr/local/lib
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2
2011 Mar 18
1
Problem with pam-auth and winbind
Hi
I try to use windbind rule to authenticate users in dovecot login procedure.
/etc/nsswitch.conf file:
passwd: files winbind
shadow: files winbind
group: files winbind
Configuration of the dovecot is follows:
log_path: /var/log/dovecot/error.log
info_log_path: /var/log/dovecot/info.log
protocols: imap imaps pop3 pop3s
ssl_cert_file: /etc/pki/tls/certs/dovecot.pem
ssl_key_file:
2004 Mar 30
1
Console/command line output
Hi all,
I am working on Macos x 10.3 (Panther) to build a package consisting of
C/C++ code that is called from R. In the C/C++-sources I use several
commands to print info to the console:
std::cout << "info" << endl;
and:
Rprintf("info\n");
Both work fine when R is run on the command line but neither works when
running Raqau (I did check the preference boxes
2004 Sep 07
2
noncommutative addition: NA+NaN != NaN+NA
Hi guys.
Check this out:
> NaN +NA
[1] NaN
> NA + NaN
[1] NA
I thought "+" was commutative by definition. What's going on?
> R.version
_
platform powerpc-apple-darwin6.8
arch powerpc
os darwin6.8
system powerpc, darwin6.8
status
major 1
minor 9.0
year 2004
month 04
day 12
language R
>
(Both give NA under linux, so it looks
2005 Sep 12
2
heatmap question
I'm having trouble with the heatmap function in R. When I try and
heatmap something, my graphics window does not open. Does anyone
know if this is a glitch in the version of R that I'm using? I've
listed my version of R below, as well as a simple heatmap command.
I'm running the program on a Mac, OS 10 v 10.3.9. Any suggestions??
Thanks!
Peter
> version
_
2017 Sep 25
2
build a SpatialLines object from a list
Hi all,I'm trying to build a SpatialLines object from a list that contains 124 river segments. Each segment in the list contains the x,y coordinates. I'm using the following code to create the SpatialLines object, but it just retrieves one segment. Any suggestions?
test.func = function(x){
??? for (i in 1:length(x)) {??????? tt[[i]] <- x[i]; tt[[i]]? = Line(tt[[i]]); tt[[i]]? =
2004 Nov 18
5
Lexical Scoping: eval(expr,envir=)
Hi R-listers,
I am trying to better undertand what we would call "functional paradigm"
use of S/R to better map my programming activities in other languages.
This little function is aimed to create an object (at the end end, it would
have it's own class):
--
myObject =function(){
list(
a=1,
foo=function(b)
{
cat("b:",b)
2012 May 03
6
Cannot read or write to file in Linux Ubuntu
I am the proud owner of a new laptop since my old one died the other day.
Currently I have a dual-boot Windows 7 Home and Ubuntu 12.04 . I'll leave the Windows problems for another post.
I know practically nothing about Linux so I am probably doing something stupid but ... at the moment I cannot seem read or write files in Ubuntu. I am not having any problem saving other documents to the