Re: [R] aligning axis labels in a colorkey from levelplot

2012-06-26 Thread Stephen Eglen
Deepayan Sarkar deepayan.sar...@gmail.com writes: You can specify a fixed-width fontfamily if that helps: levelplot(matrix(seq(4,120,l=9),3,3), colorkey = list(at = seq(0, 120, 20), labels = list(labels = c(' 0',' 20',' 40',' 60',' 80','100','120'),

[R] Drawing (lon,lat) coordinates onto the image of a world

2012-06-26 Thread Steven Winter
Given a set of latitude and longitude coordinates pairs (stored in variables latitudevals and longitudevals), I would like to plot them onto the image of a equirectangular world map. I would like to plot each coordinate pair with a red circle, if possible. Does anyone have any suggestions as to

[R] increase the usage of CPU and Memory

2012-06-26 Thread Xi
Dear All, I have been searching online for help increasing my R code more efficiently for almost a whole day, however, there is no solution to my case. So if anyone could give any clue to solve my problem, I would be very appreciate for you help. Thanks in advance. Here is my issue: My desktop

[R] Packaging Error

2012-06-26 Thread Mayank Bansal
I was trying to ByteCompile a package that I made. The package compiles successfully with byte compile set to FALSE. When I set ByteCompile to TRUE, I receive the following error message while doing R CMD INSTALL /usr/lib/R/bin/INSTALL: line 34: 9964 Done echo 'tools:::.install_packages()'

Re: [R] Save rgl plot3d Graph as Image

2012-06-26 Thread iris
In the rgl package *rgl.postscript *can save 3d scatter plots you have generated using the plot3d command . For example open3d() x - sort(rnorm(1000)) y - rnorm(1000) z - rnorm(1000) + atan2(x,y) plot3d(x, y, z, col=rainbow(1000)) rgl.postscript(persp3dd.pdf,pdf) -- View this message in

Re: [R] Loop for multiple plots in figure

2012-06-26 Thread Marcel Curlin
This solution works really nicely I learned much by working through it. However but I am having trouble with subplot formatting; setting main=d$Subject results in the correct title over each plot but repeated multiple times. Also I can't seem to format the axis labels and numbers to reduce the

Re: [R] Drawing (lon,lat) coordinates onto the image of a world

2012-06-26 Thread Pascal Oettli
Hello, What do you mean by image? A file (jpeg, bmp,...)? Best Regards Le 26/06/2012 10:47, Steven Winter a écrit : Given a set of latitude and longitude coordinates pairs (stored in variables latitudevals and longitudevals), I would like to plot them onto the image of a equirectangular

Re: [R] increase the usage of CPU and Memory

2012-06-26 Thread Prof Brian Ripley
See the vignette for package 'parallel' to make use of your 4 cores. On 26/06/2012 01:07, Xi wrote: Dear All, I have been searching online for help increasing my R code more efficiently for almost a whole day, however, there is no solution to my case. So if anyone could give any clue to solve

Re: [R] combineLimits and Dates

2012-06-26 Thread Peter Ehlers
On 2012-06-25 15:30, Duncan Mackay wrote: Hi Elliot This works on Win 7 ver 2.15 useOuterStrips(combineLimits( xyplot(x + y ~ d | g, groups = h, data = dat, type = 'l', scales = list(y = list(relation = free), x = list( at =seq(from =

Re: [R] increase the usage of CPU and Memory

2012-06-26 Thread Oliver Ruebenacker
Hello Xi, If a program has input or output to disk or network, this may cause it to wait and not use the available CPU. Output is usually buffered, but may cause delay if the buffer gets full (I'm not sure though whether this is an issue with plenty of memory available) Take care

Re: [R] graph displays

2012-06-26 Thread MSousa
Good morning, Thanks for help. I can explain better what I am trying to do. I'm trying to read data from a file, separated by a tab, with the following code. Dataset-read.table(C:/Users/Administrator/Desktop/R/graph.txt,sep=\t, quote=\,header = TRUE) View(Dataset) dput(Dataset) View(Dataset)

[R] Error in mice

2012-06-26 Thread Anera Salucci
Hi all, I am imputing missingness of  90 columns  in a  data frame using mice. But mice gives back :  Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE,  :   too many (1100) weights Any idea to solve this error is welcome, Anera [[alternative HTML

[R] compare one field of dataframe with excel sheet using R

2012-06-26 Thread sathya7priya
I have a data frame consisting of three columns(name of compund,ppm and frequency).Name contains string values .ppm and frequency contains numeric values with decimal points upto four digits. I have an excel sheet which is like a library.The first column contains the name of compounds and

[R] How to estimate variance components with lmer for models with random effects and compare them with lme results

2012-06-26 Thread KL
Hi, I performed an experiment where I raised different families coming from two different source populations, where each family was split up into a different treatments. After the experiment I measured several traits on each individual. To test for an effect of either treatment or source as well

[R] MuMIn - assessing variable importance following model averaging, z-stats/p-values or CI?

2012-06-26 Thread Robertson, Andrew
Dear R users, Recent changes to the MuMIn package now means that the model averaging command (model.avg) no longer returns confidence intervals, but instead returns zvalues and corresponding pvalues for fixed effects included in models. Previously I have used this package for model

Re: [R] Loop for multiple plots in figure

2012-06-26 Thread baptiste auguie
Try this alternative solution using only base functions: # split the data into 4 data.frames l - split(data, data$Subject) names(l) # set up the graph parameters par(mfrow=n2mfrow(length(l)), mar=c(4,4,1,1), mgp = c(2, 1, 0)) # good old for loop over the subject names for( n in names(l)){ d -

[R] clean Email format data

2012-06-26 Thread climmi
Dear all I am now going to do some text analysis using R. However, the data is very noisy that I need to clean it first. I don't have much experience in the text cleaning process. Is anyone would provide help on this? If you are able to provide some similar code which was done before would be

Re: [R] Error in mice

2012-06-26 Thread Prof Brian Ripley
On 26/06/2012 08:59, Anera Salucci wrote: Hi all, I am imputing missingness of 90 columns in a data frame using mice. But mice gives back : Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE, : too many (1100) weights Any idea to solve this error is

Re: [R] How to estimate variance components with lmer for models with random effects and compare them with lme results

2012-06-26 Thread Bert Gunter
1. This is not an R question; it is a statistical issue. 2. R-sig-mixed-models is the appropriate list, not r-help. -- Bert On Tue, Jun 26, 2012 at 3:28 AM, KL sticklena...@gmail.com wrote: Hi, I performed an experiment where I raised different families coming from two different source

Re: [R] graph displays

2012-06-26 Thread Jim Lemon
On 06/26/2012 06:24 PM, MSousa wrote: Good morning, Thanks for help. I can explain better what I am trying to do. I'm trying to read data from a file, separated by a tab, with the following code. Dataset-read.table(C:/Users/Administrator/Desktop/R/graph.txt,sep=\t, quote=\,header = TRUE)

Re: [R] Drawing (lon,lat) coordinates onto the image of a world

2012-06-26 Thread Sarah Goslee
Hi Steve, On Mon, Jun 25, 2012 at 9:47 PM, Steven Winter stevenwinte...@yahoo.com wrote: Given a set of latitude and longitude coordinates pairs (stored in variables latitudevals and longitudevals), I would like to plot them onto the image of a equirectangular world map. I would like to plot

Re: [R] compare one field of dataframe with excel sheet using R

2012-06-26 Thread Jean V Adams
It would help if you provided an example for your data frame, and example for your spreadsheet, and more information on how to judge if the ppm values are similar. Maybe this code will help you get started ... # Here's an example data frame mydf - data.frame( compound=letters[1:10],

Re: [R] significance level (p) for t-value in package zelig

2012-06-26 Thread Rune Haubo
My point was just that the situation in a cumulative link model is not much different from a binomial glm - the binomial glm is even a special case of the clm with only two response categories. And just like summary(glm(, family=binomial)) reports z-values and computes p-values by using the

Re: [R] graph displays

2012-06-26 Thread John Kane
Sorry I misunderstood what you wanted. Using ggplot2 and reshape2 which I imagine you will have to install, this should give you what you want library(ggplot2) library(reshape2) xx1 - melt(Dataset, id = c(Source)) p - ggplot( xx1 , aes(variable, value, fill= Source )) +

Re: [R] rrdf package for mac not working

2012-06-26 Thread Uwe Ligges
Please contact the package maintainer. Best, Uwe Ligges On 26.06.2012 00:41, Ricardo Pietrobon wrote: rrdf is incredibly helpful, but I've notice that the rrdf package for mac hasn't been working for some time: http://goo.gl/5Ukpn . wondering if there is still a plan to maintain that in the

Re: [R] rrdf package for mac not working

2012-06-26 Thread Uwe Ligges
On 26.06.2012 00:41, Ricardo Pietrobon wrote: rrdf is incredibly helpful, but I've notice that the rrdf package for mac hasn't been working for some time: http://goo.gl/5Ukpn . wondering if there is still a plan to maintain that in the long run, or if there is some other alternative to read

Re: [R] MuMIn - assessing variable importance following model averaging, z-stats/p-values or CI?

2012-06-26 Thread Uwe Ligges
Please contact the package maintainer. Best, Uwe Ligges On 26.06.2012 12:46, Robertson, Andrew wrote: Dear R users, Recent changes to the MuMIn package now means that the model averaging command (model.avg) no longer returns confidence intervals, but instead returns zvalues and

Re: [R] Packaging Error

2012-06-26 Thread Uwe Ligges
On 26.06.2012 08:54, Mayank Bansal wrote: I was trying to ByteCompile a package that I made. The package compiles successfully with byte compile set to FALSE. When I set ByteCompile to TRUE, I receive the following error message while doing R CMD INSTALL /usr/lib/R/bin/INSTALL: line 34:

[R] plotting two histograms on one plot with hist function

2012-06-26 Thread Blignaut, M, Mej mb...@sun.ac.za
I would like to plot two data sets (frequency (y-axis) of mean values for 0-1(x=axis)) on a single histogram for comparison. The hist() only allow the overlay of two histograms, and although barplot() allows beside=TRUE, it does not show frequency values (like hist) but rather all of the

[R] rms package-superposition prediction curve of ols and data points

2012-06-26 Thread achaumont
Hello, I have a question about the “plot.predict” function in Frank Harrell's rms package. Do you know how to superpose in the same graph the prediction curve of ols and raw data points? Put most simply, I would like to combine these two graphs: fit_linear - ols (y4 ~

[R] shapiro.test()

2012-06-26 Thread reso
Hey, today I wanted to use the shapiro.test() on data containing 3 numerical values per group. It is the first time that an NA was given back for some of the groups. In the follwing an example of code and output is shown: shapiro.test(c(0.000637806, 0.00175561, 0.001196708))

Re: [R] Remove empty levels in subset

2012-06-26 Thread svo
Hi, I have exactly the same question (how to remove empty levels in my subset), but in my case the factor command does not work, because my dataframe is not atomic Try this: test2$a - factor(test2$a) R gives me the error message: Error in sort.list(y) : 'x' must be atomic for 'sort.list'

[R] Intersection

2012-06-26 Thread Васильченко Александр
Hello. I have a problem with 2 dataframes. There are 2 columns - value and dates. These dataframes have different dimension. Some dates coincide. And I need to intersect them by dates and have on output two dataframes with identical columns dates and new dimension . value have to recieve in

Re: [R] rms package-superposition prediction curve of ols and data points

2012-06-26 Thread Sarah Goslee
You could use points() instead of plot() for the second command. Sarah On Tue, Jun 26, 2012 at 8:37 AM, achaumont agnes.chaum...@live.be wrote: Hello, I have a question about the “plot.predict” function in Frank Harrell's rms package. Do you know how to superpose in the same graph the

Re: [R] Intersection

2012-06-26 Thread Sarah Goslee
That sounds like a job for merge(), but it's hard to be sure because you didn't provide the information requested in the posting guide. Sarah On Tue, Jun 26, 2012 at 11:03 AM, Васильченко Александр vasilchenko@gmail.com wrote: Hello. I have a problem with 2 dataframes. There are 2 columns

Re: [R] Remove empty levels in subset

2012-06-26 Thread Sarah Goslee
Hi, On Tue, Jun 26, 2012 at 8:06 AM, svo s.vanom...@uu.nl wrote: Hi, I have exactly the same question (how to remove empty levels in my subset), but in my case the factor command does not work, because my dataframe is not atomic Try this: test2$a - factor(test2$a) R gives me the error

[R] data.table vs plyr reg output

2012-06-26 Thread Geoffrey Smith
Hello. The data.table package is very helpful in terms of speed. But I am having trouble actually using the output from linear regression. Is there any way to get the data.table output to be as pretty/useful as that from the plyr package? Below is an example. library('data.table');

Re: [R] Intersection

2012-06-26 Thread andrija djurovic
Hi. Try with following functions: ?intersection ?%in% ?[ Perhaps someone will provide you more help if you read and follow posting guide http://www.R-project.org/posting-guide.htmlhttp://www.r-project.org/posting-guide.html Andrija On Tue, Jun 26, 2012 at 5:03 PM, ÷ÁÓÉÌØÞÅÎËÏ áÌÅËÓÁÎÄÒ

Re: [R] shapiro.test()

2012-06-26 Thread Özgür Asar
See ?shapiro.test ...the number of non-missing values must be between 3 and 5000. By the way, how reasonable testing normality of 3 values? Best ozgur -- View this message in context: http://r.789695.n4.nabble.com/shapiro-test-tp4634513p4634520.html Sent from the R help mailing list archive

Re: [R] plotting two histograms on one plot with hist function

2012-06-26 Thread John Kane
Why not just plot the two histograms on the same scale in a 2 panel plot? John Kane Kingston ON Canada -Original Message- From: mb...@sun.ac.za Sent: Tue, 26 Jun 2012 15:24:55 +0200 To: r-help@r-project.org Subject: [R] plotting two histograms on one plot with hist function I

Re: [R] rms package-superposition prediction curve of ols and data points

2012-06-26 Thread David Winsemius
On Jun 26, 2012, at 11:29 AM, Sarah Goslee wrote: You could use points() instead of plot() for the second command. Ummm. Maybe not. I think think that plot.Predict uses lattice graphics. You may need to use trellis.focus() followed by lpoints(). Or use the + operation with suitable

Re: [R] plotting two histograms on one plot with hist function

2012-06-26 Thread ilai
On Tue, Jun 26, 2012 at 10:02 AM, John Kane jrkrid...@inbox.com wrote: Why not just plot the two histograms on the same scale in a 2 panel plot? I think OP request was for comparison. Two panels may do, but why not a barplot of the histograms in the same panel ? barplot( rbind(

Re: [R] shapiro.test()

2012-06-26 Thread Özgür Asar
Actually, your sample size is 3. Sorry for that. Ozgur -- View this message in context: http://r.789695.n4.nabble.com/shapiro-test-tp4634513p4634525.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] increase the usage of CPU and Memory

2012-06-26 Thread Christofer Bogaso
On 26-06-2012 16:33, Oliver Ruebenacker wrote: Hello Xi, If a program has input or output to disk or network, this may cause it to wait and not use the available CPU. Output is usually buffered, but may cause delay if the buffer gets full (I'm not sure though whether this is an

Re: [R] Intersection

2012-06-26 Thread arun
Hi, Try this:  dat1-data.frame(value=c(15,20,25,30,45,50),dates=c(2005-05-25,2005-06-25,2005-07-25,2005-08-25,2005-09-25,2005-10-25)) dat2-data.frame(value=c(15,20,25,50),dates=c(2005-05-25,2005-06-25,2005-07-25,2005-10-25))  merge(dat1,dat2, by=dates)    dates value.x value.y 1 2005-05-25

Re: [R] How To Setup hunspell in R

2012-06-26 Thread Ribbis
Do you make any progress in solving this? I'm having the same struggle. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/How-To-Setup-hunspell-in-R-tp4541801p4634523.html Sent from the R help mailing list archive at Nabble.com.

[R] Ljung-Box test (Box.test)

2012-06-26 Thread Steven Winter
I fit a simple linear model y = bX to a data set today, and that produced 24 residuals (I have 24 data points, one for each year from 1984-2007). I would like to test the time-independence of the residuals of my model, and I was recommended by my supervisor to use the Ljung-Box test. The

Re: [R] shapiro.test()

2012-06-26 Thread peter dalgaard
On Jun 26, 2012, at 16:43 , r...@uni-potsdam.de wrote: Hey, today I wanted to use the shapiro.test() on data containing 3 numerical values per group. It is the first time that an NA was given back for some of the groups. In the follwing an example of code and output is shown:

Re: [R] increase the usage of CPU and Memory

2012-06-26 Thread Oliver Ruebenacker
Hello Christopher, If a process has data to write to hard disk, the data is usually written to a buffer in memory, and from there it is written to the hard disk independently of the CPU. Since writing to memory is much faster than writing to hard disk, this allows the process to run

[R] Compile C files

2012-06-26 Thread Frederico Mestre
Hello: Sorry, this might look like a beginner question, but I'm just starting to work on the C and R interface. I'm trying to compile a C file (with a function) to load it to an R function but, in the command line I keep getting a lot of errors, like:

Re: [R] How to specify newdata in a Cox-Modell with a time dependent interaction term?

2012-06-26 Thread Terry Therneau
I'm finally back from vacation and looking at your email. 1. The primary mistake is in your call, where you say fit - survfit(mod.allison.5, newdata.1, id=Id) This will use the character string Id as the value of the identifier, not the data. The effect is exactly the same as the

Re: [R] Ljung-Box test (Box.test)

2012-06-26 Thread Rui Barradas
Hello, That's a statistics question, but it's also about using an R function. The Ljung-Box test isn't supposed to be used in such a context, to test the residuals of an ols y = bX + e. It is used to test time independence of the original series or of the residuals of an ARMA(p, q) fit. In

[R] Storing whole regression results

2012-06-26 Thread Kevin Chang
Hello seasons R users, Is it possible to store a complete regression result into an array? I've already been able to save individual regression coefficients, but would like to store the whole regression results into different arrays through a loop. So that in under different quantiles

Re: [R] Storing whole regression results

2012-06-26 Thread Sarah Goslee
You can store entire regression results in a list, then use lapply() to retrieve individual coefficients as desired. Lists are very powerful for managing odd data formats, and no loops needed. Sarah On Tue, Jun 26, 2012 at 4:19 PM, Kevin Chang kchan...@uoguelph.ca wrote: Hello seasons R users,

[R] chisq.test

2012-06-26 Thread Omphalodes Verna
Dear list! I would like to calculate chisq.test on simple data set with 70 observations, but the output is ''Warning message:'' Warning message: In chisq.test(tabele) : Chi-squared approximation may be incorrect Here is an example:         tabele - matrix(c(11, 3, 3, 18, 3, 6, 5, 21), ncol

[R] Zero inflated: is there a limit to the level of inflation

2012-06-26 Thread SSimek
Hello, I have count data that illustrate the presence or absence of individuals in my study population. I created a grid cell across the study area and calcuated a count value for each individual per season per year for each grid cell. The count value is the number of time an individual was

[R] Figuring out encodings of PDFs in R

2012-06-26 Thread Jonas Michaelis
Dear list, I am currently scraping some text data from several PDFs using the readPDF() function in the tm package. This all works very well and in most cases the encoding seems to be latin1 - in some, however, it is not. Is there a good way in R to check character encodings? I found the

Re: [R] chisq.test

2012-06-26 Thread Peter Ehlers
On 2012-06-26 11:27, Omphalodes Verna wrote: Dear list! I would like to calculate chisq.test on simple data set with 70 observations, but the output is ''Warning message:'' Warning message: In chisq.test(tabele) : Chi-squared approximation may be incorrect Here is an example:

Re: [R] chisq.test

2012-06-26 Thread David L Carlson
The warning means that you have many cells with expected values less than 5 (4 of 8 cells in this case) so that the chi square estimate may be inflated. The good news is that the probability of the inflated chi square is .0978 which you probably would not consider to be significant anyway. If you

[R] flatten lists

2012-06-26 Thread Jeroen Ooms
I am looking for a function to flatten a list to a list of only 1 level deep. Very similar to unlist, however I don't want to turn it into a vector because then everything will be casted to character vectors: x - list(name=Jeroen, age=27, married=FALSE, home=list(country=Netherlands,

Re: [R] plotting two histograms on one plot with hist function

2012-06-26 Thread John Kane
Oh, I had not thought of it in those terms. It does make sense now. John Kane Kingston ON Canada -Original Message- From: ke...@math.montana.edu Sent: Tue, 26 Jun 2012 10:57:31 -0600 To: jrkrid...@inbox.com Subject: Re: [R] plotting two histograms on one plot

Re: [R] Zero inflated: is there a limit to the level of inflation

2012-06-26 Thread Marc Schwartz
On Jun 26, 2012, at 2:10 PM, SSimek wrote: Hello, I have count data that illustrate the presence or absence of individuals in my study population. I created a grid cell across the study area and calcuated a count value for each individual per season per year for each grid cell. The count

Re: [R] Zero inflated: is there a limit to the level of inflation

2012-06-26 Thread Achim Zeileis
On Tue, 26 Jun 2012, Marc Schwartz wrote: On Jun 26, 2012, at 2:10 PM, SSimek wrote: Hello, I have count data that illustrate the presence or absence of individuals in my study population. I created a grid cell across the study area and calcuated a count value for each individual per season

Re: [R] flatten lists

2012-06-26 Thread Neal Fultz
do.call(c, x) maybe? On Tue, Jun 26, 2012 at 02:25:40PM -0700, Jeroen Ooms wrote: I am looking for a function to flatten a list to a list of only 1 level deep. Very similar to unlist, however I don't want to turn it into a vector because then everything will be casted to character vectors:

Re: [R] flatten lists

2012-06-26 Thread Jeroen Ooms
Hmm that doesn't seem to work if the original list is nested more than 2 levels deep. I should have probably given a better example: x - list(name=Jeroen, age=27, married=FALSE, home=list(country=list(name=Netherlands, short=NL), city=Utrecht)) On Tue, Jun 26, 2012 at 3:04 PM, Neal Fultz

Re: [R] flatten lists

2012-06-26 Thread Jeroen Ooms
Alright, but I need something recursive for lists with arbitrary deepness. On Tue, Jun 26, 2012 at 3:37 PM, arun smartpink...@yahoo.com wrote: Hi, Try: do.call(c,do.call(c,x)) x1-do.call(c,do.call(c,x))  x2-flatlist(x)  identical(x1,x2) [1] TRUE A.K. - Original Message

Re: [R] chisq.test

2012-06-26 Thread David Winsemius
On Jun 26, 2012, at 2:27 PM, Omphalodes Verna wrote: Dear list! I would like to calculate chisq.test on simple data set with 70 observations, but the output is ''Warning message:'' Warning message: In chisq.test(tabele) : Chi-squared approximation may be incorrect Here is an example:

Re: [R] Indexing matrices from the Matrix package with [i, j] seems to be very slow. Are there faster alternatives?

2012-06-26 Thread Søren Højsgaard
Dear Duncan Thanks for your suggestion, but I really need sparse matrices: I have implemented various graph algorithms based on adjacency matrices. For large graphs, storing all the 0's in an adjacency matrices become uneconomical, and therefore I thought I would use sparse matrices but the

[R] mixture distribution with positive and negative probabilities

2012-06-26 Thread Yakir Gagnon
Hi! Any ideas on which package (e.g. mixdist, flexmix, etc) how I could fit a mixture of say 3 Gaussian functions where 2 have their proportions, means, and sigmas, and the third has a mean, sigma but a negative proportion. Basically I'm trying to fit a mixture model to a distribution that I know

Re: [R] flatten lists

2012-06-26 Thread Bert Gunter
Frankly, I'm not sure what you mean, but presumably unlist(yourlist, recurs=FALSE) is not it, right? -- Bert On Tue, Jun 26, 2012 at 2:25 PM, Jeroen Ooms jeroen.o...@stat.ucla.eduwrote: I am looking for a function to flatten a list to a list of only 1 level deep. Very similar to unlist,

Re: [R] Indexing matrices from the Matrix package with [i, j] seems to be very slow. Are there faster alternatives?

2012-06-26 Thread Søren Højsgaard
Duncan, I should probably add that I am aware that my code is not the solution and also that the relative gain of my code probably decreases with the problem size until eventually it will perform worse that [i,j] (because of copying I suppose). So my point is just: It would just be nice if

Re: [R] Compile C files

2012-06-26 Thread Duncan Murdoch
On 12-06-26 2:48 PM, Frederico Mestre wrote: Hello: Sorry, this might look like a beginner question, but I'm just starting to work on the C and R interface. I'm trying to compile a C file (with a function) to load it to an R function but, in the command line I keep getting a lot of errors,

Re: [R] Figuring out encodings of PDFs in R

2012-06-26 Thread Duncan Murdoch
On 12-06-26 3:28 PM, Jonas Michaelis wrote: Dear list, I am currently scraping some text data from several PDFs using the readPDF() function in the tm package. This all works very well and in most cases the encoding seems to be latin1 - in some, however, it is not. Is there a good way in R to

[R] RES: Compile C files

2012-06-26 Thread Frederico Mestre
Hello: I just reinstalled R and Rtools. It works perfectly now. Thanks, Frederico -Mensagem original- De: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Enviada em: quarta-feira, 27 de Junho de 2012 01:06 Para: Frederico Mestre Cc: r-help@r-project.org Assunto: Re: [R] Compile

Re: [R] rms package-superposition prediction curve of ols and data points

2012-06-26 Thread Frank Harrell
This is what the addpanel argument to plot.Predict is for, something along the lines of ap - function(...) lpoints(age, weight) plot(Predict(. . .), addpanel=ap) Frank David Winsemius wrote On Jun 26, 2012, at 11:29 AM, Sarah Goslee wrote: You could use points() instead of plot() for the

[R] question about formatting Dates

2012-06-26 Thread Erin Hodgess
Dear R People: I have dates as factors in the following: poudel.df$DATE [1] 1/2/2011 1/4/2011 1/4/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 [8] 1/9/2011 1/10/2011 Levels: 1/10/2011 1/2/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 1/9/2011 I want them to be regular dates which can be sorted,

Re: [R] chisq.test

2012-06-26 Thread arun
Hi, The error is due to less than 5 observations in some cells. You can try, fisher.test(tabele)     Fisher's Exact Test for Count Data data:  tabele p-value = 0.0998 alternative hypothesis: two.sided A.K. - Original Message - From: Omphalodes Verna omphalodes.ve...@yahoo.com

Re: [R] flatten lists

2012-06-26 Thread arun
Hi, Try: do.call(c,do.call(c,x)) x1-do.call(c,do.call(c,x))  x2-flatlist(x)  identical(x1,x2) [1] TRUE A.K. - Original Message - From: Jeroen Ooms jeroen.o...@stat.ucla.edu To: Neal Fultz nfu...@gmail.com Cc: r-help@r-project.org Sent: Tuesday, June 26, 2012 6:23 PM Subject: Re:

Re: [R] Zero inflated: is there a limit to the level of inflation

2012-06-26 Thread Stephanie L. Simek
Thank you both for your quick response and input. I will consider all of your points and see what we are able to derive from there. Thank you again for your time and expertise. -Stephanie --- Stephanie L. Simek Carnivore Ecology Lab Forest

Re: [R] flatten lists

2012-06-26 Thread arun
Hi, I hope this helps. Tested to some depth. x1 - list(name=Jeroen, age=27, married=FALSE, home=list(country=list(name=Netherlands, short=NL), city=Utrecht)) x2 - list(name=Jeroen, age=27, married=FALSE, home=list(country=list(name=list(Country1=Netherlands,Country2=Spain),

Re: [R] question about formatting Dates

2012-06-26 Thread R. Michael Weylandt
On Tue, Jun 26, 2012 at 10:54 PM, Erin Hodgess erinm.hodg...@gmail.com wrote: Dear R People: I have dates as factors in the following: poudel.df$DATE [1] 1/2/2011  1/4/2011  1/4/2011  1/4/2011  1/6/2011  1/7/2011  1/8/2011 [8] 1/9/2011  1/10/2011 Levels: 1/10/2011 1/2/2011 1/4/2011

[R] A solution for question about formatting Dates

2012-06-26 Thread Erin Hodgess
Hello again: Here is a solution to the dates without leading zeros: pou1 - function(x) { #Note: x is a data frame #Assume that Column 1 has the date #Column 2 has station #Column 3 has min #Column 4 has max library(stringr) w - character(length=nrow(x))

Re: [R] chisq.test

2012-06-26 Thread Rolf Turner
On 27/06/12 08:54, arun wrote: Hi, The error is due to less than 5 observations in some cells. NO, NO, NO It's not the observations that matter, it is the ***EXPECTED COUNTS***. These must all be at least 5 in order for the null distribution of the test statistic to be

Re: [R] A solution for question about formatting Dates

2012-06-26 Thread R. Michael Weylandt
Please don't change subject lines for follow-on comments. It messes up threading in most readers: e.g., https://stat.ethz.ch/pipermail/r-help/2012-June/thread.html Michael On Tue, Jun 26, 2012 at 11:57 PM, Erin Hodgess erinm.hodg...@gmail.com wrote: Hello again: Here is a solution to the

Re: [R] Remove empty levels in subset

2012-06-26 Thread svo
Thank you very much. The advice I followed (and which, for some reason, I do not see here right now) was to use 'droplevels'. I needed the command for several variables at the same time, so this was very convenient. Hello, Have you tried 'droplevels': test

[R] selecting rows by maximum value of one variables in dataframe nested by another Variable

2012-06-26 Thread Miriam
How could I select the rows of a dataset that have the maximum value in one variable and to do this nested in another variable. It is a dataframe in long format with repeated measures per subject. I was not successful using aggregate, because one of the columns has character values (and/or