Displaying 20 results from an estimated 1000 matches similar to: "Calling Windows DLL using .C; function name not known but in exports."
2012 Jan 24
2
Calling function in DLL using .C
I cannot understand why a function appears to be available to R
(is.loaded('planckwR') returns TRUE) but the call with .C results in an
error message:
C symbol name 'planckwR' not in DLL for package <path to DLL file here>
This is what I do:
Loading a homebrewed DLL, compiled with MS VS97. The functions are all
void, the C calling sequence is used and all arguments
2009 May 15
2
Using column length in plot gives error
Hi
I'm trying to write a generic script for processing some data which finishes
off with some plots. Given Im never sure how many columns will be in my
dataframe I wanted to using the following
plot(spectra.wavelength, cormat, type = "l", ylim=c(-1,1), xlab="Wavelength
(nm)", ylab="Correlation")
however even if I specify as type="l" it appears plot
2009 Oct 27
4
automatically adjusting axis limits
Dear R users,
I am a newbie. Just switched from MATLAB. So thanks a lot for your
patience.
I have 50000 spectra collected in field. Each spectra has two columns :
Wavelength (56) and the actual measurement.
Each measurement came in a different .txt file on disk (50000 files in
total). I wrote a script that reads every spectra in a for loop and
constructs two variables :
Wavelength (56) and
2012 Apr 24
1
Nested longitudinal data
Hi,
I have some difficulty in figuring out whether I am doing correct or not.
A brief introduction about the work: It is a light/dark choice test
conducted in insect larvae. The response is binary (0- present in dark
area, 1-present in light area) and the experiment is run for 15 min, so
there are 15 repeated measurements per individual larva at 1 min
intervals. The factors which affect
2008 Oct 27
1
replace a few strings in a text file
Dear all,
I wrote a wrapper to a FORTRAN program using R. The main program uses
a text file (~200 lines) as an input describing the simulation to be
run. I typically generate the file once with the right parameters
using a combination of file(), paste(), cat(). This is fine, and it
works well, however I then need to update only a few values in the
file many times (~200 times,
2010 Oct 12
2
repeatability/intraclass with nested levels
I have a spectrophotometric dataset with repeated measures of a value
at 200 wavelengths for each of 150 individuals.
I would like to use the repeated samples to at each wavelength to look
at measurement/observer error, compared to difference between
individuals error
I have looked at doing this with icc{irr} or using an anova approach,
but I am unclear how to acheive this given that there
2011 May 04
1
Outlier removal by Principal Component Analysis : error message
Hi,
I am currently analysis Raman spectroscopic data with the hyperSpec package.
I consulted the documentation on this package and I found an example
work-flow dedicated to Raman spectroscopy (see the address :
http://hyperspec.r-forge.r-project.org/chondro.pdf)
I am currently trying to remove outliers thanks to PCA just as they did in
the documentation, but I get a message error I can't
2010 Sep 22
2
plot.ts versus plot.zoo
plot.ts has an argument yax.flip, plot.zoo does not.
Is there a way to make the yaxis flip in plot.zoo?
I tried using a custom panel function:
panel.yaxis<-function(...) {
npnl<-parent.frame$panel.number
if (npnl %% 2 == 0) {
axis(side=3)
} else {
axis(side=2)
}
}
This leads to a blank window. I am stuck with the intricacies of the
plotting and axis
2010 May 05
3
Memory issue
Reading a flat text file 138 Mbyte large into R with a combination of
scan (to get the header) and read.table. After conversion of text time
stamps to POSIXct and conversion of integer codes to factors I convert
everything into one data frame and release the old structures containing
the data by using rm().
Strangely, the rm() does not appear to reduce the used memory. I checked
using
2002 Nov 22
4
Use of variables to reference to objects
Hi,
I'm new to R and looking for a way to use a variable to reference to an
object.
I'm plotting several graphs on top of each other and want to do this by
a for loop. The field I want to graph have names like a1,a2,a3, ...
I can't figure out how to get this working:
It should look like this:
lines(spectral$Wavelength,paste("spectral$a",j,sep=""),col=j)
but
2004 Oct 26
2
integration problem
Dear R users,
I have spectral data (say, wavelength vs. extinction coefficient) for
which I??d like to calculate an integral (i.e. the area underneath the
curve).
Suppose the (artificial) dataset is
lambda E
1 2
2 4
3 5
4 8
5 1
6 5
7 4
8 9
9 8
10 2
How can I calculate an integral for these values using R?
Many thanks for any help!
Regards
Christoph
2010 Jun 16
1
Decoding raw vectors every other byte
I have to decode raw vectors read from a connection like this:
+++++++++++++++++++
fl<-file.choose()
fb<-file.info(fl)$size
fc<-file(fl)
open(fc,open='rb')
seek(fc,where=offset)
dat<-readBin(fc,'raw',n=(fb-offset),size=1,signed=FALSE)
close(fc)
++++++++++++++++++
The decoding performs a combination of a simple bitwise operator and a
simple arithmatic operator on
2012 Oct 10
1
write.csv with append = TRUE
Is there a way to make any of the write functions (.table or .csv) append
to the same file?
I get this warning message and do not know how to enable the appending.
Warning messages:
1: In write.csv(names(Lbys)[c], fo, append = TRUE) :
attempt to set 'append' ignored
2: In write.csv(Lbys[[c]], fo, append = TRUE) :
attempt to set 'append' ignored
Regards,
Alex van der Spek
2012 Oct 30
1
Is there an lm() equivalent of panel.lmline()?
panel.lmline returns intercept and slope of y ~ x subsetted to the
combination of conditioning factors given to xyplot in lattice.
for instance:
xyplot(Xvalues ~ log(Qvalues)|Tfac, data = df7, panel = panel.lmline)
I am looking to find the equivalent formulation for lm() proper. If I do
this:
lmcal <- lm(Xvalues ~ log(Qvalues):Tfac, data = df7)
Only one value of the intercept is returned.
2009 Jul 10
1
problems with contrast matrix
Dear lme and lmer -ers,
I have some problems using "home-made" contrast matrix in lme and lmer.
I
did an experiment to investigate the relationship between the response of an animal and some factors, namely the light wavelength (WA), the light intensity to which this animal was exposed and the sex of the animal
tested.
- The response can be a variable LA (normal
distribution) or
2012 Nov 26
1
zoo timeseries plot; minor tic mark level control
I cannot figure out how to tune the minor tic marks on the date axis of a
zoo plot.
I read hundreds of CSV files from a zip archive transparently. The
time/date strings I convert to POSIXct format, order them and then make a
zoo object as there may be cases which have unequal time stamping. As
follows:
######################
#Transform timestamps and reorder them
dat <- transform(dat,
2008 Jan 07
4
side by side plots
Hello everyone,
I have an overlay plot it's nice but you can't see all the data. I would
like to know if there is a way to get a plot that gives a side by side
plot so that each plot would be next to each other. The two plots have
the same data are of different species. At the moment this is the code I'm
using:
exp<-cbind(abs(round(rnorm(10),2)*10), seq(100, 200, by=10))
2009 Mar 14
3
[OT] two question about color space.
Hi there,
I try to plot visible light spectrum (380nm~780nm) with color
corresponding to the specific wavelength. However, I don't find a
function that could do this.
Another question, it's possible to plot a color space chromaticity
diagram like this:
http://upload.wikimedia.org/wikipedia/commons/thumb/0/02/CIExy1931.svg/300px-CIExy1931.svg.png
Thanks in advance!
Jinsong
2012 Oct 10
2
Summary using by() returns character arrays in a list
I use by() to generate a summary statistics like so:
Lbys <- by(dat[Nidx], dat$LipTest, summary)
where Nidx is an index vector with names picking out the columns in the
data frame dat.
This returns a list of character arrays (see below for str() output) where
the columns are named correctly but the rownames are empty strings and the
values are strings prepended with the summary
2009 Jun 11
2
Issues getting R to write image files
Hi All,
Have spent the last couple of days learning R and shell scripting to do
batch plotting jobs. I have had success getting R to complete a filled
contour plot and output to a file (.jpg or .tiff etc). However, when I try
to do the same thing with the simple plot command the script seems to
execute correctly yet there is no output. Below is my R code:
file <-