Tinus Sonnekus | 1 Sep 12:52 2014
Picon

Depth vs Temp graph for different transects

Hi All,

Have the following code. The graph works well plotting the 15 transect for
me however the legend shows a total of 22 transects. The original data has
22 transects numbered from 1 to 22. New data set got only 15. How can I get
the legend to show only the transects plotted.

# Create Line Chart

TAll <- read.csv("TAll Data.csv")

# convert factor to numeric for convenience
TAll$Tran <- as.numeric(TAll$Trans)
nTrans <- max(TAll$Trans)

# get the range for the x and y axis
xrange <- range(TAll$Temp)
yrange <- range(TAll$Depth)

# set up the plot
plot(xrange, yrange, ylim = rev(yrange), type="n", xlab="Temp (deg C)",
  ylab="Depth (m)" )
colors <- rainbow(nTrans)
linetype <- c(1:nTrans)
plotchar <- seq(1,1+nTrans,1)

# add lines
for (i in 1:nTrans) {
  tree <- subset(TAll, Trans==i)
  lines(tree$Temp, tree$Depth, type="b", lwd=1.5,
(Continue reading)

Gareth Davies | 1 Sep 05:12 2014
Picon

rgl zooming to an arbitrary location


I have been using rgl to view xyz point clouds containing topographic 
data ( with around 10^5 - 10^6 points).

It's working well aside from one thing: I would like to be able to zoom 
into an arbitrary part of the plot. However so far I could only figure 
out how to zoom into the centre.

See the example below -- in this case, I cannot 'zoom-in' to anything 
other than the central hill in the topography, whereas I would like to 
be able to zoom to an arbitrary location.

Is there a way to get around this?

##########################################
# EXAMPLE CODE
##########################################
library(rgl)
# Make up some topography
x=runif(1e+06, min=0,max=1000)
y=runif(1e+06, min=0,max=1000)
# Elevation with 'hill' in the centre
z=sin(x/50.)+cos(y/50.) + 30*exp(-((x-500)^2+(y-500)^2)*0.001)
plot3d(x,y,z,col=z+3,aspect=FALSE)
# Now try zooming [right mouse button]. I can only zoom into the central 
hill, not elsewhere.

Below are the details of my R Install

 > sessionInfo()
(Continue reading)

Girija Kalyani | 31 Aug 19:39 2014
Picon

Rcurl error

Any package I try to download and install,
I get the folloing error.
My configuration:
R-3.1.1
Windows-32 bit

Error in inDL(x, as.logical(local), as.logical(now), ...) :
  unable to load shared object 'C:/Program
Files/R/R-3.1.1/library/RCurl/libs/i386/RCurl.dll':
  LoadLibrary failure:  The specified procedure could not be found.

Thanx in advance

--

-- 
:) Smile is my Style :)

	[[alternative HTML version deleted]]

Dominic Roye | 31 Aug 21:37 2014
Picon

Netcdf

Hello,

I have an issue with a conection to a ncdf file.

ftp://ftp.cdc.noaa.gov/Public/www/X91.116.178.214.242.12.49.49.nc

open.ncdf("X91.116.178.214.242.12.49.49.nc")
Error in R_nc_open: NetCDF: Unknown file format
Error in open.ncdf("X91.116.178.214.242.12.49.49.nc") :
  Error in open.ncdf trying to open file X91.116.178.214.242.12.49.49.nc

Anyone knows a solution?

Thanks,

	[[alternative HTML version deleted]]

mei_yuan | 31 Aug 16:52 2014
Picon

estimation for growth incidence curve

Hi,

Is there anyone who knows about estimating growth incidence curve with R?

Mei-Yuan 

Dept. of Finance
National Chung Hsing University 

Rui Barradas | 31 Aug 13:31 2014
Picon

help.start() has a faulty link

Hello,

With 'help.start()' an HTML browser interface to help pops up.
In the section 'Miscellaneous Material' if you click on 'User Manuals' 
an error occurs:

Error in vignettes[i, "PDF"] : subscript out of bounds

Is this a bug? A missing link?

Rui Barradas

PO SU | 31 Aug 07:04 2014

what happened when copying a function definition into R prompt then press Enter?


