Displaying 20 results from an estimated 5000 matches similar to: "Smoothing a path in 2D"
2013 Jun 26
3
XYZ data
I have x, y, z data. The x, y fields dont change but Z does. How do I add a
very small number onto the end of each x, y data point.
For example:
Original (X) Original (Y) Original (Z)
15 20 30
15 20 40
New (X) New (Y)
2007 Nov 27
2
rearrange data: one line per subject, one column per condition
Dear R-list,
Is there a way to convert the typical long R data-format to a 1-line per subject format?
I have data formatted as:
Group subj condition variable
1 1 1 746.36625
2 2 1 1076.152857
1 3 1 1076.152857
2 4 1 657.4263636
1 5 1 854.1266667
2 6 1 1191.676154
1 7 1 1028.175385
1 1 2 46.36625
2 2 2 76.152857
1 3 2 76.152857
2 4 2 57.4263636
1 5 2 54.1266667
2 6 2 191.676154
1 7 2 028.175385
2007 Oct 31
2
ylim in barplot2 function?
Hi list,
I'm using barplot2 form the gplots package to plot a few numbers (I want to add SD bars later).
However, I would like the y-axis not to start from 0 but 500. When I add the parameters YLIM, something goes wrong. The graph is not 'cut off' at 500. Instead the bars seems to sink trough the bottom of the graph.
Because its a little hard to explain, here is a self-containing
2007 Jul 17
2
Combine R2HTML and Rcmd BATCH?
Hi All,
I have an R script that spawns output in the form of an HTML page. This
is done by the R2HTML package.
Now I want to run the same script using Rcmd BATCH. However, it seems
that it is not possible to use R2HTML in this case.
My script ends with this error message:
#########################
Error in dev.print(png, file = AbsGraphFileName, width = Width, height =
Height, :
can only
2007 Oct 03
1
Making a table: collapsing across sub-strings
Hi list,
I'm currently processing textual data and I would really appreciate some
help with one off my problems.
I have a set of strings and I want to count how often each of this
strings appears in this set.
This is not very difficult and can be done as:
TB<-table(my_set)
plot(TB)
However, I also want to collapse across sub-strings. This is, I want a
sub-string ss of string S to be
2011 Dec 21
1
Gps fraction of degrees function
Dear all, I have the following written example
> coords <- "51°30'48.58\"N"
>
> as.integer(strsplit(coords, "°")[[1]][1])
[1] 51
> as.integer(strsplit(strsplit(coords, "°")[[1]][2], "'")[[1]][1])
[1] 30
> as.numeric(strsplit(strsplit(strsplit(coords, "°")[[1]][2], "'")[[1]][2],
2011 Dec 27
2
importing NPDB
Does anyone have information about using the National Practitioner Data Bank (NPDB) in R? It's public use data available from the U.S. Department of Health and Human Services that can be downloaded as a .dat or .por file. I can't even figure out how to open the file in R.
[[alternative HTML version deleted]]
2013 Feb 20
3
NLS results different from Excel -- Tricky fortunes nomination
Folks:
I thought the following excerpt from Bruce McCullough's post would be
a good candidate for the R fortunes package -- except that it's about
Excel, not R! So I nominate it... but leave it to others to say
whether it's really "qualified" to be nominated.
----
"The idea that the Excel solver "has a good reputation for being fast
and accurate" does not
2011 Feb 10
3
Finding length of unique numbers in a vector
Hello there, would you please look into my codes? Here I have following:
> set.seed(100)
> samp <- sample(c(1,-1,0), 20, replace=T); samp
[1] 1 1 -1 1 -1 -1 0 -1 -1 1 -1 0 1 -1 0 0 1 -1 -1 0
Here I want to calculate the length of each unique number for above vector.
How can I do that?
Thanks in advance
[[alternative HTML version deleted]]
2012 Apr 19
1
SmoothTrend in OpenAir
I'm trying to plot smooth trend using smoothTrend in OpenAir but I'm having
problems.
I used the following code.
---------------------------------------------------------------------------------
#Set my working dir to the dir with my files
setwd("c:/R")
#Load the openair library
library(openair)
#Load the data
mydata <- read.table("MCNP-pH.csv", header=TRUE,
2011 Mar 23
2
mean of runoff for several years
Hello everyone
I have a dataframe with 4 colums (year, month, day, runoff) for 1993-2009.
Now I like to calculate the average runoff for each day. Finally I like to
plot the median runoff for all this years.
I tried with some loops, but it didn't work. Do you have any Tips for my
problem?
Any help is greatly appreciated! Thank you very much.
Dominique
--
View this message in context:
2009 Feb 19
2
counting strings in a column
Dear All,
I have a query : what is the command to count number of repeated words in a
column.
for ex:
a =
oranges
oranges
apples
apples
grape
oranges
apple
pine
the result should be
oranges 3
apples 3
grape 1
pine 1
is there an easy way for this.
Thanks,
Nataraju
GM R & D
Bangalore
--
"No relationship is Static .. You either Step up or Step down"
[[alternative HTML
2011 May 10
2
need to delete by time, not date
I have a matrix where one column has a date and another column has a time. I
need to delete all times before 6am. I had combined the Date and Time column
into DateTime.
Mat1:
Weight Date Time
7.6 04/28/11 09:03
8.4 04/29/11 03:11
8.6 04/29/11 05:32
8.6 04/29/11 09:53
1.4 05/01/11 19:52
I tried just picking up the time:
as.POSIXct(Mat1$Time, format = "%H:%M")
but
2011 Nov 01
4
round up a number to 10^4
Hi all,
I have a list of numbers, e.g., X = c(60593.23, 71631.17, 75320.1), and want
to round them so the output is Y = c(60000, 80000, 80000). I tried
Y<-round(X,-4), but it gives me Y = c(60000, 70000, 80000). Do anybody know
how to round up a number to 10^4?
Thank you in advance.
Wendy
--
View this message in context:
2008 Feb 15
3
lineplot.CI problem
Hi List,
I have a problem plotting data using the lineplot.CI command in the sciplot package.
I want to plot the data of 2 experimental cases using different lines (traces). Time is on the X-axis. The tricky thing is that the data collection in the second case started later than for the first case. This is to say: the first n data points for the second case are missing.
So far so good. However,
2011 May 05
2
Compiling a FORTRAN program under Windows 7
Hi,
I am trying to compile a FORTRAN program to call from R under Windows 7 but
I am having problem in the compiling step. To demonstrate this is the
program testit.f:
------------------------------------------
subroutine TESTIT(x,n,m)
dimension x(n)
do 10 i=1,n
10 x(i)=x(i)**m
end
--------------------------------------------
When I compile it with gfortran I get
2013 Mar 05
1
Reading Wyoming radiosonde data files with RadioSonde package
Hi,
I need to do some analysis on historic daily radiosonde data I download
from the Wyoming Univ. web page (
http://weather.uwyo.edu/upperair/sounding.html).
I am trying to use the RadioSonde package (V 1.3), but the format of the
files from Wyoming don't match what RadioSonde is expecting.
Has anyone used the Radiosonde package on the Wyoming data?
Here is a sample of the Wyoming file
2011 Jul 26
2
How to use as.Date (or something else) with "31-Jul-2010 23:59:00"
Hello
I have a huge file (not an R-file) in which the first column is a string
with date, hour, minutes and seconds (For instance, "31-Jul-2010 23:59:00").
I tried as.Date but the error msg was "Error in charToDate(x) :
character string is not in a standard unambiguous format".
I have checked the help for the function as well as date but to no avail.
How can that sort
2006 Jul 13
2
References verifying accuracy of R for basic statistical calculations and tests
Do you know of any references that verify the accuracy of R for basic statistical calculations and tests. The results of these studies should indicate that R results are the same as the results of other statistical packages to a certain number of decimal places on some benchmark calculations.
Thanks,
Corey Powell
Clinical Data Analyst
Broncus Technologies
cpowell@broncus.com
[[alternative
2007 Apr 20
3
Opinion on R plots: connecting X and Y
Attention R users, especially those that are experienced enough to be
opinionated, I need your input.
Consider the following simple plot:
x <- rnorm(100)
y <- rnorm(100)
plot(x, y, bty='n')
A colleague (and dreaded SAS user) commented that she thought that my
plots could be "cleaned up" by connecting the X and Y axes. I know that
I can do that with bty='l' but I