Duncan Murdoch wrote:
On 06/07/2009 4:16 PM, Peter Dalgaard wrote:
Scott Zentz wrote:
Hello Everyone,
We have recently purchased a server which has 64GB of memory
running a 64bit OS and I have compiled R from source with the
following config
./configure --prefix=/usr/local/R-2.9.1
Trust me, it is the same total data I am using, even the chunksizes are
all equal. I also crosschecked by manually creating the chunks and
updating as in example given on biglm help page.
?biglm
Regards
Utkarsh
Greg Snow wrote:
Are you sure that you are fitting all the models on the
Hi,
more precisely I consider a matrix with three column vectors a_i (i=1,2,3),
i.e. A=(a_1,a_2,a_3). On the other hand x should take vectors as values, i.e.
x=v_j, while j goes also from 1 till 3.
Now I just want to calculate the equation Cov(a_i,x_j) = 0, where Cov(a_i,x_j)
is the covariance
Hi
r-help-boun...@r-project.org napsal dne 06.07.2009 01:58:38:
On Sun, Jul 5, 2009 at 1:44 PM, hadley wickhamh.wick...@gmail.com
wrote:
I think the root cause of a number of my coding problems in R right
now is my lack of skills in reading and grabbing portions of the data
out of
Hi everyone,
Hi want to separate the string(column1) for example
column1 column2 column3 column4 column5 column6
bear b e a r
cat c a t
tigert i g e r
I know how to
hi hema
may be strsplit can help on the job.
bests.
milton
On Tue, Jul 7, 2009 at 3:54 AM, Hemavathi Ramulu hema.ram...@gmail.comwrote:
Hi everyone,
Hi want to separate the string(column1) for example
column1 column2 column3 column4 column5 column6
bear b e
Dear group:
sorry for my beginners question, but I'm rather new to R and was searching high
and low without success:
I have a data frame (df) with variables in the rows and observations in the
columns like (the actual data frame has 15 columns and 1789 rows):
early1 early2 early3
Hi
r-help-boun...@r-project.org napsal dne 07.07.2009 09:54:30:
Hi everyone,
Hi want to separate the string(column1) for example
Well, how did you get the data in R? Are they in separated columns of
data.frame? What do you mean by separate?
column1 column2 column3 column4 column5 column6
Dear All
Thanks for the suggestions. Mark's suggestion to specify corr=FALSE did
the job and removed the reams of correlations that were being outputted
from the model and using up all the output space.
Thanks
Christine
--On 06 July 2009 12:44 -0600 Lyman, Mark mark.ly...@atk.com wrote:
Hi
r-help-boun...@r-project.org napsal dne 07.07.2009 10:05:09:
Dear group:
sorry for my beginners question, but I'm rather new to R and was
searching
high and low without success:
I have a data frame (df) with variables in the rows and observations in
the
columns like (the actual
Hi Petr,
The data in text file and not csv format.
The word separate which I mean in this content is like split/separate the
string to each alphabet
where each alphabet will be in different column.
thanks alot.
regards,
Hema.
On Tue, Jul 7, 2009 at 4:12 PM, Petr PIKAL petr.pi...@precheza.cz
Hi
I am used to handle bio information such as NMR data or IR data .
I want to perform pls regression, so I search the help page of plsr. and I
use the example of plsr.
But I have a problem to make appropriate data format to do plsr.
these example data type like this :
A data frame with
Hi
If you have data frame like this
test=data.frame(x=c(abcd, abc, abcde))
than
strsplit(as.matrix(test), )
makes a list with splitted character vectors. If you want them in data
frame you would need to combine vectors of unequal length.
However I would try reading your text file with
Hi all,
I'm smoothly transferring my lattice graphs to ggplot2 graphs, but I'm stuck
on representing a curve from a formula.
I'm looking for the equivalent of curve() in ggplot2, Hadley Wickham
mentions geom_curve, but as far as I've seen in the help it doesn't exist.
My need is to plot a
Thomas Lumley vas escriure el dia dt, 30 jun 2009:
On Tue, 30 Jun 2009, Xavier wrote:
saurav pathak vas escriure el dia dl, 29 jun 2009:
Hi
I am using Stata 10 and I need to import a data set in stata 10 to R, I
have
saved the dataset in lower versions of Stata as well by using saveold
I want to make a matrix and vector in same data frame.
You need to protect your matrix by I ()
Btw: I'm actually writing a package for handling spectra that I plan to
release in some weeks.
It contains a vignette showing how pls calibration can be done.
If you want to give it a try, let me
Hallo,
I received this error message while calculating the coefficents
coef(fit, matrix=TRUE)
Error in object$coefficients : $ operator not defined for this S4 class
what is this? How can I solve it?
Ale
--
View this message in context:
Hallo,
I have an other problem, I have this vector signData with an alternation of
1 and -1 that corrispond to the duration of two different percepts. I
extracted the durations like this:
signData- scan(dataTR10.txt)
dur-rle(signData)$length
Now I would like to extract only the positive
What is fit in your example?
Ronggui
2009/7/7 aledanda danda.ga...@gmail.com:
Hallo,
I received this error message while calculating the coefficents
coef(fit, matrix=TRUE)
Error in object$coefficients : $ operator not defined for this S4 class
what is this? How can I solve it?
Ale
Try this:
rle(signData)$lengths[rle(signData)$values == 1]
On Tue, Jul 7, 2009 at 8:11 AM, aledanda danda.ga...@gmail.com wrote:
Hallo,
I have an other problem, I have this vector signData with an alternation of
1 and -1 that corrispond to the duration of two different percepts. I
Or:
with(rle(signData), lengths[values == 1])
On Tue, Jul 7, 2009 at 8:26 AM, Henrique Dallazuanna www...@gmail.comwrote:
Try this:
rle(signData)$lengths[rle(signData)$values == 1]
On Tue, Jul 7, 2009 at 8:11 AM, aledanda danda.ga...@gmail.com wrote:
Hallo,
I have an other problem,
I have an other problem, I have this vector signData with an alternation
of
1 and -1 that corrispond to the duration of two different percepts. I
extracted the durations like this:
signData- scan(dataTR10.txt)
dur-rle(signData)$length
I think that last line should be
Thank you for all the advice and I shall listen with regards to assign() and
think of another way of writing what I want.
Cheers!
From: gunter.ber...@gene.com
To: greg.s...@imail.org; kurt.sm...@hotmail.co.uk; r-help@r-project.org
Subject: RE: [R] Remove all spaces from a string so it
maybe with sweep:
sweep(df, 2, mean(mean(df))/mean(df), *)
On Tue, Jul 7, 2009 at 5:36 AM, Petr PIKAL petr.pi...@precheza.cz wrote:
Hi
r-help-boun...@r-project.org napsal dne 07.07.2009 10:05:09:
Dear group:
sorry for my beginners question, but I'm rather new to R and was
searching
Dear list,
making mathematical expressions in plots is not difficult: expression(phi[1])
for example. At this moment I am stuck in creating a vector of expressions:
pos - 1:10
lab - letters[pos]
Now, I would like to create a vector of expressions which I could use for
labeling the x-axis of a
I can not reproduce your problem with the latest version of VGAM.
Besides, if you want to get the coef and std. error etc.
you can use
summary(fit)@coef3
Value Std. Error t value
(Intercept):1 -1.020388 0.03215889 -31.72957
(Intercept):2 1.335657 0.04206706 31.75067
Setting:
200 input variables, 1 binary target variable.
Run a principle component analysis on the data
then
use the output of the principle component analysis (the generated factors)
as input into a neural network -but first having partitioned the pca data
into training and testing sets so that a
Setting:
200 input variables, 1 binary target variable.
Run a principle component analysis on the data
then
use the output of the principle component analysis (the generated factors)
as input into a neural network -but first having partitioned the pca data
into training and testing sets so that
Hi,
I want to do subscripted assignment of grid units, but I cannot find a
straightforward way of doing it (and I have searched all forums and places I
could think about, including Paul Murrell,s page). The usual subscripted
assignment operator does replace the numeric part, but does not update
Hello Everyone!
Thanks for all your replies! This was very helpful! I found that
there seems to be a limitation to only 32GB of memory which I think will
be fine. I was able to consume the 32GB of memory with the following:
Start R with the following command: R --max-vsize 55000M
then
Would the scale function work for this? Something like
new=scale(df, center=T)
HTH,
david freedman
cir p wrote:
Dear group:
sorry for my beginners question, but I'm rather new to R and was searching
high and low without success:
I have a data frame (df) with variables in the rows and
Seems strange. I can go all the way up to 50GB on our machine which
has 64GB as well. It starts swapping after that, so I killed the
process.
try this:
ans - list()
for(i in 1:100) {
ans[[ i ]] - numeric(2^30/2)
cat(iteration: ,i,\n)
print(gc())
}
source(scripts/test.memory.r)
Hello,
is it possible to create two uncorrelated random vectors for a given
distribution.
In fact, I would like to have something like the function rnorm or rlogis
with the extra property that they are uncorrelated.
Thanks for your help,
Luba
[[alternative HTML version deleted]]
Hi,
I'm trying to make it easier for my survey evaluators to read the
results of my survey analysis. To that end, I'd like to suppress R's
habit of filling every line up to width columns. How do I do that?
For instance, using 'print()', R outputs something like:
[,1]
Hey Whit,
That worked! I was able to consume all the memory on the server!
Thanks!
-scz
Whit Armstrong wrote:
Seems strange. I can go all the way up to 50GB on our machine which
has 64GB as well. It starts swapping after that, so I killed the
process.
try this:
ans - list()
for(i
Thank you for your help!
But is it possible to produe two vectors x and y with a given length such that
there correlation is zero.
For me ist not enough just to simulate two vectors with there correlation.
Thank you,
Luba
-Urspr?ngliche Nachricht-
Von:
Thank you for your help!
But is it possible to produe two vectors x and y with a given length such that
there correlation is zero.
For me ist not enough just to simulate two vectors with there correlation.
Thank you,
Luba
-Urspr?ngliche Nachricht-
Von: ONKELINX, Thierry
Hi,
I am trying to use R for some survey analysis, and need to compute the
significance of some correlations. I read the man pages for cor and
cor.test, but I am confused about
- whether these functions are intended to work the same way
- about how these functions handle NA values
- whether
You could use the mvtnorm package to generate correlated vectors of random
normal deviates where the nominal correlation is 0.
library(mvtnorm)
rho - 0.0
Cor - array(c(1, rho, rho, 1), dim=c(2,2))
Y - rmvnorm(1000, sigma=Cor)
plot(Y)
cor(Y)
cor.test(Y[,1],Y[,2])
Any given random set will have
How many rows does xx have?
Let's look at your example for chunksize 1, you initially fit the first
1 observations, then the seq results in just the value 1 which means
that you do the update based on vaues 10001 through 2, if xx only has 1
rows, then this should give at
?cor says that cor() can be applied to
'numeric vector, matrix or data frame'
?cor.test requires
'numeric vectors of data values'
So, what's your q?
As to na.action:
?cor.test makes no reference to na.action for the default method.
Looking at the code of cor.test.default shows that only
Be careful to be clear what you are referring to when you say
correlation is zero.
The commands
x - rnorm(100)
y - rnorm(100)
will produce two vectors of given length (100) which (to within the
effectively ignorable limitations of the ransom number generator)
will have been produced
On Tue, 7 Jul 2009, Stein, Luba (AIM SE) wrote:
Hi,
more precisely I consider a matrix with three column vectors a_i (i=1,2,3),
i.e. A=(a_1,a_2,a_3). On the other hand x should take vectors as values, i.e.
x=v_j, while j goes also from 1 till 3.
Now I just want to calculate the equation
Hi Albart,
This bugged me also for quite some time. After some experiments the
following syntax worked best:
library(lattice)
a = 0.11
xyplot(1:10~10:11, xlab = as.expression(bquote(R^2~ equals ~.(a
With the combination of as.expression and bquote you can mix text, math
expression and
Here are some examples that may get you started (note that there is no
guarantee that a variable follows a given distribution after it has been
adjusted to have 0 correlation with another variable):
library(MASS)
tmp - mvrnorm(25, c(0,0), diag(2), empirical=TRUE)
zapsmall(cor(tmp))
tmp2 -
It looks like you are printing a matrix and that you want to print all
rows of the first column before all rows of the second column. Apply
should do it. Assume the matrix is named AA
apply(AA, c(2,1), cat, \n) # the \n is the line-feed character
--
DW
On Jul 7, 2009, at 10:06 AM,
Hi all,
I just wanted to send a general word of thanks to the list for
making my first week using R successful (by my measures) and
reasonably pleasurable. (Not a single literal RTFM!) ;-)
I appreciate all the help I've received from folks. I have a long
way to go but I'm starting to get
Hi,
I am confused about how to select elements from a list.
I'm trying to select all rows of a table 'crossRsorted' such that the
mean of a related vector is 0. The related vector is accessible as
a list element l[[i]] where i is the row index.
I thought this would work:
Thanks, Peter.
You're right, I mistyped and getOption('na.action') shows na.omit.
Perhaps my question was more commentary about my perceived lack of
rationale and orthogonality in R than it should have been. Presumably,
q[[i]] is a data frame and q[[i]][,1] is a numeric vector, so cor and
On Tue, Jul 7, 2009 at 12:20 PM, David Winsemiusdwinsem...@comcast.net wrote:
It looks like you are printing a matrix and that you want to print all rows
of the first column before all rows of the second column. Apply should do
it. Assume the matrix is named AA
apply(AA, c(2,1), cat, \n) #
On Tue, Jul 7, 2009 at 1:22 PM, Godmar Backgod...@gmail.com wrote:
apply(AA, c(2,1), cat, \n)
Error in cat(list(...), file, sep, fill, labels, append) :
argument 1 (type 'list') cannot be handled by 'cat'
ps: but your idea of using 'apply' led me to this:
dummy - apply(AA, c(2), function
Hello,
Consider this function for generalized ridge regression:
gre - function (X,y,D){
n - dim(X)[1]
p - dim(X)[2]
intercept - rep(1, n)
X - cbind(intercept, X)
X2D - crossprod(X,X)+ D
Xy - crossprod(X,y)
bth - qr.solve(X2D,
I think that is because X in your function has (n + 1) columns and D with
only n coluimns:
matrix(1:9, ncol = 3) + matrix(1:8, ncol = 2)
On Tue, Jul 7, 2009 at 2:30 PM, spime saby...@gmail.com wrote:
Hello,
Consider this function for generalized ridge regression:
gre - function (X,y,D){
Incomplete code leaves us able to do naught but guess;
Perhaps you are unaware that x != X
--
DW
On Jul 7, 2009, at 1:30 PM, spime wrote:
Hello,
Consider this function for generalized ridge regression:
gre - function (X,y,D){
n - dim(X)[1]
p - dim(X)[2]
intercept
Hi spime,
What is x? Did you have any other X defined in your R-session? Be aware
that R is case-sensitive.
Best,
Jorge
On Tue, Jul 7, 2009 at 1:30 PM, spime saby...@gmail.com wrote:
Hello,
Consider this function for generalized ridge regression:
gre - function (X,y,D){
n -
I am new with R and want do some analysis with a point vector data file. Any
help is appreciate. Sunny
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Uwe Ligges schrieb:
Maybe, but the may depend on your script, your OS, your R version,
used packages and so on.
Hence please read and follow the posting guide and provide commented,
minimal, self-contained, reproducible code.
Hi Uwe,
I was just asked the same question and hat the same
Dear Andriy:
1. The help file for fit.NH says the first argument should be
a vector of data. Consider the following modification of the example
on that help page:
rs - matrix(rseries, 10, 202, dimnames=list(letters[1:10], 1:202))
rs. - fit.NH(rs)
Error: cannot allocate vector
Hi,
is there a simpler way to count the number of elements in a vector
that are not NA than this:
countN - function (v) {
return (Reduce(function (x, y) x + y, ifelse(is.na(v), 0, 1)))
}
?
- Godmar
__
R-help@r-project.org mailing list
Dear Godmar,
Yes. One way would be
sum( !is.na( yourvector ) )
HTH,
Jorge
On Tue, Jul 7, 2009 at 2:56 PM, Godmar Back god...@gmail.com wrote:
Hi,
is there a simpler way to count the number of elements in a vector
that are not NA than this:
countN - function (v) {
return
another option should be:
length(na.omit(v))
On Tue, Jul 7, 2009 at 3:56 PM, Godmar Back god...@gmail.com wrote:
Hi,
is there a simpler way to count the number of elements in a vector
that are not NA than this:
countN - function (v) {
return (Reduce(function (x, y) x + y,
Hi,
I am apparently not understanding some nuance about either the use
of subset or more likely my ability to test for a numerical match
using '='. Which is it? Thanks in advance.
I've read a data file, reshaped it and then created MyResults by
keeping only lines where the value column is
How about
countN - function ( v ) {
sum ( !is.na ( v ) ) - sum ( is.na ( v ) )
}
--
David
-
David Huffer, Ph.D. Senior Statistician
CSOSA/Washington, DC david.huf...@csosa.gov
Try this:
MyResults.GroupA - subset(MyResults, PosType == 1)
On Tue, Jul 7, 2009 at 4:06 PM, Mark Knecht markkne...@gmail.com wrote:
Hi,
I am apparently not understanding some nuance about either the use
of subset or more likely my ability to test for a numerical match
using '='. Which
Hi Mark,
X = 1
assings the number 1 to X whereas
X == 1
test if X is equal to 1. I suspect you want to do this :-) Here is an
example:
# R code
X = 1
X
# [1] 1
X == 1
# [1] TRUE
HTH,
Jorge
On Tue, Jul 7, 2009 at 3:06 PM, Mark Knecht markkne...@gmail.com wrote:
Hi,
I am apparently
On 7/7/2009 3:06 PM, Mark Knecht wrote:
Hi,
I am apparently not understanding some nuance about either the use
of subset or more likely my ability to test for a numerical match
using '='. Which is it? Thanks in advance.
I've read a data file, reshaped it and then created MyResults by
On Tuesday, July 07, 2009 3:20 PM, Godmar Back wrote:
...That would be wrong, wouldn't it, if the
other replies are correct
Yes. It was wrong. This isn't:
countN - function ( v ) {
length ( v ) - sum ( is.na ( v ) )
}
But there are really tons of ways to do it. Even your
Hi all,
Suppose I have x = c('a', 't', 'c', 'y', 'g')
and also y = c('a', 'a', 'g', 's')
If I do something like x%in%y, I obtain a vector like this: [TRUE, FALSE,
FALSE, FALSE, TRUE] which I can easily turn into this: [1, 0, 0, 0, 1].
I was wondering is there anyway for me to get a vector back
On 07-Jul-09 19:06:59, Mark Knecht wrote:
Hi,
I am apparently not understanding some nuance about either the use
of subset or more likely my ability to test for a numerical match
using '='. Which is it? Thanks in advance.
It looks as though you have tripped over the distinction between =
Thank you for the many replies! This is really a very friendly and
helpful community!
On Tue, Jul 7, 2009 at 3:06 PM, Henrique Dallazuannawww...@gmail.com wrote:
another option should be:
length(na.omit(v))
I think the above is what I was looking for since, presumably, it uses
the very same
On Tue, Jul 7, 2009 at 12:17 PM, Henrique Dallazuannawww...@gmail.com wrote:
Try this:
MyResults.GroupA - subset(MyResults, PosType == 1)
SNIP
Darn those small screen fonts. I never noticed that! Every example I'm
looking at jsut looks like a single '=' until you pointed it out!
Thanks to
Dear njhuang86,
Here is one way:
x - c('a', 't', 'c', 'y', 'g')
y - c('a', 'a', 'g', 's')
table(factor(y, levels = x))
# a t c y g
# 2 0 0 0 1
HTH,
Jorge
On Tue, Jul 7, 2009 at 3:28 PM, njhuang86 njhuan...@yahoo.com wrote:
Hi all,
Suppose I have x = c('a', 't', 'c', 'y', 'g')
and also y
I'm sure I'm missing something obvious but I'm not seeing how to simply
vectorize a function of two or more variables.
Say I have
f - function(x,y) if (x0) y else -y
Now I have vectors x and y of equal length and I'd like to apply f
element-wise. I.e. conceptually
z - f(x,y) where x, y, z are
Nevermind, indeed it is obvious: Vectorize !
Steve Jaffe wrote:
I'm sure I'm missing something obvious but I'm not seeing how to simply
vectorize a function of two or more variables.
--
View this message in context:
http://www.nabble.com/vectorizing-a-function-tp24380064p24380136.html
how about sum(!is.na(x)) ?
On Tue, Jul 7, 2009 at 2:56 PM, Godmar Backgod...@gmail.com wrote:
Hi,
is there a simpler way to count the number of elements in a vector
that are not NA than this:
countN - function (v) {
return (Reduce(function (x, y) x + y, ifelse(is.na(v), 0, 1)))
}
?
For this case it is quite simple, see ?ifelse
z - ifelse( x 0, y, -y )
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org
?ifelse
Bert Gunter
Genentech Nonclinical Biostatistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Steve Jaffe
Sent: Tuesday, July 07, 2009 12:42 PM
To: r-help@r-project.org
Subject: [R] vectorizing a function
I'm sure I'm
It is not clear to me whether you are talking about a covariance (a
theoretical quantity depending on the distribution of A and x) or an
empirical covariance, estimated from some data.
In the first case you don't need to solve anything because, as long as
A is fixed, i.e. non-random, its
subset(), like many R methods, has an argument list that
ends with '...', meaning that it will not tell you that an argument
you gave it by name= is not in the official list of arument names.
If the ... were not there then you would have gotten an error
message. E.g., the following makes a
Here is one way:
x - rnorm(100)
y - rnorm(100)
z - residuals(lm(y ~ x))
cor(x, z)
[1] 3.610290e-17
Best,
Giovanni
Date: Tue, 07 Jul 2009 16:26:02 +0200
From: Stein, Luba (AIM SE) luba.st...@allianz.com
Sender: r-help-boun...@r-project.org
Accept-Language: en-US, de-DE
Precedence: list
After I posted the previous message, I repeated the process on a windows
machine with Python 2.6 and still get the same error.
I would appreciate any help.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Hi,
Is it possible to dump a series of plots directly into a powerpoint
presentation (as is possible in Splus)?
Thank you,
Thomas
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Hi
You have encountered the fact that, while there are [ methods for grid
unit objects, there are NOT any [- methods for grid unit objects.
I guess that needs to go (back) onto my todo list.
A workaround for your simple example is ...
unit.c(testUnits[1:2], testUnit2, testUnits[4:5])
...
Greetings, I have a vector of the form:
[10,8,1,3,0,8,NA,NA,NA,NA,2,1,6,NA,NA,NA,0,5,1,9...] That is, a combination
of sequences of non-missing values and missing values, with each sequence
possibly of a different length.
I'd like to create another vector which will help me pick out the
I have to admit that I have no idea what we are talking about here (yes,
I tend to forget many things these days) - and you have not cited the
original message, unfortunately (nor have you specifies R versions,
Tinn-R versions and both OS versions, but just one) ...
Best wishes,
Uwe
Knut
I generate PDF images and then rasterise using imagemagick to large,
high quality JPG files. Then manually insert into powerpoint. Former
two can definitely be automated, I'm sure the latter insertion could
be automated with judicious use of scripting if really necessary.
2009/7/7 Thomas
Which previous message? Should we all look up the archives now? Please
cite and stay within the same thread.
Thank you,
Uwe LIgges
Chuck White wrote:
After I posted the previous message, I repeated the process on a windows
machine with Python 2.6 and still get the same error.
I would
sum(!is.na(x))
Date: Tue, 07 Jul 2009 14:56:54 -0400
From: Godmar Back god...@gmail.com
Sender: r-help-boun...@r-project.org
Precedence: list
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
Hi,
Here is a couple of very simple data.frames:
X-data.frame(A=1:10, B=0, C=1, Ob1=1:10, Ob2=2:11, Ob3=3:12,
Ob4=4:13, Ob5=3:12, Ob6=2:11)
Y-data.frame(A=1:20, B=0, C=1, D=5, Ob1=1:10, Ob2=2:11, Ob3=3:12,
Ob4=4:13, Ob5=3:12, Ob6=2:11, Ob7=5:9)
Z-data.frame(A=1:30, B=0, C=1, D=6, E=1:2, Ob1=1:10,
Dear Krishna,
Here is one way. It is not very elegant, but seems to work:
# x is the vector you want to change
foo - function(x){
R1 - rle(!is.na(x))
R2 - rle(is.na(x))
len - R1$lengths[!R2$values]
x[!is.na(x)] - rep(1:length(len), len)
x
}
# Example
x - c(10, 8, 1, 3, 0, 8, NA,
Hi,
I'm running wine-1.0.1, OpenBUGS 3.0.3, R 2.9.0, and R2WinBUGS on a Redhat
Enterprise Linux machine.
Following various peoples' suggestions...
This works perfectly (yay!): wine Z:/opt/OpenBUGS/winbugs.exe
Within R, however, I get this:
(setup the example from ?bugs, then)
R
Here's one possibility:
vv - c(10,8,1,3,0,8,NA,NA,NA,NA,2,1,6,NA,NA,NA,0,5,1,9)
(1+cumsum(diff(is.na(c(vv[1],vv)))==1)) * !is.na(vv)
[1] 1 1 1 1 1 1 0 0 0 0 2 2 2 0 0 0 3 3 3 3
On Tue, Jul 7, 2009 at 5:08 PM, Krishna Tateneni taten...@gmail.com wrote:
Greetings, I have a vector of the
On Jul 7, 2009, at 4:08 PM, Krishna Tateneni wrote:
Greetings, I have a vector of the form:
[10,8,1,3,0,8,NA,NA,NA,NA,2,1,6,NA,NA,NA,0,5,1,9...] That is, a
combination
of sequences of non-missing values and missing values, with each
sequence
possibly of a different length.
I'd like to
Dear List:
An e-mail mentioning the r-project.org address and sent to a friend at a German
university was considered spam by the local spam filter.
Its reasoning: the URL r-project.org is blacklisted at uribl.swinog.ch resp.
at antispam.imp.ch. I checked the list
Dear All,
I just updated from Fedora 9 to Fedora 11, kernel version
2.6.29.5-191.fc11.i586. I'm running R 2.9.
I successfully installed package Rstem from source (it always ran fine
for me in F9). However:
wordStem(c(This,is,a,test))
Error in wordStem(c(This, is, a, test)) :
VECTOR_ELT()
Hi all,
I've got the following error message in using e1071 svm routine...
Could anybody please help me?
Thank you!
-
model - svm(y=factor(mytraindata[, 1]), x=mytraindata[, -1], probability=T)
Error in if (any(co)) { : missing value where TRUE/FALSE needed
In
My sincere apologies. This message was intended for the rpy2 mailing list.
Thanks.
Uwe Ligges lig...@statistik.tu-dortmund.de wrote:
Which previous message? Should we all look up the archives now? Please
cite and stay within the same thread.
Thank you,
Uwe LIgges
Chuck
Hi,
I think, I can answer my own posting. I found out, that the directory
structure
of the ODT-file created by odfWeave causes the error message.
The file structure of the unzipped odt-file looks like this:
DIR Pictures
content_1-Boxplot.png
content.xml
current.xml
manifest.xml
On 07/07/2009 5:59 PM, Hans W Borchers wrote:
Dear List:
An e-mail mentioning the r-project.org address and sent to a friend at a German
university was considered spam by the local spam filter.
Its reasoning: the URL r-project.org is blacklisted at uribl.swinog.ch resp.
at antispam.imp.ch. I
Hello, R users.
I would like to display the font of Math Mode of MikTex 2.3, WinEdt 5.4
in R plots, e.g. in xlab, ylab or legend.
How can I do that?
Thank you in advance.
__
R-help@r-project.org mailing list
1 - 100 of 131 matches
Mail list logo