Hey Everyone,
I'm pretty new at R and wanted to try and make some graphs with dummy data
before using it to analyze my own. I successfully made a bar graph and error
bars, but I can't figure out how to align them properly (currently they are
not centered on the bars and some of them aren't even c
Theodore Kengne wrote:
>
> Hi there,
>
> I am completely new in R.
> I am trying to read a table that has no feature, so cannot put it in Excel
> as usual.
>
Could you explain what you mean by "has no feature"? I cannot figure out
what this phrase means in relation to the data set you are tr
Hi useRs,
We are happy to announce that "the 2nd Chinese R Conference" is to be
held on Dec 5 - 6 in Beijing (Renmin University of China) and Dec 12
-13 in Shanghai (East China Normal University). Although the
registration has been turned off now and we have got more participants
than we expected,
Hello,
I have problem running WinBUGS from R.
The following example works in WinBUGS but it does not work in R through
package R2WinBUGS.
Does anyone know what the problem is?
x <- c(0.2, 1.1, 1, 2.2, 2.5, 2.9, 2.9, 3.6, 3.8, 0.6, 1, 2, 2.4, 2.6, 2.8,
3.2, 3.9, 3.5)
y <- c(0.5, 1.3, 0.1, 0.7, -0
Hi eveyone,
I am currently working with a porject which requires me to compare 6
profiles which have 146 response variables . . . where profile one, two and
three are tested on the same day say Day1 but ptofile five and six are on
different days say Day2 and Day3.
I have two research question
Hi there,
I am completely new in R.
I am trying to read a table that has no feature, so cannot put it in Excel
as usual.
I saved it as a txt file on the same root as my R program with the name
pro.txt.
Now I am looking to import it in my program as a matrix by excluding the
column titles, and the
The author of the penalized package, j.j.goeman at lumc.nl, kindly
replied to my message. He also responded to another question I asked him.
--
The differences have to do with different scaling defaults.
lrm by default standardizes the covariates to unit sd before applying
pen
I keep coming back to this problem of singular fits in rlm (MASS library),
but cannot figure out a good solution.
I am fitting a linear model with a factor variable, like
lm( Y ~ factorVar)
and this works fine. lm knows to construct the contrast matrix the way I
would expect, which puts the first
After
a=read.table("test.txt")
do this:
a <- as.matrix(a)
read.table() gives you a data frame. You are assuming it is a matrix,
so change it into a matrix.
-Don
At 3:36 PM -0800 12/2/09, aegea wrote:
Hello,
I have a question on export and import data. Thank you for any suggestions.
On Dec 2, 2009, at 11:31 PM, Peng Yu wrote:
On Wed, Dec 2, 2009 at 10:12 PM, David Winsemius > wrote:
On Dec 2, 2009, at 10:54 PM, Peng Yu wrote:
On Wed, Dec 2, 2009 at 8:08 PM, David Winsemius >
wrote:
On Dec 2, 2009, at 8:58 PM, Peng Yu wrote:
To debug a function, what I currently know
Got it, thanks!
On Wed, Dec 2, 2009 at 11:32 PM, Felix Andrews wrote:
> Either
> (1) use the 'alternating' option rather than 'relation' (see
> documentation for 'scales' argument);
> or
> (2) put 'rot' inside the 'y' list if you want it to apply only to the y
> axis.
>
>
>
> 2009/12/3 Peng Cai
Either
(1) use the 'alternating' option rather than 'relation' (see
documentation for 'scales' argument);
or
(2) put 'rot' inside the 'y' list if you want it to apply only to the y axis.
2009/12/3 Peng Cai :
> Hi Felix and Others,
>
> I just realized, after using relation="free" option, my y-axi
On Wed, Dec 2, 2009 at 10:12 PM, David Winsemius wrote:
>
> On Dec 2, 2009, at 10:54 PM, Peng Yu wrote:
>
>> On Wed, Dec 2, 2009 at 8:08 PM, David Winsemius
>> wrote:
>>>
>>> On Dec 2, 2009, at 8:58 PM, Peng Yu wrote:
>>>
To debug a function, what I currently know is to put 'browser()' in
>>
I find it useful to assign the histogram output to a variable and then
manipulate it myself:
For Example:
x=hist(R, freq=FALSE, breaks=10)
str(x)
x$counts/sum(x$counts)
On Wed, Dec 2, 2009 at 5:52 AM, wrote:
> Y-axis in your code is ``Counts'' irrelevant to probabilities.
>
>
>G
Hi Felix and Others,
I just realized, after using relation="free" option, my y-axis labels got
rotated by 90 degree. Previously they were horizontal and now they are
vertical. I tried using "rot=" option but it rotates both x and y-axis
labels at the same time. Any suggestions,
I'm trying:
scale
On Dec 2, 2009, at 10:54 PM, Peng Yu wrote:
On Wed, Dec 2, 2009 at 8:08 PM, David Winsemius > wrote:
On Dec 2, 2009, at 8:58 PM, Peng Yu wrote:
To debug a function, what I currently know is to put 'browser()' in
it. But I'm wondering if there is a way like 'step in' that is
available in debu
Hello David,
Can you please explain a little more, I could not exactly got it. Thanks,
Xin
On Wed, Dec 2, 2009 at 10:50 PM, David Winsemius wrote:
>
> On Dec 2, 2009, at 10:25 PM, Xin Ge wrote:
>
> Hi All,
>>
>> I have googled and tried finding if someone has ever tried producing
>> (Grouped +
On Wed, Dec 2, 2009 at 8:08 PM, David Winsemius wrote:
>
> On Dec 2, 2009, at 8:58 PM, Peng Yu wrote:
>
>> To debug a function, what I currently know is to put 'browser()' in
>> it. But I'm wondering if there is a way like 'step in' that is
>> available in debuggers of other languages (e.g. gdb).
On Dec 2, 2009, at 10:25 PM, Xin Ge wrote:
Hi All,
I have googled and tried finding if someone has ever tried producing
(Grouped + Stacked) Barplot. I couldn't find one.
I think you need to define some dummy Factor1 categories with zero
heights and blank labels to separate your groups. Onc
Hi,
On Wed, Dec 2, 2009 at 6:57 PM, Alexandre - UEL wrote:
> Hello everybody!
> I'm trying some datamining, but i'm having some problems with arule
> package, in the end of processing R "had to be closed". I already
> tryied to reinstall the 2.10 version, change the computer and
> realocated more
Hi All,
I have googled and tried finding if someone has ever tried producing
(Grouped + Stacked) Barplot. I couldn't find one.
My data needs to be reshaped, but once it is done it would be something like
this:
Factor1Factor2Factor3Value
AXP10
AXQ20
AYP
Figuring out the best parameterization for this kind of model
is a bit tricky until you get the hang of it.
Let the function be
y_t = y_0 + alpha * E^t
where uppercase Y_t denotes an observed value
and lower case y_t is a predicted value.
Index the times by t_1 t_n
WLOG assume that t
Exactly what errors are you getting? What is the 'str(a)' so we have
an idea of the data you are processing. Why don't you use save/load
so that the data is saved in the original format. Have you checked
the structure of the data before/after the write.table/read.table?
Also take a look at what
On Dec 2, 2009, at 7:02 PM, Robinson, David G wrote:
My apologies for this question but I¹m stuck and I¹m sure that there
must be
an easy answer out there (and hope that someone will have mercy and
point me
in the right direction).
I have a data file that looks like:
1 77 3
1 8 1
1 7 2
1 1
Hello everybody!
I'm trying some datamining, but i'm having some problems with arule
package, in the end of processing R "had to be closed". I already
tryied to reinstall the 2.10 version, change the computer and
realocated more virtual memory.
Does anyone had this problem to?
I had a hiphoteses
Hello,
I have a question on export and import data. Thank you for any suggestions.
data 'simul' is generated as follows:
N <- 20
n <- N/2
nsets <- 10
simul <- matrix(0,nsets,N)
th<- c(0,1, 1)
for(i in 1:nsets){
simul[i,] <- rnorm(N,mean= rep(th[1:2],N/2),sd=th
My apologies for this question but I¹m stuck and I¹m sure that there must be
an easy answer out there (and hope that someone will have mercy and point me
in the right direction).
I have a data file that looks like:
1 77 3
1 8 1
1 7 2
1 1 5
1 42 7
1 0 2
1 23 1
2 83 9
2 8 2
2 6 5
2 23 3
3 11 3
3 8 1
On Dec 2, 2009, at 8:58 PM, Peng Yu wrote:
To debug a function, what I currently know is to put 'browser()' in
it. But I'm wondering if there is a way like 'step in' that is
available in debuggers of other languages (e.g. gdb).
Learn to search:
> library(sos)
> ???"debug step"
--
David Wins
To debug a function, what I currently know is to put 'browser()' in
it. But I'm wondering if there is a way like 'step in' that is
available in debuggers of other languages (e.g. gdb).
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/lis
Rgui (Windows) does support '--quiet'.
Regards,
Yihui
--
Yihui Xie
Phone: 515-294-6609 Web: http://yihui.name
Department of Statistics, Iowa State University
3211 Snedecor Hall, Ames, IA
On Tue, Dec 1, 2009 at 11:17 PM, Sharpie wrote:
>
>
> Peng Yu wrote:
>>
>> I always see a banner like the
I was looking for suggestions as to how to smooth a timeseries and, having
accomplished that, how to find the fitted curve values for intermediate points.
I've tried numerous examples of possible approaches in R that I've found on the
web, but when applied to my simple data, R returns an error
Thanks David, it worked.
On Wed, Dec 2, 2009 at 7:34 PM, David Winsemius wrote:
>
> On Dec 2, 2009, at 6:27 PM, Peng Cai wrote:
>
> Hi R Users,
>>
>> I'm using following data/code (data is also attached) to produce a stacked
>> barplot.
>>
>> *I need help with changing legend boxes, currently I'
On Dec 2, 2009, at 6:27 PM, Peng Cai wrote:
Hi R Users,
I'm using following data/code (data is also attached) to produce a
stacked
barplot.
*I need help with changing legend boxes, currently I'm using
"rectangles=TRUE". Is it possible to get small squares instead --
may be
with a small g
On Wed, Dec 2, 2009 at 5:36 PM, Peter Ehlers wrote:
>
> Peng Yu wrote:
>>
>> On Wed, Dec 2, 2009 at 3:51 PM, David Winsemius
>> wrote:
>>>
>>> On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
>>>
> intersect(c(1,3,2),c('1','3')) # note x is numeric and y is character
[1] "1" "3"
>>
None of the people reading this at the moment can do this for you.
Read the information on the page where you subscribed.:
https://stat.ethz.ch/mailman/listinfo/r-help
Q: How many psychiatrists does it take to unscrew a light bulb?
A: Only one, but the lightbulb must truly want to become un
Peng Yu wrote:
On Wed, Dec 2, 2009 at 3:51 PM, David Winsemius wrote:
On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
intersect(c(1,3,2),c('1','3')) # note x is numeric and y is character
[1] "1" "3"
Apparently, intersect() treats num as string. But this is not
documented in the help. Could s
Hi R Users,
I'm using following data/code (data is also attached) to produce a stacked
barplot.
*I need help with changing legend boxes, currently I'm using
"rectangles=TRUE". Is it possible to get small squares instead -- may be
with a small gap between colored squares.* Currently there is no ga
I HAVE BEEN ASKED TO BE REMOVED FROM THIS LIST OVER 20 TIMES, PLEASE CAN I BE
REMOVED!
--- On Thu, 3/12/09, Peng Cai wrote:
From: Peng Cai
Subject: Re: [R] Help: barchart() {Lattice}
To: "Felix Andrews"
Cc: r-help@r-project.org
Received: Thursday, 3 December, 2009, 10:17 AM
Got i
Got it thanks, (relation="free" worked), more specifically
scales = list(relation="free", y = list(at = yScale))
On Wed, Dec 2, 2009 at 6:04 PM, Felix Andrews wrote:
> 2009/12/3 Peng Cai :
> > Hi Felix,
> >
> > Thanks for your help. If I'm defining my own y-scales like the one in R
> code
> > b
On Mon, Nov 30, 2009 at 7:49 AM, j verzani wrote:
> jerry83 yahoo.com> writes:
>
> Jerry, see below:
>
> >
> >
> > Hi John,
> >
> > Thanks A LOT for your reply and the code. What I want to do is to include
> the
> ggobi display window to the widget
> > window setup by me. I tried add before but
2009/12/3 Peng Cai :
> Hi Felix,
>
> Thanks for your help. If I'm defining my own y-scales like the one in R code
> below, then can I remove right side tick marks?
Yes. Look at the description of the "scales" argument in ?xyplot
>
> dta<-read.table("data.txt", header=TRUE, row.names="Names")
> l
library(reshape) ## the easy way
xx <- melt(x)
head(xx)
densityplot(~ value | cat1 * cat2, xx, groups = paste(variable, which),
plot.points=FALSE, auto.key=list(columns=2),
par.settings = simpleTheme(col = c("red","blue"), lty=c(1,1,2,2)))
Hint: using multiple terms in t
Hi Felix,
Thanks for your help. If I'm defining my own y-scales like the one in R code
below, then can I remove right side tick marks?
dta<-read.table("data.txt", header=TRUE, row.names="Names")
library(lattice)
yScale <- seq(-200, 200, 10)
barchart(data.matrix(dta),
horizontal=FALSE,
try this:
> salaries
yearID POS pct
12009 RF 203
22009 DH 200
32009 1B 198
42009 3B 180
52009 LF 169
62009 SS 156
72009 CF 148
82009 2B 97
92009 C 86
10 2008 DH 234
11 2008 1B 199
12 2008 RF 197
13 2008 3B 191
14 2008 SS 180
15 20
2009/12/3 Peng Cai :
> Hi R Users,
>
> I'm using following data/code (data is attached also) to produce a stacked
> barplot.
>
> # Sample Data:
> Names Col1 Col2 Col3
> Row1 -20 40 -10
> Row2 30 -20 40
> Row3 30 10 -20
> Row4 20 20 -10
>
>
> # R Code:
> dta<-read.table("data.txt", header=TRUE, row.
Hi,
I have two data sets; one is a population and the other a sample of
that population. I am trying to plot both on the same trellis display.
# Example data set with two numerical attributes and two categorical
pop <- data.frame(var1=rnorm(2000, 2000, 500), var2=rnorm(2000, 2000, 500))
cat<-(run
On Dec 2, 2009, at 5:01 PM, Philippe Thomas wrote:
David Winsemius schrieb:
On Dec 2, 2009, at 4:09 PM, Philippe Thomas wrote:
Dear R users,
I'm currently visualizing my data using scatter3d from the "Rcmdr"
package. I have data points which can be separated in two
classes. Data point
David, Erik, Uwe, Peter
Thanks to everyone. I found .Rdata (it was hidden) deleted it and all is well.
P.S. The suggestion to launch R from the command line with the --vanilla option
allowed the program to start, but it did not solve the problem of launching
from start>all programs>R
John Dav
On Dec 2, 2009, at 5:00 PM, Peng Yu wrote:
On Wed, Dec 2, 2009 at 3:51 PM, David Winsemius > wrote:
On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
intersect(c(1,3,2),c('1','3')) # note x is numeric and y is
character
[1] "1" "3"
Apparently, intersect() treats num as string. But this is not
The file is probably called ".Rdata" and is probably somewhere under your
"home" directory on Windows, perhaps under C:\documents and settings\username
or even C:\documents and settings\username\My Documents ? Hope that helps. I
don't have R installed on Windows or I would narrow it down for
John Sorkin wrote:
I delete my R directory, and searched for and file of the form .RData, I don't
have any. I re-installed R. my problem persists. Any suggestions?
You do have it. Otherwise R would not give that error message.
Please take a look in the directory that is used as the working
I delete my R directory, and searched for and file of the form .RData, I don't
have any. I re-installed R. my problem persists. Any suggestions?
John
John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore
On Wed, Dec 2, 2009 at 3:51 PM, David Winsemius wrote:
> On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
>
>>> intersect(c(1,3,2),c('1','3')) # note x is numeric and y is character
>>
>> [1] "1" "3"
>>
>> Apparently, intersect() treats num as string. But this is not
>> documented in the help. Could s
>
> It is documented that intersect will return a value of that is same
> mode as its "y" argument. How could it be any more clear?
>
Oops, this makes my previous response to this question inaccurate, apologies.
__
R-help@r-project.org mailing list
On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
intersect(c(1,3,2),c('1','3')) # note x is numeric and y is
character
[1] "1" "3"
Apparently, intersect() treats num as string. But this is not
documented in the help. Could somebody add it in the future version of
R?
It is documented that inters
> > intersect(c(1,3,2),c('1','3'))
> [1] "1" "3"
>
> Apparently, intersect() treats num as string. But this is not
> documented in the help. Could somebody add it in the future version of
> R?
>
This is more a general coercion feature. For example 1 == "1", see ?Comparison.
> Also according to
Corrupted datasets have been a fairly commonly observed cause of such
problems. Correction is through deletion (or removal to a different
directory if you want to check without committing to that solution) of
the offending .Rdata file.
--
David,
On Dec 2, 2009, at 4:27 PM, John Sorkin wro
On Dec 2, 2009, at 4:09 PM, Philippe Thomas wrote:
Dear R users,
I'm currently visualizing my data using scatter3d from the "Rcmdr"
package. I have data points which can be separated in two classes.
Data points from class 'A' should be colourised red and data points
in class 'B' should
> intersect(c(1,3,2),c('1','3'))
[1] "1" "3"
Apparently, intersect() treats num as string. But this is not
documented in the help. Could somebody add it in the future version of
R?
Also according to the help, the argument should not have duplicated
elements. But I tried the following example, it
Windows XP
R 2.10
I am unable to start R. When I try to launch R, I receive a text box stating:
Fatal error: unable to restore saved data in .RData
I tried reloading R (version 2.10), and restarted my computer . . . I still
have the problem.
HELP!
John
John David Sorkin M.D., Ph.D.
Chief,
--- Begin Message ---
Thank you for your help.
It is just what I want!!
El mié, 02-12-2009 a las 12:08 -0800, William Dunlap escribió:
> > -Original Message-
> > From: Kenneth Roy Cabrera Torres [mailto:krcab...@une.net.co]
> > Sent: Wednesday, December 02, 2009 12:01 PM
> > To: Willia
On Dec 2, 2009, at 4:01 PM, Wells Oliver wrote:
I have a query which returns a data set like so:
salaries
yearID POS pct
12009 RF 203
22009 DH 200
32009 1B 198
42009 3B 180
52009 LF 169
62009 SS 156
72009 CF 148
82009 2B 97
92009 C 86
10 20
Dear R users,
I'm currently visualizing my data using scatter3d from the "Rcmdr"
package. I have data points which can be separated in two classes. Data
points from class 'A' should be colourised red and data points in class
'B' should be colourised 'blue'. No matter what I try, the data poin
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Lisa
> Sent: Wednesday, December 02, 2009 12:30 PM
> To: r-help@r-project.org
> Subject: [R] Ordering numbers
>
>
> Hello all,
>
> I have a set of numbers that looks like this:
I have a query which returns a data set like so:
> salaries
yearID POS pct
12009 RF 203
22009 DH 200
32009 1B 198
42009 3B 180
52009 LF 169
62009 SS 156
72009 CF 148
82009 2B 97
92009 C 86
10 2008 DH 234
11 2008 1B 199
12 2008 RF 197
13
Kate is correct. The parameter scaling helps quite a bit, but not enough
to render the problem "nice" so that many "reasonable" starting points
will give useful results. Indeed, a run using "all.methods=TRUE" in our
optimx package (on r-forge at
http://r-forge.r-project.org/R/?group_id=395) gives
Thanks Chuck
I did not know about that MatchIt. I will check it out
Peter
-Original Message-
>From: Chuck Cleland
>Sent: Dec 2, 2009 3:47 PM
>To: Peter Flom
>Cc: r help
>Subject: Re: [R] Finding cases in one subset that are closet to another subset
>
>On 12/2/2009 3:01 PM, Peter Flo
David Winsemius wrote
>
>On Dec 2, 2009, at 3:01 PM, Peter Flom wrote:
>
>> Good afternoon
>>
>> Running R2.10.0 on Windows
>>
>> I have a data frame that includes (among much else) a factor
>> (In_2006) and a continuous variable (math_3_4). I would like to
>> find the 2 cases for In_2006 = 0
Greg Snow wrote:
Here is one way:
id <- c(1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 1, 2, 2, 2, 3, 3, 1, 1, 1, 2, 3, 4,
+ 4, 4, 5, 5)
id
[1] 1 1 2 2 2 3 4 4 4 4 1 2 2 2 3 3 1 1 1 2 3 4 4 4 5 5
tmp <- rle(id)
tmp
Run Length Encoding
lengths: int [1:12] 2 3 1 4 1 3 2 3 1 1 ...
values : num [1:12] 1
On Dec 2, 2009, at 3:01 PM, Peter Flom wrote:
Good afternoon
Running R2.10.0 on Windows
I have a data frame that includes (among much else) a factor
(In_2006) and a continuous variable (math_3_4). I would like to
find the 2 cases for In_2006 = 0 that are closest to each case where
In_2
On 12/2/2009 3:01 PM, Peter Flom wrote:
> Good afternoon
>
> Running R2.10.0 on Windows
>
> I have a data frame that includes (among much else) a factor (In_2006) and a
> continuous variable (math_3_4). I would like to find the 2 cases for In_2006
> = 0 that are closest to each case where In_2
Your output does not match the requested output, I think the original poster
may have used the word "order" differently than how you are thinking.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> Fr
Here is one way:
> id <- c(1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 1, 2, 2, 2, 3, 3, 1, 1, 1, 2, 3, 4,
+ 4, 4, 5, 5)
> id
[1] 1 1 2 2 2 3 4 4 4 4 1 2 2 2 3 3 1 1 1 2 3 4 4 4 5 5
> tmp <- rle(id)
> tmp
Run Length Encoding
lengths: int [1:12] 2 3 1 4 1 3 2 3 1 1 ...
values : num [1:12] 1 2 3 4 1 2 3 1 2
On Wed, Dec 2, 2009 at 3:30 PM, Lisa wrote:
>
> Hello all,
>
> I have a set of numbers that looks like this:
>
>> id <- c(1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 1, 2, 2, 2, 3, 3, 1, 1, 1, 2, 3, 4,
>> 4, 4, 5, 5)
>> id
> [1] 1 1 2 2 2 3 4 4 4 4 1 2 2 2 3 3 1 1 1 2 3 4 4 4 5 5
>
> Please ignore the bold num
If you specify a format, then you don't get the error, just a missing value.
It is a good practice to always specify the format rather than expecting the
computer to always guess correctly or expect the original programmers to have
anticipated everything that you may ever try. (the development
Hello all,
I have a set of numbers that looks like this:
> id <- c(1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 1, 2, 2, 2, 3, 3, 1, 1, 1, 2, 3, 4,
> 4, 4, 5, 5)
> id
[1] 1 1 2 2 2 3 4 4 4 4 1 2 2 2 3 3 1 1 1 2 3 4 4 4 5 5
Please ignore the bold numbers, I just want to make my problem clear.
I am going to or
1) that is a loess smooth curve of the plotted points, looking at the help
?plot.lm would lead to the panel.smooth function that does the actual plotting.
2) It is described on the help page for plot.lm.
3) The basics are described on the help page. If you don't know what a
leverage or Cook's di
Look at ?dev.copy
I ran your code, clicked on some points, then did:
> dev.copy2pdf(file='c:/temp/test.pdf')
And found the pdf file complete with the labeled points.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8
Good afternoon
Running R2.10.0 on Windows
I have a data frame that includes (among much else) a factor (In_2006) and a
continuous variable (math_3_4). I would like to find the 2 cases for In_2006 =
0 that are closest to each case where In_2006 = 1.
My data looks like
In_2006 math_3_4
Yes...
It assing to each list component the index...
As you see I want to modify each component of the list
so I can use it at the following step o the lapply procedure.
El mié, 02-12-2009 a las 17:23 -0200, Henrique Dallazuanna escribió:
> Try this:
>
> z1[] <- 1:3
>
>
>
> On Wed, Dec 2, 20
Can't figure this out. I have the following list of salary averages per
year, per position. The dput output is:
> dput(salaries)
structure(list(yearID = c(2009, 2009, 2009, 2009, 2009, 2009,
2009, 2009, 2009, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008,
2008), AVG = c(8956855.61, 7886684.166126
Try this:
z1[] <- 1:3
On Wed, Dec 2, 2009 at 5:17 PM, Kenneth Roy Cabrera Torres
wrote:
> Hi R users:
>
> I got an error that "l1" is not found.
>
> This is a sample code:
>
> f1<-function(i,l1){
> print(l1[[i]])
> l1[[i+1]]<<-i
> return(i)
> }
>
> z1<-list(x=100,NULL,a=c(1,1))
> lapply(1:3
Hi R users:
I got an error that "l1" is not found.
This is a sample code:
f1<-function(i,l1){
print(l1[[i]])
l1[[i+1]]<<-i
return(i)
}
z1<-list(x=100,NULL,a=c(1,1))
lapply(1:3,f1,l1=z1)
My final goal is to update the value of
each list component to use it in the following
step.
I see th
comment.char=''
On Wed, Dec 2, 2009 at 2:05 PM, Graham Smith wrote:
> Thanks all.
>
> I assumed it would be easy, but searching yielded nothing useful.
>
> Graham
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
Thanks all.
I assumed it would be easy, but searching yielded nothing useful.
Graham
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and prov
You used starting values:
pa <- c(1,2,3)
but both algorithms (port and Gauss-Newton) fail if you use the slightly
different values:
pa <- c(1,2,3.5)
Scaling does not fix the underlying sensitivity to starting values.
pa[3] in particular cannot be above ~3.15 for GN and ~3.3 for port; both
a
Look at the subplot function in the TeachingDemos package.
--
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 [mailto:r-help-boun...@r-
> project.org] On Behalf Of Ot
Hi R Users,
I'm using following data/code (data is attached also) to produce a stacked
barplot.
# Sample Data:
Names Col1 Col2 Col3
Row1 -20 40 -10
Row2 30 -20 40
Row3 30 10 -20
Row4 20 20 -10
# R Code:
dta<-read.table("data.txt", header=TRUE, row.names="Names")
barchart(data.matrix(dta),
Indeed, looking at sem.R in the package, we see that at the heart of
sem is a version of the maximum likelihood discrepancy function. It
should be easy to use, say, another flag (e.g. set the default to
method="ML" for the current behavior) and for other methods, use
different discrepancy
Try readLines, for instance:
# test.txt contents
comments
a,b,c
1,1,1
2,2,2
> readLines("c:/test.txt",1)
[1] "comments"
> read.csv("c:/test.txt",skip=1)
a b c
1 1 1 1
2 2 2 2
Coen
On Wed, Dec 2, 2009 at 19:26, Graham Smith wrote:
> When a text file starts with a few lines commented out with
In the world of SEM, GLS has pretty much fallen by the wayside - I
can't recall anything I've seen arguing for it's use in the past 10
years, and I also can't recall anyone using it over ML. The
recommendations for non-normal distributions tend to be robust-ML, or
robust weighted least squares.
On Dec 2, 2009, at 1:26 PM, Graham Smith wrote:
When a text file starts with a few lines commented out with # can you
read those line from within R.
?readLines
read.table ignores the comments to load the file, but it would
sometimes be useful to be able to read what these comments say.
T
The help page clearly states that ans$coef is "not on the original scale and
are for use by the coef method". You also see that ans$scales gives you the
scales used in the computation of ans$coef.
So, to get coefficients on the original scale, you can either use coef(ans)
or you can divide ans$
When a text file starts with a few lines commented out with # can you
read those line from within R.
read.table ignores the comments to load the file, but it would
sometimes be useful to be able to read what these comments say.
Thanks,
Graham
__
R-he
I found the eclipse plugin for R StatEt, hass anyone already worked with
it?
It's posible to put inside of java code a R script with it?
Thank you
--
View this message in context:
http://n4.nabble.com/R-and-eclipse-tp934851p934851.html
Sent from the R help mailing list archive at Nabble
On Dec 2, 2009, at 12:18 PM, Mark Heckmann wrote:
I have a vector and need to count how many data points fall inside
each bin:
dat <- rnorm(100)
breaks <- -3:3
table((cut(dat, breaks)))
(-3,-2] (-2,-1] (-1,0] (0,1] (1,2] (2,3]
3 13 42 30 12 0
if I reve
Hi Andreas,
> ## does not exactly what i want, because i get rows
> ## of missinges pattern which are not in R
> X[rbinom(100,1,p[1])==1,R[1,]==1] <- NA
> X[rbinom(100,1,p[2])==1,R[2,]==1] <- NA
> X[rbinom(100,1,p[3])==1,R[3,]==1] <- NA
> X[rbinom(100,1,p[4])==1,R[4,]==1] <- NA
If you run these l
try this:
> dat <- rnorm(100)
> breaks <- -3:3
> table((cut(dat, breaks)))
(-3,-2] (-2,-1] (-1,0] (0,1] (1,2] (2,3]
1 10 35 39 13 2
> x <- table((cut(dat, breaks)))
> rev(x)
(2,3] (1,2] (0,1] (-1,0] (-2,-1] (-3,-2]
2 13 39 35
I have a vector and need to count how many data points fall inside
each bin:
dat <- rnorm(100)
breaks <- -3:3
table((cut(dat, breaks)))
(-3,-2] (-2,-1] (-1,0] (0,1] (1,2] (2,3]
3 13 42 30 12 0
if I reverse the breaks vector, the results remains the same:
Original-Nachricht
Betreff:Re: [R] Adding and Multiplying two Unevaluated Expressions
Datum: Tue, 01 Dec 2009 23:49:39 +0100
Von:Benjamin Müller
An: Rolf Turner
Referenzen: <20091201144125.316...@gmx.net>
<8e40e49f-e8fc-4fbd-8cc5-93789ffb0...@auckland.ac.nz
1 - 100 of 191 matches
Mail list logo