eger overflow
> m1^2
[1] 3748378176
That is, the multiplication worked with the numbers but not the
numeric vectors; the above is literally copied from the console. Why
is that happening?
Any help would be much appreciated!
STG
--
Stefan Th. Gries
-
Before responding to Jeff's posting, let me reiterate my question: Why
does a function using m1*m1 produce an integer overflow, but m1^2 does
not?
As for Jeff's 'response':
> a) Numeric values may be either integers (signed 32 bit) or double precision
> (53 bit mantissa).
> b) Double precision c
> You are right that various arithmetic operators map a pair of integer
> arguments to various type: the power and division operators map them to
> double precision while the the addition, multiplication, and subtraction
> operators map them to integer results (giving NA's if the result cannot f
This should do what you want:
set.seed(1)
# cerating a vector with comments, in which d's will be counted
comments<-character(25)
for (i in 1:25) {
comments[i] <- paste(sample(letters[1:10], 10, replace=T), collapse="")
}
# creating a vector to cross -tabulate
age <-sample(c("old", "young"), 2
This should do what you want:
x<-"abcdefghijkl"
strsplit(x, "(?<=...)", perl=T)
HTH,
STG
--
Stefan Th. Gries
---
University of California, Santa Barbara
http://www.linguistics.ucsb.edu/faculty/stgries
__
Hi all
I have a hopefully not too stupid question about multi-level /
mixed-effects modeling. I was trying to test a strategy from Crawley's
2013 R Book on a data set with the following structure:
- dependent variable: CONSTRUCTION (a factor with 2 levels)
- independent fixed effect: LENGTH (an i
y.bevor.lrm, pch="b")
points(x2, y.nachdem.lrm, pch="n")
points(x2, y.weil.lrm, pch="w")
plot(x2, y.als.glm, pch="a", xlim=c(-100, 100), ylim=c(0, 1),
main="with predict.glm", xlab="Main cl. length - subord. cl. length
(in words)", y
weil.lrm, pch="w")
plot(x2, y.als.glm, pch="a", xlim=c(-100, 100), ylim=c(0, 1),
main="with predict.glm", xlab="Main cl. length - subord. cl. length
(in words)", ylab="Predicted probability of 'sc-mc'")
wr/other_5.pdf>)
is a web crawler.
Best,
STG
--
Stefan Th. Gries
---
University of California, Santa Barbara
http://www.linguistics.ucsb.edu/faculty/stgries
__
R-help@r-project.org mailing list
https:
86_64, linux-gnu
status
major 2
minor 12.2
year 2011
month 02
day 25
svn rev 54585
language R
version.string R version 2.12.2 (2011-02-25)
###
Paradoxically enough, R for Windows installed on this machine (running
with Wine) causes no problems, but on Linux ... Any ideas what that
c
Yes, and plotting a pvclust object also works on Windows.
STG
--
Stefan Th. Gries
---
University of California, Santa Barbara
http://www.linguistics.ucsb.edu/faculty/stgries
---
On Tue, Mar 8, 2011 at 04:06
Hi all
I have a question regarding the Fligner-Killeen test. I am using
- a PC with Windows XP (Build 20600.xpsp080413-2111 (Service Pack 3);
- the following R version:
> sessionInfo()
R version 2.7.0 (2008-04-22)
i386-pc-mingw32
I have a vector LENGTH and a factor RELATION that are distributed
Hi all
Four questions regarding Unicode.
Three Windows questions. I am using
- a PC with Windows XP (Build 20600.xpsp080413-2111 (Service Pack 3);
- the following R version:
> R.version
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
Hi all
I have a question regarding the Fligner-Killeen test. I am using
- a PC with Windows XP (Build 20600.xpsp080413-2111 (Service Pack 3);
- the following R version:
> sessionInfo()
R version 2.7.0 (2008-04-22)
i386-pc-mingw32
I have a vector LENGTH and a factor RELATION that are distributed
Hans-Joerg Bibiko's function Levenshtein would help; cf. below for an
example (very clumsy with two loops, but you can tweak that with apply
stuff).
HTH,
STG
levenshtein <- function(string1, string2, case=TRUE, map=NULL) {
# levenshtein algorithm in R
#
#
On Fri, Jan 23, 2009 at 08:28, Stefan Th. Gries wrote:
> Hans-Joerg Bibiko's function Levenshtein would help; cf. below for an
> example (very clumsy with two loops, but you can tweak that with apply
> stuff).
Like this maybe (sorry, should've thought about that earlier):
[..
Hi all
I have two lists that have the same number of numeric vectors such as:
q<-list(1, 2:3, 4:6, 7:10)
w<-list(0, 1:2, 3:7, 8:10)
What I want to do is create a vector desired.result that looks like
this but I am thinking there must be some kind of non-loop /
"\\wapply" way to so ...
desired.re
Hi all
I have the following regular expression problem: I want to find
complete elements of a vector that end in a repeated character but
where the repetition doesn't make up the whole word. That is, for the
vector vec:
vec<-c("", "baaa", "bbaa", "bbba", "baamm", "aa")
I would like to get
"b
Hi
I have two questions regarding the meaning of intercept outputs of lm.
Question 1: In data set 1 (a fully-balanced design), the line with
(Intercept) contains the overall mean, and the estimates contain the
differences from the overall mean (matching those from model.tables).
But in data set 2
19 matches
Mail list logo