Displaying 20 results from an estimated 30000 matches similar to: "write"
2011 Feb 07
2
as.list(subclassed function) -> cannot coerce type 'closure' to vector of type 'list'
I was looking for all the glm-related 'family' functions
in stats using the following predicate that returns TRUE
for any function whose first argument is called "link".
is.family <- function(object) is.function(object) &&
identical(names(as.list(object))[1], "link")
It threw an error when applied to SSfol
> is.family(SSfol)
Error in
2003 Apr 24
1
write.table problem
Dear R helpers,
I have been using the loadings function from the multiv library and I
get the typical output (see below). When I try to export these results
to a file using a write.table() I get the following error message
"Error in as.data.frame.default(x[[i]], optional = TRUE) : can't coerce
loadings into a data.frame" Any idea why write.table is doing that and
any
2012 Oct 16
2
cannot coerce class '"rle"' into a data.frame
why?
> rle
Run Length Encoding
lengths: int [1:1650061] 2 2 8 2 4 5 6 3 26 46 ...
values : chr [1:1650061] "4bbf9e94cbceb70c BG bg" "4fbbf2c67e0fb867 SK sk" ...
> as.data.frame(rle)
Error in as.data.frame.default(vertices.rle) :
cannot coerce class '"rle"' into a data.frame
it seems that
rle.df <-
2002 Nov 22
4
Small change to plot.xy
Hi everyone,
Is there any reason why we should not automatically coerce a factor
supplied as an argument to col in a plotting function? The following
modification (to R-1.6.1) seems pretty harmless
> plot.xy
function (xy, type, pch = 1, lty = "solid", col = par("fg"),
bg = NA, cex = 1, ...)
{
if (is.factor(col))
col <- codes(col)
2019 Nov 03
4
Recent inability to view long filenames stored with scp via samba mount
Greetings Samba team,
It has been a long time since I needed to ask a Samba technical question.
Server and workstation are both running the latest Samba packages via Ubuntu 16.04 LTS. I recently applied the security updates... actually that was yesterday I applied them.
> samba (2:4.3.11+dfsg-0ubuntu0.16.04.23) xenial-security; urgency=medium
>
> * SECURITY UPDATE: client code can
2009 Dec 04
2
Class attributes
Dear R forum,
I want to replace all the elements in a data frame (dd) which match the
character "x" with "0".
What's the most elegant way of doing this (there must be an easy way which
I've missed)? I settled on the following loop:
>for(i in 5:12){ # These are the column of dd I am interested
in
>dd[which(dd[,i]=="x"),i]<-0
>}
The
2003 May 12
1
Zeitreihen problem
Hallo!
I lese gro?e Zeitreihen in R ein z.B. mit:
> disc<-read.table("F:/R/DATA/discount_rate_usa.txt")
disc hat dann folgende Struktur:
> disc[1:5]
V1 V2
1 01/03/1955 1.5
2 01/04/1955 1.5
3 01/05/1955 1.5
4 01/06/1955 1.5
5 01/07/1955 1.5
ich will das disc als Zeitreihe erkannt wird und will z.B 01/03/1955 in ein
Datum verwandeln, aber es wird als
2010 Apr 13
2
how to work with big matrices and the ff-package?
Hello everyone,
I need to create and work with some big matrices that actually have somewhat over 2 million columns and 117 rows. To do some calculations on such big matrices R just needs too much memory for my PC (4GB installed). So I need a solution to work with large datasets. I'm trying to use the ff-package but I don't think I really understand the whole functionality of the
2001 Sep 04
10
Newsgroup - another try?
As nobody seems to answer my request, I simply post it again.
Is there any reason why the r-help-mailinglist should not be converted to a
newsgroup?
These were the advantages of a newsgroup I mentioned earlier:
-) you can easily search the archives
-) the discussion is faster (I experience that the R-mailinglist has a lag
of about 1 to 2 hours (not for everyone!!!). When I ask a question, I get
2001 Aug 23
2
multiple correlation?
I'm looking for a function for the 'multiple correlation' but can not figure
out what it is called in R by using the html search function. Maybe it is
called in another way in english? I only know the german term?
Can anyone help me?
Thomas Pesl
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2001 May 03
1
dataframe behavior
Windows98, Emacs20.7, ESS5.1.18
I recently constructing a data.frame "belle" that now does not spew its
contents when I type the name on the command line (see errors below). It
will only do so if I specify columns. Incidently, plot(belle) displays the
pairs plot of all variables.
> belle
Error in as.data.frame.default(x[[i]], optional = TRUE) :
can't coerce array into a
2001 Jul 26
2
winedt (PR#1033)
i don't know, whether this is a bug or it is intended:
when using winedt and R together it works perfectly, as long as R is run in
mdi (multiple window mode). When you switch to sdi (single window mode)
winedt, sends no command at all: no history, paste, source or script.
Thomas Pesl
> version
_
platform i386-pc-mingw32
arch x86
os Win32
2015 Mar 17
2
[LLVMdev] Alias analysis issue with structs on PPC
Hal Finkel <hfinkel at anl.gov> wrote on 16.03.2015 17:56:20:
> If you want to do it at a clang level, the right thing to do is to
> fixup the ABI lowerings for pointers to keep them pointers in this case.
> So this is an artifact of the way that we pass structures, and
> constructing a general solution at the ABI level might be tricky.
> I've cc'd Uli, who did most
2003 Dec 30
3
Writing data frames
Hi there -
I have been trying to generate some simple stats and save the results to
a file. My data looks like this:
x y z exp
0 3 5 1
2 11 10 1
4 4 5 1
7 6 4 1
11 1 2 2
5 7 1 2
3 3
1997 May 21
2
R-alpha: factors ...
Perhaps someone can enlighten me here:
R> x <- factor(LETTERS[1:3])
R> x
[1] A B C
R> mode(x)
[1] "factor"
R> class(x)
[1] "factor"
R> mode(unclass(x))
[1] "factor"
S-PLUS has
> x <- factor(LETTERS[1:3])
> mode(x)
[1] "numeric"
> class(x)
[1] "factor"
> mode(unclass(x))
[1] "numeric"
???
2006 Jun 05
2
grep() and factors
Hi all,
Based upon an offlist communication this morning, I am somewhat confused
(more than I usually am on most Monday mornings...) about the use of
grep() with factors as the 'x' argument.
The argument guidance in ?grep indicates:
x, text a character vector where matches are sought. Coerced to
character if possible.
and in the Details section:
Arguments which should be
2000 Sep 07
2
read.table
When I read a table (the dimnames of the table are numbers), R reads the
column names as: X plus the number (X1,X2,X3,...) and the rownames as the
numbers (1,2,3,...)
How can I suppress this action?
The code and the output:
^^^^^^^^^^^^^^^^^^^^^^^^
> r2<-read.table("h:\\matrix",header=T,dec=",",na.strings="-99")
> dimnames(r2)
[[1]]
[1] "500"
2013 May 20
3
as.vector with mode="list" and POSIXct
I was trying to convert a vector of POSIXct into a list of POSIXct, However, I had a problem that I wanted to share with you.
Works fine with, say, numeric:
> v = c(1, 2, 3)
> v
[1] 1 2 3
> str(v)
?num [1:3] 1 2 3
> l = as.vector(v, mode="list")
> l
[[1]]
[1] 1
[[2]]
[1] 2
[[3]]
[1] 3
> str(l)
List of 3
?$ : num 1
?$ : num 2
?$ : num 3
If you try it with POSIXct,
2003 Sep 02
3
How to avoid automatic coercion to factor?
I have a function that manipulates a list of numeric and character
components of equal length and wants to return a data.frame.
EG,
f<-function() {
a<-list(Int1=1:5,Char1=letters[1:5],Char2=letters[6:10])
b<-data.frame(a)
}
How can I get the columns Char1, Char2, (...CharN) returned coerced to
character and not factor?
It appears that I could coerce individual columns by
2009 Mar 18
2
incoherent conversions from/to raw
i wonder about the following examples showing incoherence in how type
conversions are done in r:
x = TRUE
x[2] = as.raw(1)
# Error in x[2] = as.raw(1) :
# incompatible types (from raw to logical) in subassignment type fix
it seems that there is an attempt to coerce the raw value to logical
here, which fails, even though
as.logical(as.raw(1))
# TRUE
likewise,
x[2]