Hello everybody, I am writing an r file in the same R working directory and I
would like to know how can I just run the whole file by just entering the
file´s name on the console. I put the file in the working directory but it
didn´t work saying that the "file_name" object wasn´t found. In matla
Hello, I am using setwd() to change the working directory but I have to enter
it everytime I open R, is there a way to set this permanently as a working
directory? Thanx =^D
--
View this message in context:
http://old.nabble.com/Change-working-directory-tp26337486p26337486.html
Sent from the R
Hello, I am trying to save some changes I have done on the Rprofile.site
under vista and it doesn´t let me save the file saying that it can´t create
the following file (Rprofile.site) and that I should check the pathfile or
the file name.
--
View this message in context:
http://old.nabble.com
Hello, I am getting an error with the following code:
if( P2 > P1)
+ {
+ P<-P2
+ }
> else
Erro: unexpected 'else' in "else"
> {
+ P<-P1
+ }
I checked the syntax so I don´t understand, I have other if else statements
with the same syntax working. Thanks in advance
--
View this message in context:
Ok Jim it worked, thank you! it´s funny because it worked with the first
syntax in some cases...
anna_l wrote:
>
> Hello, I am getting an error with the following code:
> if( P2 > P1)
> + {
> + P<-P2
> + }
>> else
> Erro: unexpected 'else' in &qu
ok thanks guys for the help, indeed I assumed there was an explanation thank
you duncan for giving it!
--
View this message in context:
http://old.nabble.com/Simple-if-else-statement-problem-tp26340336p26343665.html
Sent from the R help mailing list archive at Nabble.com.
_
se another approach in this case
>
> P<-max(c(P1,P2))
>
> Regards
> Petr
>
>
>>
>>
>> anna_l wrote:
>> >
>> > Hello, I am getting an error with the following code:
>> > if( P2 > P1)
>> > + {
>> > + P&
help-boun...@r-project.org]
> On Behalf Of anna_l
> Sent: Friday, November 13, 2009 11:46 AM
> To: r-help@r-project.org
> Subject: [R] Problems by saving Rprofile.site under vista
>
>
> Hello, I am trying to save some changes I have done on the Rprofile.site
> under vista and i
Hello everybody, here is the code I use to read an excel file containing two
rows, one of date, the other of prices:
library(RODBC)
z <- odbcConnectExcel("SPX_HistoricalData.xls")
datas <- sqlFetch(z,"Sheet1")
close(z)
It works pretty well but the only thing is that the dat
Thanks Charlie, well yes it included one row with two NA datas. I guess there
is an explanation, let´s wait and see if someone knows more about it :)
cls59 wrote:
>
>
> anna_l wrote:
>>
>> Hello everybody, here is the code I use to read an excel file containing
>>
Hello, I am having trouble by using the write.table function to write a data
frame of 4 columns and 7530 rows. I don´t know if I should just use a
sep="\n" and change the .xls file into a .csv file. Thanks in advance
-
Anna Lippel
new in R so be careful I should be asking a lt of que
Hello, I found a solution to the problem, quite easy. The R paste was on
read-only, so I went to the properties/security. Apparently he considers me
as a user and not an administrator when I open the files so I just gave the
users ( me) the authorization to modificate and it worked.
anna_l
Hello everybody, I´ve been looking for a function that would create an excel
file in my working directory where I would write my dataframe but I only
found the functions to write or read in an existing file that you gave me on
my former post or on some websites. I can´t find either functions to
ma
specified worksheet but I couldn´t
find in the help on sqlSave how to do it.
cls59 wrote:
>
>
> anna_l wrote:
>>
>> Hello, I am having trouble by using the write.table function to write a
>> data frame of 4 columns and 7530 rows. I don´t know if I should just use
&
Sorry Charlie, I didn´t understand that tablename=R Results was creating a
worksheet. But the thing now is that it works very well when I write for the
first time on the excel file but when I want to rewrite on it it gives the
error i wrote before saying that Results already exists, is there a way
Thanks Karl, well I am getting an error now after the following sqlSave
command:
sqlSave( xlsFile, datas, tablename = 'Datas_and_coefficients', rownames =
FALSE )
--> [RODBC] Failed exec in Update
22018 39 [Microsoft][Driver ODBC for Excel]invalid character value for the
diffusion specification
ate
column format of the excel file back into date type.
anna_l wrote:
>
> Thanks Karl, well I am getting an error now after the following sqlSave
> command:
> sqlSave( xlsFile, datas, tablename = 'Datas_and_coefficients', rownames =
> FALSE )
>
> --> [RODBC]
Hello, the sqlSave function is used in order to write a dataframe on excel.
This function creates worksheets using the attribute tablename and writes
the data.frame in it. What I want to do is to create this data.frame but
being able in case this worksheet already exists to delete the former datas
Hello everybody, I started to use Rexcel and I am getting an error with the
following code:
Sub AutoForma1_Clique()
Call RInterface.StartRServer
Call RInterface.RRun("setwd(""C:/Program Files/R/R-2.10.0/Working
Directory"")")
Call RInterface.RRun("getwd()")
End Sub
The error is the fo
and
it worked very well. Thank you for trying to help.
Karl Ove Hufthammer wrote:
>
> On Thu, 19 Nov 2009 04:07:52 -0800 (PST) anna_l @hotmail.com> wrote:
>> Hello, the sqlSave function is used in order to write a dataframe on
>> excel.
>> This function creates wor
Hello, I am trying to plot a graphic with many lines with the following
command:
plot(datas[1:n,1],datas[1:n,2],type="l",main="SP500 Prices and Moving
Averages",xlab="Date",ylab="Prices",col="black")
lines(datas[1:n,1],datas[1:n,3],type="l",col="green",lty="solid")
But I just see the first curve
21 matches
Mail list logo