Dear expeRts,
    That's to say,what happened when loading source code  into memory? what's the difference between it
and loading installed code into memory? Do they related with .Rdata?
   
       

--

PO SU
mail: desolator88 <at> 163.com 
Majored in Statistics from SJTU
______________________________________________
R-help <at> 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 provide commented, minimal, self-contained, reproducible code.
Girija Kalyani | 30 Aug 22:40 2014
Picon

Error in inDL(x, as.logical(local), as.logical(now), ...)

Dear Group,

I get this error when loadin RCurl. What could be the reason?
My configuration:
R-version : 3.1.1
Windows- 32,

Error in inDL(x, as.logical(local), as.logical(now), ...) :
  unable to load shared object 'C:/Program
Files/R/R-3.1.1/library/RCurl/libs/i386/RCurl.dll':
  LoadLibrary failure:  The specified procedure could not be found.

how do i solve this.
Since RCurl seems mandatory to install Rgbif.
--

-- 
:) Smile is my Style :)

	[[alternative HTML version deleted]]

Felipe Carrillo | 30 Aug 23:11 2014
Picon

ddply question

I apologize about cross posting but my question keeps bouncing back from the list

 How come pct doesn't work in this ddply call?
I am trying to get a percent of 'TotalCount' by SampleDate and Age
 library(plyr)
b <- structure(list(SampleDate = structure(c(1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L), .Label = "5/8/1996", class = "factor"), TotalCount = c(1L,
2L, 1L, 1L, 4L, 3L, 1L, 10L, 3L), ForkLength = c(61L, 22L, NA,
NA, 72L, 34L, 100L, 23L, 25L), TotalSalvage = c(12L, 24L, 12L,
12L, 17L, 23L, 31L, 12L, 15L), Age = c(1L, 0L, NA, NA, 1L, 0L,
1L, 0L, 0L)), .Names = c("SampleDate", "TotalCount", "ForkLength",
"TotalSalvage", "Age"), class = "data.frame", row.names = c(NA,
-9L))
b
ddply(b,.(SampleDate,Age),summarise,salvage=sum(TotalSalvage),pct=TotalCount/sum(TotalCount))
Error: expecting result of length one, got : 4

#Computing TotalCount inside ddply works but the pct seems wrong...
ddply(b,.(SampleDate,Age),summarise,salvage=sum(TotalSalvage),Count=sum(TotalCount),pct=Count/sum(Count))
	[[alternative HTML version deleted]]

Spencer Graves | 30 Aug 22:30 2014

clean email addresses?

       Does anyone have suggestions for cleaning a list of email addresses?

       I ask, because I can read into R data on registered voters that 
includes an "email address" field.  I wondered if anyone had experience 
doing such, especially in R.  (I found an article on "How to Clean Large 
Email Contact Lists for Email Marketing Campaigns"; 
"www.wikihow.com/Clean-Large-Email-Contact-Lists-for-Email-Marketing-Campaigns". 
Before I went further with this, I felt a need to ask.

       Thanks,
       Spencer Graves

Adam Lawrence | 30 Aug 02:46 2014
Picon

Bus stop sequence matching problem

I am hoping someone can help me with a bus stop sequencing problem in R,
where I need to match counts of people getting on and off a bus to the
correct stop in the bus route stop sequence. I have tried looking
online/forums for sequence matching but seems to refer to numeric sequences
or DNA matching and over my head. I am after a simple example if anyone can
please help.

I have two data series as per below (from database), that I want to
combine. In this example “stop_sequence” includes the equence (seq) of bus
stops and “stop_onoff” is a count of people getting on and off at certain
stops (there is no entry if noone gets on or off).

stop_sequence <- data.frame(seq=c(10,20,30,40,50,60),
ref=c('A','B','C','D','B','A'))
##   seq ref
## 1  10   A
## 2  20   B
## 3  30   C
## 4  40   D
## 5  50   B
## 6  60   A
stop_onoff <-
data.frame(ref=c('A','D','B','A'),on=c(5,0,10,0),off=c(0,2,2,6))
##   ref on off
## 1   A  5   0
## 2   D  0   2
## 3   B 10   2
## 4   A  0   6

I need to match the stop_onoff numbers in the right sto sequence, with the
(Continue reading)


Gmane