Thank you very much!
This is my adapted script and now it is OK:
>lapply(Dataset[3:17], function(x) wilcox.test(x ~ X2,
alternative="two.sided", data=Dataset))
But it is possible to get results more compact, similar to a table?
Iurie Malai
Moldova Pedagogical State University
Steven McKinney
Thank you!
Here is my adapted script:
>lapply(Dataset[3:17], function(x) wilcox.test(x ~ X2,
alternative="two.sided", data=Dataset, subset = X2 <= 2))
but in R I have nothing, and in R Commander I have this error message:
ERROR: grouping factor must have exactly 2 levels
My grouping factor is
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Iurie Malai
> Sent: Friday, October 23, 2009 10:46 AM
> To: r-help@r-project.org
> Subject: [R] How to apply the Wilcoxon test to a hole table at once?
>
>
> Hi,
>
> I have a
On Oct 23, 2009, at 8:13 PM, Richard R. Liu wrote:
I'm running R 2.9.2 build 5464 on OS X 10.5.8. Having encountered
memory allocation problems, I ran the problematic code in R64, the
64-bit version of the same build. When I attempt to load openNLP I
receive the error message that the 32
dolberdinho wrote:
>
> Hi,
>
> I'm having trouble running a script within winbugs when calling winbugs
> from R.
> Here are a few lines from the winbugs log:
>
> display(log)
> check(C:\DOCUME~1\michael\LOCALS~1\Temp\RtmpjKnHMu\mm_TO_bugs9bc21e.txt)
> cannot open
> C:\DOCUME~1\michael\LOCALS~
Richard Liu wrote:
>
> I'm running R 2.9.2 build 5464 on OS X 10.5.8. Having encountered
> memory allocation problems, I ran the problematic code in R64, the 64-
> bit version of the same build. When I attempt to load openNLP I
> receive the error message that the 32-bit version that I h
On Fri, Oct 23, 2009 at 7:06 PM, Duncan Murdoch wrote:
> Gabor Grothendieck wrote:
>>
>> On Fri, Oct 23, 2009 at 2:52 PM, Duncan Murdoch
>> wrote:
>>
>>>
>>> On 10/23/2009 2:49 PM, Andrew Yee wrote:
>>>
Thanks everyone for the responses. As a suggestion, wouldn't it be
useful,
>>>
On Oct 23, 2009, at 2:08 PM, whizvast wrote:
Hi, useR-
I am connecting to Oracle database using RODBC, but keep getting
this error
message:
library(RODBC)
channel <- odbcConnect(dsn="abc", uid="abc", pwd="abc",
case='oracle')
Warning in odbcDriverConnect(st, ...) :
[RODBC] ERROR: stat
I'm running R 2.9.2 build 5464 on OS X 10.5.8. Having encountered
memory allocation problems, I ran the problematic code in R64, the 64-
bit version of the same build. When I attempt to load openNLP I
receive the error message that the 32-bit version that I had been
using does not run in R
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Fang (Betty) Yang
> Sent: Friday, October 23, 2009 11:06 AM
> To: R-help@r-project.org
> Subject: [R] extract day or month as in Splus
>
> Dear all,
>
>
>
> I am writing to a
Michael -
I think the easiest way is to use the melt function
from the reshape package:
x
feature 5637 1321N1
1 feature1 -0.56 -0.93
2 feature2 -0.91 -0.94
3 feature3 0.44 -0.25
library(reshape)
melt(x,id.var='feature',variable_name='cell.line')
feature cell.line value
1 feature
Hello,
I am a newbie to the lattice package in R, and I'm trying to make a plot using
the xyplot function. I have repeated measures data (2 conditions) for two
different groups of subjects (teens and adults).
So far, I've made a basic graph using xyplot(y ~x, group=subnum, data=mydata,
type="
.. Adding to my original post...
OK, here's a little function which demonstrates the behavior I described.
Try it with rem = FALSE to see the annotation, then TRUE to see the
annotations disappear. What's going on here? Thanks, Bryan
res = runif(50, 0, 100)
fac = rep(c("A", "B"), 50)
df <- data.
Hi,
I'm having trouble running a script within winbugs when calling winbugs from
R.
Here are a few lines from the winbugs log:
display(log)
check(C:\DOCUME~1\michael\LOCALS~1\Temp\RtmpjKnHMu\mm_TO_bugs9bc21e.txt)
cannot open
C:\DOCUME~1\michael\LOCALS~1\Temp\RtmpjKnHMu\mm_TO_bugs9bc21e.txt
data(
I have read that one ,I want to this method to be used to my data.but I donot
know how to put my data into R.
James W. MacDonald wrote:
>
>
>
> bbslover wrote:
>>
>>
>> Steve Lianoglou-6 wrote:
>>> Hi,
>>>
>>> On Oct 22, 2009, at 2:35 PM, bbslover wrote:
>>>
Usage
data(gasoline)
>
Hi,
I have a data.frame that looks something like this.
feature 5637 1321N1
feature1 -0.568750616 -0.934748758
feature2 -0.913080902 -0.941455172
feature3 0.442477294 -0.257921866
I want to change it to look like this.
feature cell.line value
feature15637 -0.568
Hi, useR-
I am connecting to Oracle database using RODBC, but keep getting this error
message:
> library(RODBC)
> channel <- odbcConnect(dsn="abc", uid="abc", pwd="abc", case='oracle')
Warning in odbcDriverConnect(st, ...) :
[RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver
M
Dear all,
I am writing to ask for help to find R code to do the same thing as the
following Splus code:
dates <- c("02/27/1992", "02/27/1992", "01/14/1992", "02/28/1992",
"02/01/1992")
timeDate(as.character(dates),in.format="%m/%d/%Y","%a")
[1] Thu Thu Tue Fri Sat
Could anyone give me
Tord: The logistic zero-inflation portion of the zeroinfl()
implementation of ZIP or ZINB predict the probability of 0 rather than the
probability of 1 (>0 counts) so the signs of the coefficients are often
reversed from how you would expect them to be if you had just performed a
logistic reg
Sweet Jesus ... I just read what I wrote earlier ...
On Oct 23, 2009, at 2:57 PM, Steve Lianoglou wrote:
If this is something you just want to use on your own functions that
are set to `debug`, why not just make write a debug wraps the
base::debug and does some keeps track of which functions
On Friday 23 October 2009, Frank E Harrell Jr wrote:
> Dylan Beaudette wrote:
> > Hi,
> >
> > I have fit a series of ols() models, by group, in this manner:
> >
> > l <- ols(y ~ rcs(x, 4))
> >
> > ... where the series of 'x' values in each group is the same, however
> > knots are not always identic
Gabor Grothendieck wrote:
On Fri, Oct 23, 2009 at 2:52 PM, Duncan Murdoch wrote:
On 10/23/2009 2:49 PM, Andrew Yee wrote:
Thanks everyone for the responses. As a suggestion, wouldn't it be
useful,
that when you run isdebugged() without any parameters, it would just
report
back the fun
Hi Joel,
The answers you've received already, suggesting subscripting, are good
because they strengthen your understanding of R subscripting. However,
sometimes these methods produce "strange" column names. So, what I usually
do is use the subset command. You don't have to provide anything for the
Dylan Beaudette wrote:
Hi,
I have fit a series of ols() models, by group, in this manner:
l <- ols(y ~ rcs(x, 4))
... where the series of 'x' values in each group is the same, however knots
are not always identical between groups. The result is a table of 'coefs'
derived from the ols objects
Hi,
I have fit a series of ols() models, by group, in this manner:
l <- ols(y ~ rcs(x, 4))
... where the series of 'x' values in each group is the same, however knots
are not always identical between groups. The result is a table of 'coefs'
derived from the ols objects, by group:
group Inte
Is there a way to have the distance between label and axis
adjusted automatically? This is interesting in particular for the
y-axis, when it is not known in beforehand how many digits the
numbers will have. It may happen then, that numbers and label
overlap.
All examples that I found work by e
Ravi Varadhan wrote
>
>I have heard this (i.e. only head-to-head comparisons are valid) and various
>other folklores about AIC and BIC based model selection before, including
>one that these information criteria are only applicable for comparing two
>nested models.
>
>Where has it been demonstra
I believe such a statement (AIC applicable to nested models only) appears
in
Brian Ripley. 2004. Selecting amongst large classes of models. Pages 155–170
in N. Adams,
M. Crowder, D. J. Hand, and D. Stephens, editors. Methods and Models in
Statistics:
In Honour of Professor John Nelder, FRS.
sdanzige wrote:
sdanzige wrote:
Thank you, but the regular expression example doesn't seem to work
correctly.
I wrote a regular expression that does seem to work, so I'll post it here
for anyone else that needs it.
labs<-levels(df$p_bin)
cbind(lower=as.numeric(sub("[[(]","",sub(",.*","",l
Ravi Varadhan wrote:
Frank,
I have heard this (i.e. only head-to-head comparisons are valid) and various
other folklores about AIC and BIC based model selection before, including
one that these information criteria are only applicable for comparing two
nested models.
Where has it been demons
Frank,
I have heard this (i.e. only head-to-head comparisons are valid) and various
other folklores about AIC and BIC based model selection before, including
one that these information criteria are only applicable for comparing two
nested models.
Where has it been demonstrated that AIC/BIC cann
Hi,
It looks like you are potentially dealing with two separate issues.
1) Access - Mysql has very find grained permissions as to who can access
what and from where. You need to make sure that your username in mysql
is allowed to access the database/tables from your location.
2) Corruption
At 4:57 AM -0700 10/23/09, bbslover wrote:
Steve Lianoglou-6 wrote:
Hi,
On Oct 22, 2009, at 2:35 PM, bbslover wrote:
Usage
data(gasoline)
Format
A data frame with 60 observations on the following 2 variables.
octane
a numeric vector. The octane number.
NIR
a matrix with 401 columns
Hi there,
I have been using RMySql for some time now without any problems until 2 weeks
ago... Since then, I am only able to access some tables from within the network
where the db is located. When outside, I can't. I can access some of the
tables, but not all of them. This is true wether I us
Ravi Varadhan wrote:
The stepAIC() function in "MASS" can be used, with k = log(n), to implement
your suggestion of "quasi-Bayesian" stepwise selection using the BIC
criterion.
Ravi.
Although many statisticians use BIC otherwise, it was only designed to
compare two pre-specified models.
Fra
Dear all,
I want to report the results of discriminant analysis in a way that
would enable the readers to use my results (functions) for
classification of their own cases. For this it should suffice to
provide discriminant functions along with the cut-off values for
distinguishing the groups. Howe
Hi,
I have a data set:
> Dataset
X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17
1 user1 m 22 19 28 24 12 18 9 7 4 5 4 7 5 7 9
2 user2 f 25 19 23 18 18 15 6 8 6 6 7 10 7 7 7
3 user3 f 28 21 24 18 15 12 10 6 7 9 5 10 5 9 5
4 us
Hi,
I found the reason. By default it puts a condition for x >= 0. Is
there a way to get rid of this condition?
Medha
On Fri, Oct 23, 2009 at 2:34 PM, Medha Atre wrote:
> Hi,
>
> I am using R in one of my courses. I am trying to use R's linprog
> package to solve to formulate 2-class classific
On Fri, Oct 23, 2009 at 2:52 PM, Duncan Murdoch wrote:
> On 10/23/2009 2:49 PM, Andrew Yee wrote:
>>
>> Thanks everyone for the responses. As a suggestion, wouldn't it be
>> useful,
>> that when you run isdebugged() without any parameters, it would just
>> report
>> back the functions that are be
On Fri, Oct 23, 2009 at 10:59 AM, Steve Lianoglou
wrote:
> Hi,
>
> On Oct 23, 2009, at 11:36 AM, Peng Yu wrote:
>
>> The help on mahalanobis {stats} does not include any reference. I'm
>> interested in understand why Mahalanobis is defined in its current way
>> and how to use it. Could somebody po
Hi,
On Oct 23, 2009, at 2:39 PM, Gabor Grothendieck wrote:
On Fri, Oct 23, 2009 at 2:34 PM, Duncan Murdoch
wrote:
On 10/23/2009 2:27 PM, Gabor Grothendieck wrote:
I have often wanted to get such a list as well without having to
write
code myself. If a function which automatically iter
The stepAIC() function in "MASS" can be used, with k = log(n), to implement
your suggestion of "quasi-Bayesian" stepwise selection using the BIC
criterion.
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor, The Ce
Hi,
I have a process using svm from the e1071 library. it works.
I want to try using the KSVM library instead. The same data used wiht
e1071 gives me an error with KSVM.
My data is a data.frame.
sample code:
svm_formula <- formula(y ~ a + B + C)
svm_model <- ksvm(formula, data=train_data
On 10/23/2009 2:49 PM, Andrew Yee wrote:
Thanks everyone for the responses. As a suggestion, wouldn't it be useful,
that when you run isdebugged() without any parameters, it would just report
back the functions that are being flagged for debugging?
Could you give an example of what the answer
Thanks everyone for the responses. As a suggestion, wouldn't it be useful,
that when you run isdebugged() without any parameters, it would just report
back the functions that are being flagged for debugging?
Andrew
On Fri, Oct 23, 2009 at 2:12 PM, Yihui Xie wrote:
> Oops... I forgot to mention
On Fri, Oct 23, 2009 at 2:34 PM, Duncan Murdoch wrote:
> On 10/23/2009 2:27 PM, Gabor Grothendieck wrote:
>>
>> I have often wanted to get such a list as well without having to write
>> code myself. If a function which automatically iterated over all
>> possible objects and listed out the ones t
Hi,
I am using R in one of my courses. I am trying to use R's linprog
package to solve to formulate 2-class classification problem as Linear
programming problem.
For my formulation, I need to set to "cvec" to all 0s.
I know the points are linearly separable so an optimal solution "x"
does exist,
On 10/23/2009 2:27 PM, Gabor Grothendieck wrote:
I have often wanted to get such a list as well without having to write
code myself. If a function which automatically iterated over all
possible objects and listed out the ones that being debugged were
available in the core it would be useful. E
Hello List,
I am fitting a logistic regression model for some presence/absence type
data. I have numerous covariates I am fitting to explain variation, and I
am using AIC to rank models. However, I would like to report how well my
best model (s) do at prediction. I have looked over the archive
The BIC (Raftery) can be used for quasi-Bayesian model selection, but it's
not stepwise. Ntzoufras shows how to use WinBUGS to conduct Bayesian
model selection, but again it's not stepwise
Ntzoufras, I. (2002), 'Gibbs variable selection using BUGS', Journal of
Statistical Software 7(7), 1--1
I have often wanted to get such a list as well without having to write
code myself. If a function which automatically iterated over all
possible objects and listed out the ones that being debugged were
available in the core it would be useful. Even if its slow this would
be used at debug time an
Oops... I forgot to mention that 'envir' (or 'pos') should be
specified in ls()/get() in my last reply if you are looking for
debugged functions in environments other than ".GlobalEnv".
Regards,
Yihui
--
Yihui Xie
Phone: 515-294-6609 Web: http://yihui.name
Department of Statistics, Iowa State Uni
On 10/23/2009 1:28 PM, Andrew Yee wrote:
This is kind of a dumb question: I know you can use isdebugged() to find
out if a specific function is flagged for debugging, but is there a way to
list all the functions that are flagged for debugging?
No, R doesn't keep any master list, it sets a flag
list all objects first; use a loop (explicitly or not) to check
whether (1) your objects are functions (2) functions are debugged
> f = function(x) x
> g = 1
> x = ls()
> debug(f)
> sapply(x[sapply(x, function(i) is.function(get(i)))], isdebugged)
f
TRUE
> undebug(f)
> sapply(x[sapply(x, functi
On 10/23/2009 1:30 PM, slrei...@vims.edu wrote:
> Hello-
>I have run an ANOVA on 4 treatments with unequal sample sizes (n=9,7,10
> and 10). I want to determine where my sig. differences are between
> treatments using a Bonferroni test, and have run the code:
>
> pairwise.t.test(Wk16, Treat
Hello-
I have run an ANOVA on 4 treatments with unequal sample sizes (n=9,7,10 and
10). I want to determine where my sig. differences are between treatments
using a Bonferroni test, and have run the code:
pairwise.t.test(Wk16, Treatment, p.adf="bonf")
I receive an error message stating that
This is kind of a dumb question: I know you can use isdebugged() to find
out if a specific function is flagged for debugging, but is there a way to
list all the functions that are flagged for debugging?
Thanks,
Andrew
[[alternative HTML version deleted]]
_
Yes, a 350Mb data frame is a bit big for 32-bit R to handle conveniently.
As you note, the survey package doesn't yet do database-backed replicate-weight
designs. You can get the same effect yourself without too much work.
First, put the data into a database, such as SQLite. If you have the
One for the ggplot2 gurus...
I have a function which makes a plot just fine if the response vector (res
in the example; fac1 is a factor) has no NA in it. It plots the data, then
makes a little annotation at the bottom with the data counts using:
p <- p + geom_text(aes(x = fac1, y = min(res)
On Thu, 22 Oct 2009, Mura Tamakou wrote:
Dear All,
I have a question regarding the output of survfit() when I supply a Cox model.
Lets say for example:
we observe that the 95% CIs overlap!! How is this possible since the HR for
spiders is significant.
It's perfectly natural.
To a goo
Hi,
Below is the code that is giving me this error message:
#===
#The code below results in error: Error: NA/NaN/Inf in foreign function #call
(arg 1)
#===
A=rep(c(-1,1
Consider a data structure where "header" rows supply ID values (school
and grade in the example below) that are not captured in subsequent rows
df <- read.table(textConnection("
school grade studentid score
101 5 NA NA
NA NA 123 21
NA NA 124 25
201 6 NA NA
NA NA 231 33"), header=TRUE)
close
On Fri, Oct 23, 2009 at 12:10 AM, Peng Yu wrote:
> I found the following document on making R packages. But it is old.
> I'm wondering if there is more current ones and hopefully more
> complete ones.
Friedrich Leisch made an excellent tutorial for making R packages,
with a tutorial that works in
You can change the order of nearly everything just by applying an appropriate
index and assigning to
the original object. Something like
data <- data[,order_of_columns]
Tom
Joel Fürstenberg-Hägg schrieb:
> Hi all,
>
> Probably a simple question, but I just can't find a simple answear in the
>
On Fri, Oct 23, 2009 at 5:02 PM, Dennis Fisher wrote:
> Colleagues,
>
> I wish to execute a task only if a particular file is newer than a second
> file. I can access the file modification dates using file.info()$mtime.
> This yields a time object (? POSIX).
> size isdir
Have a look at your company name and your phone number. Nudge nudge,
wink wink, say no more... /H
On Fri, Oct 23, 2009 at 9:02 AM, Dennis Fisher wrote:
> Colleagues,
>
> I wish to execute a task only if a particular file is newer than a second
> file. I can access the file modification dates us
Barry Rowlingson wrote:
>
> If you're doing anything in a loop that has the potential to fail
> because of singularities or other conditions when your model can't be
> fitted, you need to stick what you are doing in a 'try' clause. This
> lets you trap errors and do something with them.
>
> Pl
Tord Snäll-4 wrote:
>
> Dear all,
> A question related to the following has been asked on R-help before, but
> I could not find any answer to it. Input will be much appreciated.
>
> I got an unexpected sign of the "slope" parameter associated with a
> covariate (diam) using zeroinfl(). It le
Colleagues,
I wish to execute a task only if a particular file is newer than a
second file. I can access the file modification dates using
file.info()$mtime.
This yields a time object (? POSIX).
sizeisdir modemtime
ctime
Hi,
On Oct 23, 2009, at 11:36 AM, Peng Yu wrote:
The help on mahalanobis {stats} does not include any reference. I'm
interested in understand why Mahalanobis is defined in its current way
and how to use it. Could somebody point me a good book on this? I have
looked through a few books, but they
sdanzige wrote:
>
>
> Thank you, but the regular expression example doesn't seem to work
> correctly.
>
>
I wrote a regular expression that does seem to work, so I'll post it here
for anyone else that needs it.
labs<-levels(df$p_bin)
cbind(lower=as.numeric(sub("[[(]","",sub(",.*","",labs)))
Joel -
Suppose the columns are named x1, x2, x3, x4, and x5.
You can use subscripting:
x[c('x2','x4','x1','x3','x5')]
or, to save typing the quotes
subset(x,select=c(x2,x4,x1,x3,x5))
- Phil Spector
Statist
Dieter Menne wrote:
>
>
> It used to be quite tricky, but on popular request Brian Ripley has added
> an example how to extract the intervals using regular expression on the
> bottom of the examples for cut (note:cut in base, not cut2 in Hmisc).
>
>
Thank you, but the regular expression exa
The help on mahalanobis {stats} does not include any reference. I'm
interested in understand why Mahalanobis is defined in its current way
and how to use it. Could somebody point me a good book on this? I have
looked through a few books, but they all give very light explanation
on it.
Hi Pen,
On Oct 23, 2009, at 10:31 AM, Peng Yu wrote:
These two are for windows. I have a linux machine. Are there any other
reference for linux?
The steps are pretty much the same. For instance, in robjhyndman.com
link, you can simply start from step 2 and go on.
Also, the official "Writi
Janke ten Holt wrote:
Tom Gottfried wrote:
Janke,
Janke ten Holt schrieb:
Dear list,
I would like to produce a matrix of plots, where par() is reset after
each plot (see below [simplified] example). When I use layout() to do
so, I seem to also reset the layout. I have not been able to figu
'isi' has only 14 values, 'age' has 31. The help page for
'smooth.basis' says, "argvals: a vector of argument values correspond to
the observations in array 'y'."
I think 'isi' and 'age' should have the same length.
I apologfize if the error message was, uh, cryptic.
Try this:
df1$SMA <- ave(df1$col4, df1$col1, FUN = function(x) c(NA, (head(x,
-1) + tail(x, -1))/2))
It would also be possible to convert it from long form to wide form
using reshape (or read.zoo in the devel version of zoo), convert that
to a zoo series and the use rollapply in the zoo package.
On Fri, Oct 23, 2009 at 3:58 AM, Dieter Menne
wrote:
>
>
>
> sdanzige wrote:
>>
>>
>> I'm using the Hmisc cut2 function to bin a set of data. It produces bins
>> that I like with results like this:
>>
>> [96,270]:171
>> [69, 96): 54
>> [49, 69): 40
>> [35, 49): 28
>> [28, 35): 14
>> [24, 28): 8
Hi Kingsford,
That's exactly what I was looking for!
Thanks.
Mike
On Thu, 22 Oct 2009, Kingsford Jones wrote:
help(gnls, pack=nlme)
hth,
Kingsford Jones
On Thu, Oct 22, 2009 at 4:36 PM, Michael A. Gilchrist wrote:
Hello,
I've been fitting a random effects model using nlme to some data
Peter Dalgaard wrote:
>
> alexander russell wrote:
>> Hello,
>> Mle2 is a little unforthcoming in the matter of standard errors? Is there
>> a
>> way to ask the program to supply standard errors along with estimates in
>> cases when it doesn't print them 'voluntarily'?
>> regards,
>> s
>
> Wha
DF[ ,names(DF)[c(your_preferred_order)]]
-Peter Ehlers
Joel Fürstenberg-Hägg wrote:
Hi all,
Probably a simple question, but I just can't find a simple answear in the older
threads or anywhere else.
I've added some new vectors as columns in a data frame using cbind(). As
they're all put as
Say I want to include the data from Minard's march on Moscow graphic in
a package. They consist of
three data frames, Minard.troops, Minard.cities, Minard.temp.
I've determined that I can document them all in one .Rd file, Minard.Rd,
that starts:
\name{Minard}
\Rdversion{1.1}
\alias{Minard}
These two are for windows. I have a linux machine. Are there any other
reference for linux?
On Fri, Oct 23, 2009 at 12:08 AM, Jorge Ivan Velez
wrote:
> Hi Peng,
> Also, take a look at the following links:
> http://robjhyndman.com/research/Rpackages_notes.pdf
> http://www.biostat.wisc.edu/~kbroman
Hi All,
I know someone has posted similar messages before, but there is
no reply. So I wonder whether there is a way to run a nested logit model in
R. It is in the GEV family; however, the commands fitting GEV don't seem to
work for nested logit. Or maybe I have to write down the log-liklihood
dataframe xx
x1 x2 x3
1 2 5
2 4 1
5 6 0
1 1 2
data.frame(xx$x2,xx$x1,xx$x3)
# or
Awkward but works
--- On Fri, 10/23/09, Joel Fürstenberg-Hägg
wrote:
> From: Joel Fürstenberg-Hägg
> Subject: [R] Change positions of columns in data frame
> To: r-help@r-project.org
> Received:
Hello Lasse,
Why not try this?
(1) Create 20MB PDF from R
(2) use convert command in linux, examples below:
convert -resize 50% <20mbfile.pdf>
convert -resize 75% <20mbfile.pdf>
Ghostscript can help you as well for conversion! Using vector formats
(pdf,ps,eps) are good for this purpose, as op
"If 'fools rush in where angels fear to tread', then Bayesians 'jump' in
where frequentists fear to 'step'..."
Very nice, Chuck! Definitely one for my list of "fortunes".
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant
Hi all,
Probably a simple question, but I just can't find a simple answear in the older
threads or anywhere else.
I've added some new vectors as columns in a data frame using cbind(). As
they're all put as the last columns inte the data frame, I would like to move
them to specific positions.
?rbind
df1 <- data.frame(matrix(rep(0,9),nrow=3))
names(df1) <- c("x1","x2","x3")
rbind(df,df1)
--- On Fri, 10/23/09, Ashta wrote:
> From: Ashta
> Subject: [R] Inserting rows
> To: "R help"
> Received: Friday, October 23, 2009, 9:44 AM
> Hi all,
>
> I have the data set df with three varaib
Ben,
I lose my bet! Good thing my opinion is never worth more than $.02.
Looking at the code for smooth.spline() I see that, although 'argvals'
is the first argument to the function, the error message is generated
by the second argument. [** Spencer, is this intentional? **]
So, Ben, try str(r
Tom Gottfried wrote:
> Janke,
>
> Janke ten Holt schrieb:
>> Dear list,
>>
>> I would like to produce a matrix of plots, where par() is reset after
>> each plot (see below [simplified] example). When I use layout() to do
>> so, I seem to also reset the layout. I have not been able to figure out
Janke,
Janke ten Holt schrieb:
> Dear list,
>
> I would like to produce a matrix of plots, where par() is reset after
> each plot (see below [simplified] example). When I use layout() to do
> so, I seem to also reset the layout. I have not been able to figure out
> how to prevent this from happen
bbslover wrote:
Steve Lianoglou-6 wrote:
Hi,
On Oct 22, 2009, at 2:35 PM, bbslover wrote:
Usage
data(gasoline)
Format
A data frame with 60 observations on the following 2 variables.
octane
a numeric vector. The octane number.
NIR
a matrix with 401 columns. The NIR spectrum
and I see the
Try this:
rbind(df, matrix(0, 3, 3, dimnames = list(NULL, names(df
On Fri, Oct 23, 2009 at 11:44 AM, Ashta wrote:
> Hi all,
>
> I have the data set df with three varaibles,
>
> x1 x2 x3
> 1 2 5
> 2 4 1
> 5 6 0
> 1 1 2
>
> I want to insert more rows ( eg, 3 rows with value fill
Hello Dimitris
thanks for this. It works! I guess I was fixated on the dollar sign.
I must confess that I don't really understand any of the error
messages below. Can anyone help me interpret them?
rksh
Dimitris Rizopoulos wrote:
do you mean:
f <- factor(c("pigs", "pigs", "slugs"))
jj
Hi all,
I have the data set df with three varaibles,
x1 x2 x3
1 2 5
2 4 1
5 6 0
1 1 2
I want to insert more rows ( eg, 3 rows with value filled with zeros)
1 2 5
2 4 1
5 6 6
1 1 2
0 0 0
0 0 0
0 0 0
Can any body help me out?
Thanks
__
do you mean:
f <- factor(c("pigs", "pigs", "slugs"))
jj <- list(pigs = 1:10, slugs = 1:3)
jj[levels(f)[1]]
jj[[levels(f)[1]]]
Best,
Dimitris
Robin Hankin wrote:
Hi
I have a factor 'f' and a named list 'jj'.
I want names(jj) to match up with levels(f).
How do I use levels(f) to access ele
I'm working with a 350MB CSV file on a server that has 3GB of RAM, yet I'm
hitting a memory error when I try to store the data frame into a survey
design object, the R object that stores data for complex sample survey data.
When I launch R, I execute the following line from Windows:
"C:\Program Fi
Hi
I have a factor 'f' and a named list 'jj'.
I want names(jj) to match up with levels(f).
How do I use levels(f) to access elements of jj?
> f <- factor(c("pigs","pigs","slugs"))
> f
[1] pigs pigs slugs
Levels: pigs slugs
>
> jj <- list(pigs=1:10,slugs=1:3)
My attempts to produce jj$pig
1 - 100 of 133 matches
Mail list logo