David Winsemius wrote:
If you read the Installation and Administration document you should
find material on that process. Look for the section that describes the
care and feeding of .Rprofile or type
?Startup # in an R console session.
And when you are ready, the Writing R
Hi Sigal, could you give a simple example ?
I can imagine in some cases that enlarging the windows would help, but on
others there are other parameters you would like to play with instead. So
having an example to solve, will help people help you.
Tal
Contact
On 05/02/2010 11:56 AM, R K wrote:
Hello,
I was wondering if someone could tell me how I can make text dependent on a
variable in a R function I have created.
The function will create plots, thus I would like each plot to have a unique
title based on the inputted variable as well as a
Hi, my data looks this:
id forma program kod obor
rocnik
1 10001 kombinovaná Matematika M1101 matematika 1
2 10002 prezenční Informatika N1801 teoretická informatika 1
3 10002 prezenční Informatika
Hello Ista,
On May 1, 2010, at 8:37 PM, Ista Zahn wrote:
Hi Giovanni,
A reproducible example would help. Also, since I think this will be
tricky, it might be a good idea to post it to the ggplot2 mailing list
(you can register at http://had.co.nz/ggplot2/ ).
Best,
Ista
First, thank you
You don't show how you are doing it with
a 'for' loop, but I suspect that you just
need to eliminate the subscript you are
using for rows.
For example:
for(i in 1:nrow(data)) {
data$z[i] - data[i, 'x'] + data[i, 'y']
}
can be written more simply and much more
efficiently as:
data$z -
On 05/02/2010 08:26 PM, peterko wrote:
Hi, my data looks this:
id forma program kod obor
rocnik
1 10001 kombinovaná Matematika M1101 matematika 1
2 10002 prezenční Informatika N1801 teoretická informatika 1
3 10002
Thank you Jim, it works very well. I do not need do it using tapply, but i
think that it is the way.
And Patrick thank you too
--
View this message in context:
http://r.789695.n4.nabble.com/help-with-tapply-or-other-apply-tp2122683p2122728.html
Sent from the R help mailing list archive at
On 02/05/2010 4:07 AM, Jim Lemon wrote:
On 05/02/2010 11:56 AM, R K wrote:
Hello,
I was wondering if someone could tell me how I can make text dependent on a
variable in a R function I have created.
The function will create plots, thus I would like each plot to have a unique
title based
Dear All,
I noticed that the splines package is no longer available on CRAN.
Has it been replaced by something else? is it still available in some
other locations?
Thanks.
Shige
__
R-help@r-project.org mailing list
Hi all,
I have data size of :
dim(sample)
[1] 3594317
The first column is stdate - is date ( 01/11/2009 00:00:00,02/11/2009
00:00:00,02/11/2009 00:00:00 etc... )
Login is 13th column - is numbers (12,0,1 erc...)
The below operation return the following error.
sample1 -
On May 2, 2010, at 9:32 AM, Shige Song wrote:
Dear All,
I noticed that the splines package is no longer available on CRAN.
Has it been replaced by something else? is it still available in some
other locations?
I believe you will discover that splines is part of the standard
install
On May 2, 2010, at 9:39 AM, Mohan L wrote:
Hi all,
I have data size of :
dim(sample)
[1] 3594317
Your code has a different name for the sample object. And it would be
more informative if you offered str on sample1.
--
David.
The first column is stdate - is date ( 01/11/2009
say x is the variable.
plot(..., title=paste(x, whatever else), ...) should work as well.
same should work with file names as well.
Nikhil
On May 1, 2010, at 9:56 PM, R K wrote:
Hello,
I was wondering if someone could tell me how I can make text
dependent on a variable in a R function
Dear R users,
Please let me know how to plot the forecast in such a model:
First I do it simple with ARIMA model that works ok with the codes provided to
me at the lecture:
arima-arima(HCPIlong, order=c(1,1,0))
arima.predict-predict(arima, n.ahead= 5 )
Hi,
I'm trying to replace all values equal to 1 in one file (a) with the value
in the corresponding column in a separate file (b). Example below.
Any help (and brief notes if poss) much appreciated. Thanks!!
file a:
0,0,1,1,0
1,0,0,0,1
0,0,0,0,0
1,0,1,1,0
file b:
3,4,6,8,11
output request:
Your code has a different name for the sample object. And it would be more
informative if you offered str on sample1.
This is the result of str on sample1.
str(sample1)
'data.frame':35943 obs. of 17 variables:
$ stdate : Factor w/ 7 levels 01/11/09 00:00,..: 1 1 1 1 1 1 1 1 1 1
...
On May 2, 2010, at 10:10 AM, Nikhil Kaza wrote:
say x is the variable.
plot(..., title=paste(x, whatever else), ...) should work as well.
same should work with file names as well.
Perhaps in an alternate universe it might, ... but it doesn't in this
one. title is not the correct
On May 2, 2010, at 10:22 AM, Mohan L wrote:
Your code has a different name for the sample object. And it would
be more informative if you offered str on sample1.
This is the result of str on sample1.
str(sample1)
'data.frame':35943 obs. of 17 variables:
$ stdate : Factor w/
The following code might work:
a[a==1] - b[a==1]
But it depends on what a and b are exactly (vector, matrix, list,
data.frame).
Tal
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me:
On May 2, 2010, at 7:01 AM, burgundy wrote:
Hi,
I'm trying to replace all values equal to 1 in one file (a) with the
value
in the corresponding column in a separate file (b). Example below.
Any help (and brief notes if poss) much appreciated. Thanks!!
file a:
0,0,1,1,0
1,0,0,0,1
Hi Phillip,
I've never heard of a scree _diagram_, I'm not even sure what that is.
To get started with principal components analysis in R, I suggest the
psych package. The package vignettes are quite detailed, I suggest
starting there.
Best,
Ista
On Sun, May 2, 2010 at 12:06 AM, Philip Wong
On 01.05.2010 21:09, Giovanni Azua wrote:
Hello,
I have three method types and 100 generalization errors for each, all in the
range [0.65,0.81]. I would like to make a stacked histogram plot using ggplot2
with this data ...
Therefore I need a data frame of the form e.g.
Method
Your code has a different name for the sample object. And it would be more
informative if you offered str on sample1.
This is the result of str on sample1.
str(sample1)
'data.frame':35943 obs. of 17 variables:
$ stdate : Factor w/ 7 levels 01/11/09 00:00,..: 1 1 1 1 1 1 1 1 1
1
Paul Hurley wrote:
Is there a known problem with odfWeave on Windows? I've seen some
messages on R-help from a year or two back where people couldn't install
the XML package, but XML installed fine on my Windows box (it was more
tricky on Kubuntu, but worked in the end).
There was
Hi all,
I hope that there is someone that can help me out here.
I am trying to load() a workspace on os x (R 2.11.0) that was saved in
windows XP (R 2.9). In that workspace, there's a data.frame with names
that contain swedish characters. These characters become garbled,
which is a major problem.
On May 2, 2010, at 11:22 AM, Mohan L wrote:
Your code has a different name for the sample object. And it would
be more informative if you offered str on sample1.
This is the result of str on sample1.
str(sample1)
'data.frame':35943 obs. of 17 variables:
$ stdate : Factor w/
Gustaf Rydevik wrote:
Hi all,
I hope that there is someone that can help me out here.
I am trying to load() a workspace on os x (R 2.11.0) that was saved in
windows XP (R 2.9). In that workspace, there's a data.frame with names
that contain swedish characters. These characters become garbled,
Presumably, a scree plot?
Philip may find something useful here
http://www.statmethods.net/advstats/factor.html
--- On Sun, 5/2/10, Ista Zahn istaz...@gmail.com wrote:
From: Ista Zahn istaz...@gmail.com
Subject: Re: [R] Scree diagram,
To: Philip Wong tombfigh...@mysinamail.com
Cc:
1) I believe you wanted a scree plot which shows the percentage of
variance explained (y-axis) versus the principal components (x-axis). To
do that, all you needs a simple plot(x,y) function where x = pc and y =
variance. It is called a scree plot because the plot looks like a scree
on the
Another option could be:
data$z - as.numeric(gsub((^\\d{4}).*, \\1, gsub(^$, 2009,
data$ukrok))) - data$rocnik
On Sun, May 2, 2010 at 8:25 AM, peterko lanikpe...@gmail.com wrote:
Thank you Jim, it works very well. I do not need do it using tapply, but i
think that it is the way.
And
Greetings and thank you
Am using GSA and have the GSA.listsets object of class list which displays
fine
But how do I get the object written to a text file?
I see to convert to data frame and then write.table but
GSAwk1df - data.frame(GSAwk1list, row.names=NULL, check.rows=FALSE,
Suppose my data looks like this:
Obs, Male, Female, Height
1, T, F, 66
2, F, T, 64
3, T, F, 59
4, T, F, 55
5, F, T, 62
I have no way to determining _why_ it is not numeric, but it simply is ...
not. Your input method turned it into a factor. Perhaps there was one
missing delimiter, or there was a stray character in one of the entries in
the file. Who knows. Why waste time arguing? Follow the directions for
Try this:
prop.table(table(subset(x, Height 60, select = Male:Female)))
On Sun, May 2, 2010 at 2:58 PM, Geoffrey Smith g...@asu.edu wrote:
Suppose my data looks like this:
Obs, Male, Female, Height
1, T, F, 66
2, F, T,
Thats right. serves me for not checking the code before posting.
but paste should work in anycase with collapse or when x is a single
parameter.
Nikhil
On Sun, May 2, 2010 at 10:24 AM, David Winsemius dwinsem...@comcast.netwrote:
On May 2, 2010, at 10:10 AM, Nikhil Kaza wrote:
say x is
On May 2, 2010, at 2:10 PM, Mohan L wrote:
I have no way to determining _why_ it is not numeric, but it simply
is ... not. Your input method turned it into a factor. Perhaps there
was one missing delimiter, or there was a stray character in one of
the entries in the file. Who knows.
On May 2, 2010, at 1:58 PM, Geoffrey Smith wrote:
Suppose my data looks like this:
Obs, Male, Female, Height
1, T, F, 66
2, F, T, 64
3, T, F, 59
4, T, F,
Hi R users,
I would like to add year information to each point in a scatter plot. The
following
example shows what i mean:
df=data.frame(year=c(2001,2002,2003),a=c(8,9,7),b=c(100,90,95))
df
plot(b~a,data=df)
Now, I would like to see which point belongs to 2001, 2002 and 2003 in the
above
as.numeric(assame$Login) //convert to numerics
Nooo. You did not do what what I suggested earlier. Do not reach
for your keyboard in the R console until you have read the FAQ section
regarding converting factors to numeric. If you don't want to read the FAQ
Hi David,
Now I
Thank you for your reply. The application is a Monte Carlo simulation
in environmental planning. Different possible remediation measures
have different costs, and produce different results. For example, a
$20,000 plan may add 10 acres of wetlands and 12 acres of bird
habitat. The desire is to
Hi All,
I am using R 2.11.0 on a Ubuntu machine. I estimated a model using tsls
from the package sem. Is there a way to get Newey West standard errors for
the parameter estimates?
When estimating the model by OLS, I used NeweyWest from the package
sandwich to get HAC standard errors. But, I am
On Sun, 2 May 2010, Dipankar Basu wrote:
Hi All,
I am using R 2.11.0 on a Ubuntu machine. I estimated a model using tsls
from the package sem. Is there a way to get Newey West standard errors for
the parameter estimates?
When estimating the model by OLS, I used NeweyWest from the package
On Fri, Apr 9, 2010 at 1:46 PM, array chip arrayprof...@yahoo.com wrote:
David,
Thanks for the 2 previous posts from Sarkar. Actually, I am now one step
closer. I am now able
to remove the 3 outer lines of the bounding box using par.box argument, even
Sarkar said in
his 2008 post that
Dear R Community,
I am trying to run a command line in R that will open an external program, have
it import a specific input file, run the program, then close the program. The
command line that I got from the developer of the model to do this looks like
what you see below:
c:\programx.exe
I think that one of the packages, perhaps Hmisc or plotrix does this but you
can also do it just using text()
Example
plot(b~a,data=df, xlim=c(min(df$a)-5,max(df$a)+5), ylim=
c(min(df$b)-5,max(df$b)+5))
text( df$a+1,df$b, labels=df$year)
Alternatively you can do this in ggplot
Hi Ozan,
The {calibrate} package allows you to do that.
install.packages(calibrate)
library(calibrate)
df=data.frame(year=c(2001,2002,2003),a=c(8,9,7),b=c(100,90,95))
df
plot(b~a,data=df)
textxy(df$a,df$b,df$year)
Muhammad
On 05/02/2010 08:25 PM, Ozan Bakis wrote:
Hi R users,
I would like
Many thanks Prof. and Duncan!
Iconv worked like a charm together with CP1252 as the windows
encoding, and now all the text shows up correctly
Because the data frame also contained factors with levels that had
swedish characters, i ended up writing a small function for converting
the encoding of
On May 2, 2010, at 3:27 PM, Mohan L wrote:
as.numeric(assame$Login) //convert to numerics
Nooo. You did not do what what I suggested earlier. Do not
reach for your keyboard in the R console until you have read the FAQ
section regarding converting factors to numeric. If you
Many thanks for the suggestion!
That may reduce the computational time needed to find x value given
the y one (for hundreds of pairs). Certainly, I will look into manuals
for approx() and approxfun() in this regard.
Again, thanks for your taking time to read my previous posts and make
this
There is a screeplot() function that takes the output from prcomp. It plots
the value of the eigenvalue vs. the eigenvalue's number.
CS
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey
Please ignore my previous message about the difference between tsls and
ivreg results; that was my mistake.
Deepankar
On Sun, May 2, 2010 at 5:10 PM, Dipankar Basu basu...@gmail.com wrote:
Thanks.
Estimation of the same model with the same dataset gives different results
when tsls (from
On May 2, 2010, at 4:25 PM, David Winsemius wrote:
On May 2, 2010, at 3:27 PM, Mohan L wrote:
as.numeric(assame$Login) //convert to numerics
Nooo. You did not do what what I suggested earlier. Do not
reach for your keyboard in the R console until you have read the
FAQ
Hello,
I have a matrix in which two variables, x and y, are used together to determine
z. The variables x and y are sorted into classes. Specifically, values for
variable x range from 0 to 2.7 and are sorted into class increments of 0.15 and
variable y ranges from 0-2100 with class
On May 2, 2010, at 5:27 PM, Jessica Schedlbauer wrote:
Hello,
I have a matrix in which two variables, x and y, are used together
to determine z. The variables x and y are sorted into classes.
Specifically, values for variable x range from 0 to 2.7 and are
sorted into class increments
On 3/26/10, Bert Gunter gunter.ber...@gene.com wrote:
represented) is important for numerical calculations, what is the smallest
number that anyone has actually seen describing physical phenomena in
science?
There was a recent article in The Economist (The force is weak with
this one, Apr
Are you looking for something like this?
data - data.frame(first= c(1,2,3,4,5,6,7,8), zehn = c(15,NA,NA,NA,NA,18,NA,25),
second = c(4,NA,7,9,NA,10.2,NA,12),
third= c(6,7,NA,NA,10,12,NA,16))
data
library(zoo)
data2 -na.approx(data,na.rm=F)
data2
?na.approx
Felipe D.
I'm trying to figure out how to get the text captured by capturing
groups out of a regex match. For instance, let's say I have the pattern
foo ([^ ]+) and I match it against the string This is a foo sentence
I am reading. The group in the pattern will match the word sentence
in the
Is this what you want:
x - This is a foo sentence I am reading.
# only return the desired match
sub(.*foo ([^ ]+).*, \\1 file://0.0.0.1/, x)
[1] sentence
On Sun, May 2, 2010 at 6:03 PM, OKB (not okblacke) brenb...@brenbarn.netwrote:
I'm trying to figure out how to get the text
The strapply function in gsubfn does that. See http://gsubfn.googlecode.com
On Sun, May 2, 2010 at 6:03 PM, OKB (not okblacke)
brenb...@brenbarn.net wrote:
I'm trying to figure out how to get the text captured by capturing
groups out of a regex match. For instance, let's say I have
Dear Rxperts,
Running the following code:
===
twlo=10; twhi=20; wt=154; vd=0.5; cl=0.046; tau=6; t=3; F=1;
wtkg - wt/2.2 # convert lbs to kg
vd.pt - wtkg * vd # compute weight-based vd (L)
cl.pt - wtkg * cl #
Dear Oscar,
The problem has to do with rounding (because you set the global digits
value to 2). Although what you see is 2.4*270=670; when R actually
calculates it, it is using full precision. If you set
options(digits=7) # the default
you will see that AR=2.357362, not 2.4.
HTH,
Joshua
oscar linares winsaam at gmail.com writes:
Dear Rxperts,
Running the following code:
===
twlo=10; twhi=20; wt=154; vd=0.5; cl=0.046; tau=6; t=3; F=1;
wtkg - wt/2.2 # convert lbs to kg
vd.pt - wtkg * vd #
Gabor Grothendieck wrote:
The strapply function in gsubfn does that. See
http://gsubfn.googlecode.com
Ah, thanks. The documentation for that function is pretty
difficult to grasp, but I think I figured it out. . . almost. However,
for some reason I can't seem to make strapply
Thanks to all for their answers so far - the following suggestion comes close
to what I was looking for, but perhaps I was not clear enough in my initial
message.
Following the example below, I'd like to be able to interpolate in such a way
that considers adjacent datapoints in both columns
Here's a simplified code example.
library(grid)
vp1 - viewport(height=0.8, width=0.8, default.unit=snpc)
vp2 - viewport(y = 0.5, just=bottom, gp=gpar(col=red, lwd=2))
# draw triangle
function1 - function(vp) {
grid.polygon(x=c(0,0.5,1), y=c(0.5,0,0.5), name=triangle, vp=vp)
}
# draw n
There are quite a few examples in
(1) ?strapply,
(2) on the home page and
(3) in the vignette
(4) on r-help back posts
if you having problems with understanding the textual description.
Note that X and FUN are also arguments to sapply
args(sapply)
function (X, FUN, ..., simplify = TRUE,
I ran this code (several times) from the Quick-R web page (
http://www.statmethods.net/advstats/cart.html) but my cross-validation
errors increase instead of decrease (same thing happens with an unrelated
data set).
Why does this happen?
Am I doing something wrong?
# Classification Tree with
Dear R-users,
I am going through the last steps of package prep before submission to CRAN
and I have the following problem. My package contains a single vignette
written in optimbase.Rnw and that in stored in /inst/doc. optimbase.Rnw
contains multiple \input{} statements that refer to .tex files
Hi folks,
I have a matrix of 3 columns and 17 lines that represents a graph or a
adjacency matrix.
I have also a vector of 30 elements with some of the nodes of the graph
repeated.
seems like:
1. matrix that represents a graph:
1 2 1
1 3 1
1 4 1
2 1 1
2 4 1
3 1 1
4 1 1
4 2 1
2. vector of nodes
70 matches
Mail list logo