Displaying 20 results from an estimated 1000 matches similar to: "Problems with package XML"
2005 Apr 27
1
Recursive calculation of a series of values
Dear R-users,
I'm felling kind of blocked on a quite simple problem and I wonder if
someone could give me a help with it.
My problem:
x[0] = 100
x[1] = (1+v[1])*x[0]
x[2] = (1+v[2])*x[1]
...
i.e.
x[i] = (1+v[i])*x[i-1]
and x[0]=k
Given a set of v values I wanted to obtain the corresponding x values in
an efficient way (i.e. without a for loop).
For instance, if x[0] = 100 and v =
2002 Dec 13
1
Problem with lattice bwplot
I've come across the following error when using free scales with bwplot (I use 
a small example data set just to illustrate the problem):
> d <- data.frame(
x=c(34.4, 12.4, NA, 65.3, NA, 12.0, 45.0, 645.0, 644.0,323.0),
fac1=c('a','a','b','a','b','a','a','c','c','c'),
2001 Dec 11
1
Locale problems with strptime to convert dates
Hi. I've already posted this question 2 months ago but as I've got no
answer I've decided to try again :-)
I'm using R1.3.1 on a x86 machine running Win 2000.
My problem: I want to convert a string to a date format using strptime.
As I'm from Portugal my locale information is the following:
> Sys.getlocale()
[1]
2001 Oct 23
2
Parsing of HTML files in R
Is there any package similar to the XML package that is able to
"extract" relevant information from HTML files. Namely, I'm interested
in obtained data that is represented as a HTML table, into some R-type
structure.
Thank you.
--
Luis Torgo
    FEP/LIACC, University of Porto   Phone : (+351) 22 607 88 30
    Machine Learning Group           Fax   : (+351) 22 600 36 54
    R. Campo
2003 Jun 05
1
kmeans (again)
Regarding a previous question concerning the kmeans function I've tried the 
same example and I also get a strange result (at least according to what is 
said in the help of the function kmeans). Apparently, the function is 
disregarding the initial cluster centers one gives it. According to the help 
of the function:
 centers: Either the number of clusters or a set of initial cluster
       
2002 Dec 13
0
Problem with RMySQL 0.5-0 under RH7.3
I have upgraded R on my Linux box from 1.5.1 to 1.6.1 using the binary 
distributions for redhat 7.x.
My machine is runing:
Linux  2.4.18-3
Red Hat Linux release 7.3 (Valhalla)
After upgrading R, I executed upgrade.packages()
During the upgrading of the different packages there was an error on RMySQL. 
Here is a dump of the upgrading messages:
2002 Apr 23
1
Writing text in lattice graphics
I'm trying to obtain a set of regression lines obtained for different values 
of a factor using lattice. I would like to add a string to each panel showing 
the R^2 value of the respective line, but I'm having difficulties positioning 
the text (namely on which coordinates to give to the "ltext" function).
Here is what I'm using (I've used ?? for the things I would like
2002 Sep 12
1
DBI / MySQL problems
Hi.
I frequently use RMySQL package to interface R with MySQL databases. I was 
having a try with package DBI and I got the following error:
> library(RMySQL)
> library(DBI)
> drv <- dbDriver("MySQL")
> ch <- dbConnect(drv, dbname="mydb", user="myuser", password="mypasswd")
> ibm <- dbGetQuery(ch,"select * from table where
2002 Dec 10
1
lattice barchart with "negative" bars
Dear all,
I'm trying to use the lattice barchart function to obtain a bar plot of a 
variable for different values of two factors. The thing I'm trying to do is 
something like this:
> barchart(MyVar ~ season | place, data=mydataset)
My problem is that the column MyVar has some negative values and I would like 
them to be represented as bars stacking down from zero instead of what
2002 Jun 28
1
Indexing time series objects
Hi. I have a question concerning the easiest way to index a time series 
object holding some stock quotes. An example:
> ibm <- get.hist.quote("IBM",start="2000-01-01")
My question is:- Suppose I want to know the stock quotes on 2000-01-03. Which 
is the easiest way to index the "ibm" time series object to get them?
I got what I wanted using:
> 
2003 Nov 24
1
RMySQL valid field names
I'm having some problems with valid field names when using RMySQL to interface 
R (version 1.7.0, under RedHat9.0), to MySQL (4.1.0-alpha). I think I've 
spotted the problem and a solution (which is working for me), but I wanted to 
share this with you as I may be missing something.
(Note: I'm aware that this is an old R version, but I've checked the code of 
the lastest version of
2003 Jun 02
1
Ploting rpart objects / namespace problems
I've written a small adaptation of the text.rpart function of the rpart 
package to better suite my tree presentation needs (I basically left the code 
untouched, only changing some numbers relating to label positioning).
When I changed to version 1.7.0 this function stopped working printing the 
error :
    couldn't find function "rpartco"
As far as I understand this has to do
2003 Mar 24
2
Problem with the step() function
Dear all,
I'm having some problems with using the step() function inside another 
function. I think it is an environment problem but I do not know how to 
overcome it. Any suggestions are appreciated. 
I've prepared a simple example to illustrate my problem:
> library(MASS)
> data(Boston)
> my.fun <- function(dataset) {
+   l <- lm(medv ~ .,data=dataset)
+   final.l <-
2003 May 24
1
predicting fuzzy cluster membership
Dear all,
I'm trying to obtain a fuzzy clustering with fanny from the cluster package, 
using a given set of data. That worked just fine.
I have another separate sample of data from the same problem. For each case in 
this new sample I would like to know their membership coefficients with 
respect to the clustering obtained with the first dataset. In effect I want 
to have a kind of prediction
2002 Nov 26
1
Problem with accented characters in portuguese
Dear all,
I've recently encountered a strange behaviour when using R with portuguese 
accented characters. The most curious aspect is that using the same code with 
ESS under XEmacs the behaviour is different.
My system is:
> R.version
         _              
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major 
2005 Apr 27
2
its package: inexplicable date-shifting ?!
Can someone please explain to me why 
the dates get shifted by one day 
when I create an its ( irregular time-series ) 
object from a matrix for which I've
assigned row names.
E.g. in the example run below, 
why does the its object have dates
one-shifted from my original dates?
> install.packages('its')
> install.packages('Hmisc')
> require(its)
> m <-
2002 May 31
1
Accessing MySQL from Windows
I'm using R on a Linux box:
> version           
platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status                    
major    1                
minor    5.0              
year     2002             
month    04               
day      29               
language R    
I want to use data that is stored in a MySQL database.
2005 Oct 31
2
Sweave (R?) font encoding problems
Dear R list,
I'm having some problems with font encodings when using R+Sweave+Latex in my 
native language: Portuguese.
My environment:
Kubuntu 5.10 Linux
$> uname -a
Linux nassa 2.6.12-9-686 #1 Mon Oct 10 13:25:32 BST 2005 i686 GNU/Linux
R> R.version
         _                
platform i486-pc-linux-gnu
arch     i486             
os       linux-gnu        
system   i486, linux-gnu  
2001 Oct 04
0
Locale problems with strptime to convert dates
Hi.
I'm using R1.3.1 on a x86 machine running Win 2000.
My problem:
- I want to convert a string to a date format using strptime. As I'm from
Portugal my locale information is the following:
> Sys.getlocale()
[1]
"LC_COLLATE=Portuguese_Portugal.1252;LC_CTYPE=Portuguese_Portugal.1252;LC_MO
NETARY=C;LC_NUMERIC=C;LC_TIME=Portuguese_Portugal.1252"
If I do the following
2006 Feb 08
1
expand.grid without expanding
Dear list,
I've recently came across a problem that I think I've solved and that I wanted 
to share with you for two reasons:
- Maybe others come across the same problem.
- Maybe someone has a much simpler solution that wants to share with me ;-)
The problem is as follows: expand.grid() allows you to generate a data.frame 
with all combinations of a set of values, e.g.:
>