Hi R,
I am trying to get an output like this
Hi
Hello
1 a b
2 a b
3 a b
4 a b
5 a b
And write it as a text file
cat(paste(Hi,sep='\n',Hello)) gives me
Hi
Hello
And when I
Dear all,
I have a matrix as follows:
a=matrix(c(1,2,3,1,2,3,1,2,3,6,5,7,7,5,7,5,6,5,Y, N,Y,Y,N,Y,
N,Y,Y),ncol=3)
a
[,1] [,2] [,3]
[1,] 1 6 Y
[2,] 2 5 N
[3,] 3 7 Y
[4,] 1 7 Y
[5,] 2 5 N
[6,] 3 7 Y
[7,] 1 5 N
[8,] 2 6 Y
[9,] 3 5 Y
[10,] 1 5 Y
Here, the first
Dear Tian,
You could simply try that: table(a[,1], a[,2], a[,3])
Regards,
Sandrine Lunven
-Message d'origine-
De : r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] De
la part de Tian Shen
Envoyé : jeudi 9 avril 2009 09:06
À : r-help@r-project.org
Objet : [R] Create 2*3
When trying to create (a very simple) cluster using makeSOCKcluster or
makeCluster I get the following error message:
library(snow)
cl - makeSOCKcluster(localhost)
Fatal error: kann Datei
'~/R/i686-suse-linux-gnu-library/2.8/snow/RSOCKnode.R' nicht öffnen: Datei
oder Verzeichnis nicht
Hello,
I am trying to install a program based on R, but I am receiving the
following error message:
r...@darkstar:/home/maria/UCS# perl System/Install.perl
Error: Can't run the R interpreter (/usr/local/bin/R).
Please make sure that R is installed and specify the fully qualified
filename of the R
Hi guys,
I want to transfer the following code from R into .Call compatible form. How
can i do that?
Thanks!!!
INT sim;
for(i in 1:sim){
if(i2) genemat - genemat[,sample(1:ncol(genemat))]
ranklist[,1] - apply(genemat, 1, function(x){
Kevin,
sorry I don't understand this sentence:
It has been suggested that I do a cluster analysis. Wouldn't this bet
mepart way there?
Let your products be numbered 1, ..., n, and let p(i) be the location
where product i is stored (assigned to) in the warehouse. Then p is a
permutation of the
Hi,
I'm trying to invoke the function bond_prices from termstrc package.
Here is the code snippet:
library(termstrc)
data(eurobonds)
b - matrix(rep(c(0,0,0, 1),1),nrow=1,byrow=TRUE)
group-c(GERMANY)
colnames(b) - c(beta0,beta1,beta2,tau1)
germaturities-create_maturities_matrix(eurobonds$GERMANY)
Peter Dalgaard wrote:
Mike Lawrence wrote:
Looks like that code implements a non-exhaustive variant of the
randomization test, sometimes called a permutation test.
Isn't it the other way around? (Permutation tests can be exhaustive
by looking at all permutations, if a randomization test did
Hi everyone,
I try to make a netcdf file which disposes a difference between 2 variables of
2netcdf files same dimension
When I programmed under R, everything is ok but when I put the code under EOF
of a sh script, an error occurs:
Error, passed variable has a dim that is NOT of class
Ravi S. Shankar ravis at ambaresearch.com writes:
I am trying to get an output like this
Hi
Hello
1 a b
# The easy way: good for logging of results, but commands print too,
# depending how you run it
df = data.frame(a=rep(a,3),b=rep(b,3))
sink(file=a.txt)
cat(Hello\n)
Dear all,
The standard call to ARIMA in the base package such as
arima(y,c(5,0,0),include.mean=FALSE)
gives a full 5th order lag polynomial model with for example coeffs
Coefficients:
ar1ar2 ar3 ar4 ar5
0.4715 0.067 -0.1772
Hello does R support [:punct:] in regular expressions? I am trying to
strip all regular expressions for a vector of strings.
x - c(yoda-yoda,billy!)
gsub(/[:punct:]/,,x)
[1] yoda-yoda billy!
Thanks
Dan
--
**
Daniel Brewer, Ph.D.
Dear Ladies and Gentlemen,
I have a fairly large database (N=13,000) and a single main categorical
discriminator between the groups.
I want to look at the time course of a number of continuous biochemical
variables over chronologic age.
Therefore I believe I need to prepare hexbinplots in
Hi, R-listers,
Failed, when I tried to merge df1 and df2 by codetot in df1 and codetoto
in df2. I want to know the reason and how to merge them together. Data
frames and codes I have used were listed as followed. Thanks a lot in
advance.
df1:
popcode codetot p3need
BCPy01-01 BCPy01-01-1
On 09/04/2009 7:10 AM, Daniel Brewer wrote:
Hello does R support [:punct:] in regular expressions? I am trying to
strip all regular expressions for a vector of strings.
It does, but remember that the [] chars are part of the character class;
you need extra [] brackets around the whole thing,
With only 600 lines, it is relatively easy to read it in and replace
some lines. For example (untested) is you wanted to replace lines
150:250 with your data, you would do
input - readLines('filename')
input - c(input[1:149], newData, input[251:length(input)])
writeLines(input, file='filename')
Hi everyone,
I saw this problem dealt with here:
http://markmail.org/search/list:r-project?q=integrate#query:list%3Ar-project%20integrate+page:1+mid:qczmyzr676pgmaaw+state:results
but no one answered that request that I can tell. I'm having the same
problem. I'm having problems passing arguments
On Thu, Apr 9, 2009 at 12:42 PM, Jason Rupert jasonkrup...@yahoo.com wrote:
Related to the posting below, by any chance is there a Template Engine
package for R?
http://en.wikipedia.org/wiki/Template_processor
This may make this type of editing much easier? Maybe...
Have you tried the
Jonas Weickert wrote:
Hi,
I want to do a biexponential Fit, i.e.
y ~ A1*exp(k1*x) + A2*exp(k2*x)
Is this possible? I tried nls() but it stopped with several (different)
errors. I'm using y and x as simple vectors and the formula for nls()
exactly as mentioned above.
Yes, it is possible,
Hi,
I had a similar problem, and I took the direction of squeezing the
output into a minipage, e.g.:
...
@
\begin{minipage}[c]{0.6\textwidth}
fig=TRUE, echo=FALSE=
plot(...)
abline(...)
@
\end{minipage}
...
HTH,
Gabriele Franzini
ICT Applications Manager
Nerviano Medical Sciences SRL
Hi all,
I would like to
1. Read in an arcmap image into R (I can export pretty much any type of image
jpeg, bitmap etc from arcmap)
2. Use R to create a nice colour legend in the plot
First of all, Is this possible?
So far I'm stuck on point 1. I have tried read.pnm() from pixmap and
Hi,
I want to do a biexponential Fit, i.e.
y ~ A1*exp(k1*x) + A2*exp(k2*x)
Is this possible? I tried nls() but it stopped with several (different)
errors. I'm using y and x as simple vectors and the formula for nls()
exactly as mentioned above.
Thanks a lot!
Jonas
try this:
merge(df1, df2, by.x='codetot',by.y='codetoto', all=TRUE)
codetot popcode.x p3need popcode.y areasec
1 BCPy01-01-1 BCPy01-01 100. BCPy01-01 0.5089434
2 BCPy01-01-2 BCPy01-01 100. BCPy01-01 0.6246381
3 BCPy01-01-3 BCPy01-01 100. BCPy01-01 0.4370059
4
Related to the posting below, by any chance is there a Template Engine
package for R?
http://en.wikipedia.org/wiki/Template_processor
This may make this type of editing much easier? Maybe...
Thanks again.
--- On Wed, 4/8/09, Jason Rupert jasonkrup...@yahoo.com wrote:
From: Jason Rupert
On Thu, Apr 9, 2009 at 9:01 AM, Maria I. Tchalakova
maria.tchalak...@gmail.com wrote:
I am trying to install a program based on R, but I am receiving the
following error message:
r...@darkstar:/home/maria/UCS# perl System/Install.perl
Error: Can't run the R interpreter (/usr/local/bin/R).
Jason Rupert wrote:
Related to the posting below, by any chance is there a Template Engine package for R?
Indeed there is. It's called brew:
http://cran.r-project.org/web/packages/brew/index.html
Jeff
http://en.wikipedia.org/wiki/Template_processor
This may make this type of editing much
Thank you! Now it's working.
Peter Dalgaard schrieb:
Jonas Weickert wrote:
Hi,
I want to do a biexponential Fit, i.e.
y ~ A1*exp(k1*x) + A2*exp(k2*x)
Is this possible? I tried nls() but it stopped with several
(different) errors. I'm using y and x as simple vectors and the
formula for
Good morning to all,
I should find the zero of a specific function,
func(x,f.
me,c,t)=x+f.me*c-t
where 'c' and 't' are constants and 'f.me' is an other
function of 'x'.
Actually, I am interested in considering 'f.me' as an
expression().
Namely,
uniroot.me-function(f.me,c,t){
Hi Paul,
I am using Slackware 12.0.0.
Maria
On Thu, Apr 9, 2009 at 2:35 PM, Paul Smith phh...@gmail.com wrote:
On Thu, Apr 9, 2009 at 9:01 AM, Maria I. Tchalakova
maria.tchalak...@gmail.com wrote:
I am trying to install a program based on R, but I am receiving the
following error message:
On 09/04/2009 8:07 AM, Richard Morey wrote:
Hi everyone,
I saw this problem dealt with here:
http://markmail.org/search/list:r-project?q=integrate#query:list%3Ar-project%20integrate+page:1+mid:qczmyzr676pgmaaw+state:results
but no one answered that request that I can tell. I'm having the same
Hi Christian,
I've been having this problem as well. There are bug reports about
this (one of them mine):
http://biostat.mc.vanderbilt.edu/trac/Hmisc/ticket/25
http://biostat.mc.vanderbilt.edu/trac/Hmisc/ticket/28
so hopefully the developers are aware of the problem and will address
it in the next
Hi all,
A simple question which I donât seem to be able to solve:
I want to make a data.frame of 360 rows and 94228 column with only zeroâs
without having to type all these zeroâs ;-)
What is the easiest method?
Thanks,
Naomi
Disclaimer: De
Simon Pickett simon.pickett at bto.org writes:
But my code returns an error
x-read.pnm(C:/Documents and Settings/simonp/My Documents/Simon BTO/RELU/GIS
data/ten km areas in analysis.bmp)
Error in pm.readmagicnumber(con) : Not a PNM format file
Error message seems quite clear: bmp a
hi Ista,
i did load xtable() before because i was comparing if using it was any
different, but still i got the same problem.
I hope somebody can give us a solution or some tips soon!
thanks
c
---
Christian Salas
well, you can first create a matrix and then turn into a data frame, e.g.,
mat - matrix(0, 5, 10)
as.data.frame(mat)
I hope it helps.
Best,
Dimitris
Duijvesteijn, Naomi wrote:
Hi all,
A simple question which I don’t seem to be able to solve:
I want to make a data.frame of
Hi Bob,
I have tried several times to load biOps package after reading the posts in
this archive regarding the necessity of placing these two libs in the PATH
(libjpeg62.dll and libtiff3.dll). I have tried locating the libs in several
directories that should have worked, but I still get
Hello Rusers,
I have worked on a R Wiki page for solutions in exporting R graphs,
especially, the often-asked questions:
- How can I export R graphs in vectorized format (EMF) for inclusion in
MS Word or OpenOffice outside of Windows?
- What is the best solution(s) for
Hello,
I am working on the model of seemingly unrelated regression. I came across
with the error message:
Log determinant of residual covariance: NA
Warning messages:
NAs generated in: log(x)
I have three linear models which contain 21 explanatory variables and there
are about 300 data
Thanks, Gad. Lisa's professor knows the glmnet authors, so we will forward
this request directly to them. Take care!
Dan
From: Gad Abraham gabra...@csse.unimelb.edu.au
Cc: r-help@r-project.org; lp...@bu.edu
Sent: Tuesday, April 7, 2009 10:26:26 PM
Subject:
livia wrote:
Hello,
I am working on the model of seemingly unrelated regression. I came across
with the error message:
Log determinant of residual covariance: NA
Warning messages:
NAs generated in: log(x)
I have three linear models which contain 21 explanatory variables and
Hi,
I am not sure if R-help is the right forum for my question. If not,
please let me know.
I have to do some discriminant validity tests with some constructs. I
am using the method of doing a CFA constraining the correlation of a
pair of the constructs to 1 and comparing the chi-square of this
You can export the Maple code to C or Fortran. I actually found it easier
to export it to Fortran and then use a text editor to change Fortran's
assignment ='s to R's -. After additional tweaks for R, you can convert
the script into an R function.
Joseph F. Lucke
Senior Statistician
Hi all,
I apologize in advance for the length of this post, but I wanted to make sure I
was clear.
I am trying to merge two dataframes that share a number of rows (but some are
unique to each data frame). Each row represents a subject in a study. The
problem is that sex is coded differently
On Thu, 9 Apr 2009 mohinder_da...@yahoo.com wrote:
Hi all,
I apologize in advance for the length of this post, but I wanted to make sure
I was clear.
Good strategy.
I tried this:
myFrame2$newSex - ifelse(myFrame2$newSex ==1 || myFrame2$newSex == 2,
myFrame2$newSex, 0)
First, you
I forgot. You can get the Bessel functions from Robin Hankin's GSL
package.
R. K. S. Hankin 2006. Introducing gsl, a wrapper for the Gnu Scientific
Library. Rnews 6(4):24-26
Joseph F. Lucke
Senior Statistician
Research Institute on Addictions
University at Buffalo
State University of New
I would suggest use the same column names for the common columns. Say, use
codetot for both df1 and df2. Then you don't even have to specify by.x or
by.y, merge will do it automatically.
merge(df1,df2, all=TRUE).
Otherwise you have to
Using algorithm=plinear as shown by example below makes
sum-of-exponentials fitting problems better conditioned.
A1 - 1
A2 - 2
k1 - -.5
k2 - -2
x - seq(1,10,length=200)
y - A1*exp(k1*x) + A2*exp(k2*x) + .001*rnorm(200)
aa - nls(y~cbind(exp(k1*x), exp(k2*x)), algorithm=plinear,
Hello,
I wrote the function below and have the problem, that the text bit returns
only a trimmed version (686 chars as far as I can see) of the content under
the fetchPeaks condition.
Any hunches why that might be?
Thanks for pointer, Joh
xmlEventParse(fileName,
list(
Richard,
Your function f() is already vectorized, and it works well (see below).
Therefore, you don't need to create f2().
f = function(x, const) 2^x + const
testval = 2
integrate(f, 0.5, 1, const=testval)
1.845111 with absolute error 2.0e-14
Ravi.
Thank you for your help!
--- On Thu, 4/9/09, Thomas Lumley tlum...@u.washington.edu wrote:
From: Thomas Lumley tlum...@u.washington.edu
Subject: Re: [R] better way of recoding factors in data frame?
To: mohinder_da...@yahoo.com
Cc: r-help@r-project.org
Date: Thursday, April 9, 2009, 2:10
Gabe:
Don't be silly. lme is not appropriate here --you have only one stratum!.
Use lm and you'll see what's going on. It also looks like you should do some
reading up on linear models. VR's MASS or Peter Dalgaard's INTRO to
Statistics with R might be places to start.
Incidentallyy, Version
Richard,
I didn't read the last part of your email that you do want to Vectorize your
function. Sorry about that.
Here is a solution using sapply to vectorize your function.
f - function(x, const) 2^x + const
f2 - function(x, ...) sapply(x, function(x) f(x, ...) )
integrate(f2, 0.5, 1,
Dear R community
Hope all of you are fine. I have a question regarding the an error message.
Actually, I am trying to generate classification trees using tree package. It
works well but for some datasets e.g., wine, yeast, boston housing etc. it
gives an error message.
Error in tree(V14 ~ .,
Dear R users,
thank for help. SORRY I am seeing in google a maillist but I didn't find a
solution for my problem
I have several txt file (with the same number of column and HEADER) to merge
together, this is an example:
Tableanalysis_firenze_10.txt
Tableanalysis_firenze_20.txt
On 09/04/2009 10:19 AM, Ravi Varadhan wrote:
Richard,
Your function f() is already vectorized, and it works well (see below). Therefore, you don't need to create f2().
He did say that this was a simplified example.
The problem appears to be in Vectorize, which uses match.call() to get
I would use 'lapply' to create a list of the matrices:
result - lapply(c(10,20,30,40,50), function(.num){
do.call(cbind, lapply(c('Tableanalysis_firenze',
'Tableanalysis_siena', 'Tableanalysis_lucca'), function(.file){
read.table(sprintf(%s_%d.txt, .file, .num), header=TRUE)
}))
What is zoo? I cannot find anything about zoo int he documentation.
I did try as.ts() see below.
Thank you,
Alex van der Spek
have you tried using zoo and then using the function as.ts()
On Wed, Apr 8, 2009 at 11:56 AM, am...@xs4all.nl wrote:
Converting dates is getting stranger still. I
At 04:43 AM 4/9/2009, Tom Backer Johnsen wrote:
Peter Dalgaard wrote:
Mike Lawrence wrote:
Looks like that code implements a non-exhaustive variant of the
randomization test, sometimes called a permutation test.
Isn't it the other way around? (Permutation tests can be
exhaustive by looking
Hi All,
I am trying to fit a linear regression between the tool speed and the tool
type ( type A, Type B , Type C) where the response is the tool speed and the
regressor is the tool type.
I introduced two dummy variables X1 and X2 as follows
X1 X2
Tool A 0 0
Tool B 0 1
Thank you Philippe.
That is very helpful.
Philippe Grosjean wrote:
Hello Rusers,
I have worked on a R Wiki page for solutions in exporting R graphs,
especially, the often-asked questions:
- How can I export R graphs in vectorized format (EMF) for inclusion in
MS Word or
HI Wudd Wudd -- not really answering your question, but it might pay
to refactor some of your R code first. For instance
for(j in 2:nrow(ranklist)){
phit - sum(rep(1/Ns, sum(ranklist[1:j,2]==1)))
pmiss - sum(rep(1/(N-Ns), sum(ranklist[1:j,2]==0)))
if((phit-pmiss)score[i])
Hi Johannes
I would guess that the trimming of the text occurs because
you do not specify trim = FALSE in the call to xmlEventParse().
If you specify this, you might well get the results you expect.
If not, can you post the actual file you are reading so we can
reproduce your results.
D.
Hello, very basic question from a user who is baffled by the workings of
computers in general
When logging off R, a dialog box asked if I wanted to save my log, I chose
yes. Then I noticed that the following message appeared in the Command Window
Error in saveLog(currentLogFileName) :
Hello,
I want to run the following commands as a script(.r or .bat) and save the
output in an external file through Windows OS.
data-read.csv(file=wgatever.csv, head=TRUE, sep=,)
summary(data$SQFT)
hist(data$STAMP)
hist(data$STAMP, col='blue')
hist(data$SHIP, col='blue')
How could I do
This is just two suggestions and a guess.
a) When you desire the information from sessionInfo ,you need to type :
sessionInfo() # not sessionInfo
... results come from function calls and all you got was the
sessionInfo code produced by the implicit print function to which you
gave the
If you just entered sink(), it would turn *off* sink-ing. You need to
tell R where to write the output that would otherwise go to the
console. (Or if you did something like that then you need to tell us
exactly what you did try.)
?sink # e.g. sink(file=... /test.txt) with correct path
If someone can explain this odd behavior I'd appreciate it.
I have a data.frame Cell.ave (attached and created via dput(Cell.ave,
Cell.ave)
which contains three columns of parameters year, month and AveRain.
I need to subset the data.frame by months such that
DrySeaonMonths are 1,2,3,4, 11,
On Thu, Apr 9, 2009 at 1:39 PM, steve_fried...@nps.gov wrote:
I have a data.frame Cell.ave (attached and created via dput(Cell.ave,
Cell.ave)
I'm afraid your attachment didn't make it into the r-help mail.
Mailing list policy forbids binary attachments other than PS and PDF,
but should be
steve_fried...@nps.gov wrote:
If someone can explain this odd behavior I'd appreciate it.
I have a data.frame Cell.ave (attached and created via dput(Cell.ave,
Cell.ave)
which contains three columns of parameters year, month and AveRain.
I need to subset the data.frame by months such that
Dear Maria,
this is quite probably my faul, in some way. The UCS software has
been abandoned a bit recently, as I'm planning to rewrite it into a
pure R package. On the other hand, I still use the software
occasionally, so it should work with recent R versions.
I am trying to install
Muhammad Azam wrote:
Dear R community
Hope all of you are fine. I have a question regarding the an error message. Actually, I
am trying to generate classification trees using tree package. It works well
but for some datasets e.g., wine, yeast, boston housing etc. it gives an error message.
My apologies for sending a binary file. I was following advice from
someone (from this list) who insisted I send data via dput. I guess that
is frown upon.
Anyway. here is a Cellave.txt file.
Stavros, here is the output following your suggestion.
WetMonths - Cell.ave[Cell.ave$month = 5
Ivan,
I recently put together the sem.additions package over at R forge in
part for just such a multiple model problem. THere are a variety of
methods that make it easy to add/delete links that could be automated
with a for loop and something from the combn package, I think.
David, thank you for your helpful reply.
a) The sessionInfo goof is actually kind of enlightening. I'm assuming that
the purpose of adding the () symbols is to tell R that sessionInfo is a
function to be invoked, and leaving () empty says to use default arguments?
b) In the R GUI, I end my
I first I saved the following commands in a whatever.r file.
data-read.csv(file=whatever.csv, head=TRUE, sep=,)
summary(data$SQFT)
hist(data$STAMP)
hist(data$STAMP, col='blue')
hist(data$SHIP, col='blue')
then I clicked File Menu- source and chose whatever.r, it runs the
commands and produces
On Thu, Apr 9, 2009 at 2:05 PM, steve_fried...@nps.gov wrote:
WetMonths - Cell.ave[Cell.ave$month = 5 and Cell.ave$month = 11,]
Error: unexpected symbol in WetMonths - Cell.ave[Cell.ave$month = 5
and Cell.ave$month = 11,]
a) you are comparing with the *string* 5, not the *number* 5 (as I
On Apr 9, 2009, at 2:21 PM, Gagan Pabla wrote:
I first I saved the following commands in a whatever.r file.
data-read.csv(file=whatever.csv, head=TRUE, sep=,)
#this is where you put the first sink:
sink(comm.docx) # but it is not going to be in .docx format, but
in text format.
On Thu, 9 Apr 2009 steve_fried...@nps.gov wrote:
My apologies for sending a binary file. I was following advice from
someone (from this list) who insisted I send data via dput. I guess that
is frown upon.
dput() creates a text file, not a binary file. The problem is probably that
your
On Apr 9, 2009, at 2:17 PM, Prew, Paul wrote:
David, thank you for your helpful reply.
a) The sessionInfo goof is actually kind of enlightening. I'm
assuming that the purpose of adding the () symbols is to tell R
that sessionInfo is a function to be invoked, and leaving ()
empty says
Hello,
I am fairly new to R, but I am not new to programming at all. I want
to generate random clusters in a 1,000x1,000 box such that I end up
with a total of about 2,000 points. Once done, I need to export the
X,Y coordinates of the points.
I have looked around, and it seems that the
I have some bits stored like the following variable nn
(nn - c(1, 0, 0, 1, 0, 1,0))
[1] 1 0 0 1 0 1 0
not in the format of
1001010
and I need to convert them to numbers in base 10. What's an easy way to do it?
TIA,
Gang
__
R-help@r-project.org
Dear Gang,
Try this:
nn - c(1, 0, 0, 1, 0, 1,0)
paste(nn,sep=,collapse=)
See ?paste for more information.
HTH,
Jorge
On Thu, Apr 9, 2009 at 5:23 PM, Gang Chen gangch...@gmail.com wrote:
I have some bits stored like the following variable nn
(nn - c(1, 0, 0, 1, 0, 1,0))
[1] 1 0 0 1 0 1 0
I suspect that Gang was looking for something along the lines of:
sum(2 ^ (which(as.logical(rev(nn))) - 1))
[1] 74
You might also want to look at the digitsBase() function in Martin's
sfsmisc package on CRAN.
HTH,
Marc Schwartz
On Apr 9, 2009, at 4:34 PM, Jorge Ivan Velez wrote:
Dear
Alternatively
(nn - c(1, 0, 0, 1, 0, 1,0))
[1] 1 0 0 1 0 1 0
sum(2^(0:(length(nn)-1))*nn)
but of course it depends if your bits are stored big-endian or little-endian
so you might want
sum(2^((length(nn)-1):0)*nn)
I like Marc's approach better (certainly more elegant). If you have the
Yes, such a concise and elegant solution!
Thanks a lot!
Gang
On Thu, Apr 9, 2009 at 5:51 PM, Marc Schwartz marc_schwa...@me.com wrote:
I suspect that Gang was looking for something along the lines of:
sum(2 ^ (which(as.logical(rev(nn))) - 1))
[1] 74
You might also want to look at the
Hi,
I am trying to display / print certain columns in my data frame that share
certain condition (for example, part of the column name). I am using for
loop, as follow:
# below is the sample data structure
all.data - data.frame( NUM_A = 1:5, NAME_A = c(Andy, Andrew, Angus,
Alex, Argo),
Le jeudi 09 avril 2009 à 15:04 +0200, Philippe Grosjean a écrit :
Hello Rusers,
I have worked on a R Wiki page for solutions in exporting R graphs,
especially, the often-asked questions:
- How can I export R graphs in vectorized format (EMF) for inclusion in
MS Word or OpenOffice
Gerard M. Keogh wrote:
Dear all,
The standard call to ARIMA in the base package such as
arima(y,c(5,0,0),include.mean=FALSE)
gives a full 5th order lag polynomial model with for example coeffs
Coefficients:
ar1ar2 ar3 ar4 ar5
Hi everyone, I am running a monte carlo and am getting an error that I
haven't the slightest clue where to begin figuring it out. The error
is as follows:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
0 (non-NA) cases
In addition: Warning message:
In ltm.fit(X,
On Apr 9, 2009, at 5:01 PM, Jason L. Simms wrote:
Hello,
I am fairly new to R, but I am not new to programming at all. I want
to generate random clusters in a 1,000x1,000 box such that I end up
with a total of about 2,000 points. Once done, I need to export the
X,Y coordinates of the
Jarret,
Look:
install.packages(sem.additions, repos=http://R-Forge.R-project.org;)
Warning message:
package ‘sem.additions’ is not available
Best,
Iuri.
On Thu, Apr 9, 2009 at 3:10 PM, Jarrett Byrnes byr...@msi.ucsb.edu wrote:
Ivan,
I recently put together the sem.additions package over
install.packages(sem-additions,repos=http://R-Forge.R-project.org;)
Sorry, it's sem-additions on r-forge. Not sem.additions, which is
what I had originally called it. But they won't take . in the name of
a package.
On Apr 9, 2009, at 4:07 PM, Iuri Gavronski wrote:
Jarret,
Look:
On 09-Apr-09 22:53:51, Brendan Morse wrote:
Hi everyone, I am running a monte carlo and am getting an error that I
haven't the slightest clue where to begin figuring it out. The error
is as follows:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)
:
0 (non-NA)
Jarret,
I've donwloaded the zip file and installed, but maybe have lost some
pre-req check. I have manually installed sna.
Anyway, which would be the approach you suggest? Making (using my
example) 4 different models, one for each construct, then use
combine.models and add.to.models to create
Hello,
Thanks for your note. I recognize that the points per cluster is
random, and also that it is possible to set the mean number of points
per cluster through the function. What I was hoping was that I could
specify a maximum number of points overall across all clusters, but
conceptually I
Sure, something like that. Store each model as an element of a list,
and then use something like
for(i in 1:4){
indices-combn(1:4, i)
for (j in 1:length(indices[1,])){
new.model-combine.models(model.pieces[ indices[,j] ] )
#code for analysis
}
}
We would like to invite you to the Los Angeles area R user group's first
meeting. This group is aimed to bring together practitioners (from
industry and academia alike) in order to exchange knowledge and
experience in solving data analysis/statistical problems by using R.
More information about
Try:
clust - rMatClust(10, 0.05, 50)
plot(clust)
Y - rThomas(10, 0.05, 50)
plot(Y)
On Apr 9, 2009, at 7:28 PM, Jason L. Simms wrote:
Hello,
Thanks for your note. I recognize that the points per cluster is
random, and also that it is possible to set the mean number of points
per cluster
Hello,
I have a question regarding how to subset/select parts of a data
frame (matrix) in order to plot data associated only with this subset.
Specifically I have a large data frame in which one column contains ID
values (dates), and other columns contain data I would like to plot
1 - 100 of 104 matches
Mail list logo